DGPZ07C ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- DRIVER ROUTINE ; 10/14/05 11:48am
;;5.3;Registration;**653,1015**;Aug 13,1993;Build 21
;
; This routine prompts the user for a patient name. Then, when found, calls the IVMZ07C support routine
; to check for inconsistencies in the patient record which will prevent the building of a Z07 HL7 record.
; Data from this routine will be available on the Inconsistent Data report.
;
; structure:
; 1. Begin loop
; 2. Select patient
; 3. Call IVMZ07C support routine
; 4. Notify user of Pass/Fail
;
; Must be called from entry point
Q
;
EN ; entry point.
; Start loop, quit when no more patients to check
F I '$$SELECT() Q
;
SELECT() ; Select patient and call support routine
N DFN,DIC,Y,DGP,DGSD,PASS,SEL
S SEL=0
W !! S DIC=2,DIC(0)="AEQM",DIC("A")="Check consistency for which PATIENT: " D ^DIC
I Y<0 Q SEL
S DFN=+Y,SEL=1
W !,"Checking..."
S PASS=$$EN^IVMZ07C(DFN)
D NOTIFY(PASS)
; we only need "CC" counter in batch mode so kill it here.
K ^TMP($J,"CC")
Q SEL
;
NOTIFY(PASS) ; Notify user of Pass/Fail
W !! ;write two blank lines
I PASS W "NO INCONSISTENCIES FOUND..." Q
W "INCONSISTENCIES FOUND..."
D ON^DGRPC Q:DGER
S DGVAR="DUZ^DFN",DGPGM="^DGPZ07P" D ZIS^DGUTQ G Q^DGPZ07P:POP U IO G ^DGPZ07P
Q
;
DGPZ07C ;BAJ - HL7 Z07 CONSISTENCY CHECKER -- DRIVER ROUTINE ; 10/14/05 11:48am
+1 ;;5.3;Registration;**653,1015**;Aug 13,1993;Build 21
+2 ;
+3 ; This routine prompts the user for a patient name. Then, when found, calls the IVMZ07C support routine
+4 ; to check for inconsistencies in the patient record which will prevent the building of a Z07 HL7 record.
+5 ; Data from this routine will be available on the Inconsistent Data report.
+6 ;
+7 ; structure:
+8 ; 1. Begin loop
+9 ; 2. Select patient
+10 ; 3. Call IVMZ07C support routine
+11 ; 4. Notify user of Pass/Fail
+12 ;
+13 ; Must be called from entry point
+14 QUIT
+15 ;
EN ; entry point.
+1 ; Start loop, quit when no more patients to check
+2 FOR
IF '$$SELECT()
QUIT
+3 ;
SELECT() ; Select patient and call support routine
+1 NEW DFN,DIC,Y,DGP,DGSD,PASS,SEL
+2 SET SEL=0
+3 WRITE !!
SET DIC=2
SET DIC(0)="AEQM"
SET DIC("A")="Check consistency for which PATIENT: "
DO ^DIC
+4 IF Y<0
QUIT SEL
+5 SET DFN=+Y
SET SEL=1
+6 WRITE !,"Checking..."
+7 SET PASS=$$EN^IVMZ07C(DFN)
+8 DO NOTIFY(PASS)
+9 ; we only need "CC" counter in batch mode so kill it here.
+10 KILL ^TMP($JOB,"CC")
+11 QUIT SEL
+12 ;
NOTIFY(PASS) ; Notify user of Pass/Fail
+1 ;write two blank lines
WRITE !!
+2 IF PASS
WRITE "NO INCONSISTENCIES FOUND..."
QUIT
+3 WRITE "INCONSISTENCIES FOUND..."
+4 DO ON^DGRPC
IF DGER
QUIT
+5 SET DGVAR="DUZ^DFN"
SET DGPGM="^DGPZ07P"
DO ZIS^DGUTQ
IF POP
GOTO Q^DGPZ07P
USE IO
GOTO ^DGPZ07P
+6 QUIT
+7 ;