source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPZ07P.m@ 811

Last change on this file since 811 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1DGPZ07P ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- PRINT ROUTINE ; 06/30/06
2 ;;5.3;Registration;**653**;Aug 13,1993;Build 2
3 ;
4 ; This routine prints the inconsistency report for the Z07 Consistency Check option
5 ; This routine is copied from DGRPCP1 and modified for a single DFN
6 ;
7ST N DGSTOP,ZTSTOP,CRT,%,DGCLK1,I,J,X,Y,Z,DGCT,DGPG,DGDATA,DGDFN,DGER,DGHDR,DGINC,DGOFF,DGSSN,DGSTORE,DGZ,I1,I2,X1
8 S CRT=$S($E(IOST,1,2)="C-":1,1:0)
9 S DGDATA=^DGIN(38.5,DFN,0) I $D(^DPT(DFN,0)) D SET I $$FIRST^DGUTL G Q
10 S DGPG=0,DGHDR="INCONSISTENT ELEMENTS FOR "_$P(^DPT(DFN,0),"^",1)_" "_$P(^DPT(DFN,0),"^",9) D HDR
11 S I=0 F I1=0:0 S I=$O(^UTILITY($J,"DGINC",I)) Q:I="" F I2=0:0 S I2=$O(^UTILITY($J,"DGINC",I,I2)) Q:'I2 G:$G(DGSTOP) Q S X=^(I2) D W
12 D TRA
13Q K %,%DT,DGVAR,DGER,DFN,DGPGM,^UTILITY($J,"DGINC")
14 D ENDREP^DGUTL,CLOSE^DGUTQ
15 Q
16W W !,$P(X,"^",1),?31,$P(X,"^",2),?$S($E($P(X,"^",3))="*":43,1:45),$P(X,"^",3) I $S(CRT:$Y>20,1:$Y>45) D
17 . D:'CRT TRA S DGSTOP=$$SUBSEQ^DGUTL
18 . D HDR
19 Q
20HDR Q:$G(DGSTOP) S DGPG=DGPG+1 W !,DGHDR
21 W:DGPG>1 ?73,"Page "_DGPG W !,"Patient Name",?31,"Soc Sec #",?45,"Inconsistent/Missing Data Elements"
22 S X1="",$P(X1,"=",80)="" W !,X1,!
23 Q
24TRA S DGCT=0,X1="",$P(X1,"*",80)="" X "F DGZ=$Y:1:$S($D(IOSL):(IOSL-10),1:41) W !"
25 W !!,X1,!,"An inconsistent Data element preceded by '**' prevents a Z07"
26 W !,"record from being sent to the HEC.",!,X1
27 Q
28SET S DGDFN=^DPT(DFN,0),DGSSN=$P(DGDFN,"^",9),DGSTORE=$S($P(DGDFN,"^",1)]"":$P(DGDFN,"^",1),1:"UNIDENTIFIED PATIENT #"_DFN)_" "_$E(DGSSN,8,9)_$E(DGSSN,6,7)_$E(DGSSN,4,5)_$E(DGSSN,1,3),DGINC="",DGLOOP=0
29 F J=0:0 S J=$O(^DGIN(38.5,DFN,"I",J)) Q:'J D
30 . Q:'$D(^DGIN(38.6,J))
31 . S DG6=$P(^DGIN(38.6,J,0),"^",6) I DG6'=1 S DG6=0
32 . S DGTEXT=$P(^DGIN(38.6,J,0),"^",1) I DG6 S DGTEXT="**"_DGTEXT
33 . ; set up variables
34 . S DGLOOP=DGLOOP+1
35 . ; print full first record, abbreviated subsequent records
36 . I DGLOOP=1 S ^UTILITY($J,"DGINC",DGSTORE,DGLOOP)=$S($P(DGDFN,"^",1)]"":$P(DGDFN,"^",1),1:"UNIDENTIFIED PATIENT #"_DFN)_U_$P(DGDFN,"^",9)_U_DGTEXT Q
37 . S ^UTILITY($J,"DGINC",DGSTORE,DGLOOP)="^^"_DGTEXT
38 K J,DGINC,DGSSN,DGDFN,DGLOOP,DGSTORE,DG6,DGCHK,DGTEXT
39 Q
40 ;
Note: See TracBrowser for help on using the repository browser.