AGSSR ; IHS/ASDS/EFG - MASTER PRINTER routine ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
;the array AGSSP(report #)=type controlls the prints
S Q:'$D(AGSSP)
D NOW^%DTC S AGSS("JOBID")=%
N AGTMPK
F AGTMPK="^AGSTEMP" D
. I $$KILLOK^ZIBGCHAR($P(AGTMPK,U,2)) W !,$$ERR^ZIBGCHAR($$KILLOK^ZIBGCHAR($P(AGTMPK,U,2)))_" "_AGTMPK Q
. K @AGTMPK ;kill off earlier temp global reports if there
D ^AGSSRV,^AGSSRA,^AGSSRD,^AGSSRN,^AGSSRP ;set up print globals for all reports
Q
PRINT ;EP - PRINT
S AGSSPG=1,AGSSHDR="SSN Summary" D AGSSHDR^AGSSPRT
U IO W !,"Patients :",?40,"Number",?50,"Report",!
F AGSSFLAG="V","A","D","N","P" S AGSSROU="PRINT^AGSSR"_AGSSFLAG I $D(AGSSP(AGSSFLAG)) W !,$P($T(@AGSSFLAG),";;",2),?40,$J($G(^AGSSTEMP(AGSSITE,"TOT","R"_AGSSFLAG)),7),?50,$S(AGSSP(AGSSFLAG)="C":"Complete",1:"Statistics")
W !! I "C"=$E(IOST) K DIR S DIR(0)="E" D ^DIR
;loop through all printing routines
F AGSSFLAG="V","A","D","N","P","X" S AGSSROU="PRINT^AGSSR"_AGSSFLAG I $G(AGSSP(AGSSFLAG))="C" D @AGSSROU I "C"=$E(IOST) W !!! I '($G(DUOUT)!$G(DFOUT)!$G(DIRUT)!$G(DTOUT)) K DIR S DIR(0)="E" D ^DIR
I "C"=$E(IOST) W !!!,*7,?20,">>>>> REPORTS COMPLETED <<<<<" K DIR S DIR(0)="E" D ^DIR
Q
V ;;'V' Verified
A ;;'A' Added
P ;;'P' Potential / Pending
D ;;'D' Data Differs but SSNs Match
N ;;'N' SSNs Differ but Data Matches
X ;;'X' SSA could not process
AGSSR ; IHS/ASDS/EFG - MASTER PRINTER routine ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 ;the array AGSSP(report #)=type controlls the prints
S IF '$DATA(AGSSP)
QUIT
+1 DO NOW^%DTC
SET AGSS("JOBID")=%
+2 NEW AGTMPK
+3 FOR AGTMPK="^AGSTEMP"
Begin DoDot:1
+4 IF $$KILLOK^ZIBGCHAR($PIECE(AGTMPK,U,2))
WRITE !,$$ERR^ZIBGCHAR($$KILLOK^ZIBGCHAR($PIECE(AGTMPK,U,2)))_" "_AGTMPK
QUIT
+5 ;kill off earlier temp global reports if there
KILL @AGTMPK
End DoDot:1
+6 ;set up print globals for all reports
DO ^AGSSRV
DO ^AGSSRA
DO ^AGSSRD
DO ^AGSSRN
DO ^AGSSRP
+7 QUIT
PRINT ;EP - PRINT
+1 SET AGSSPG=1
SET AGSSHDR="SSN Summary"
DO AGSSHDR^AGSSPRT
+2 USE IO
WRITE !,"Patients :",?40,"Number",?50,"Report",!
+3 FOR AGSSFLAG="V","A","D","N","P"
SET AGSSROU="PRINT^AGSSR"_AGSSFLAG
IF $DATA(AGSSP(AGSSFLAG))
WRITE !,$PIECE($TEXT(@AGSSFLAG),";;",2),?40,$JUSTIFY($GET(^AGSSTEMP(AGSSITE,"TOT","R"_AGSSFLAG)),7),?50,$SELECT(AGSSP(AGSSFLAG)="C":"Complete",1:"Statistics")
+4 WRITE !!
IF "C"=$EXTRACT(IOST)
KILL DIR
SET DIR(0)="E"
DO ^DIR
+5 ;loop through all printing routines
+6 FOR AGSSFLAG="V","A","D","N","P","X"
SET AGSSROU="PRINT^AGSSR"_AGSSFLAG
IF $GET(AGSSP(AGSSFLAG))="C"
DO @AGSSROU
IF "C"=$EXTRACT(IOST)
WRITE !!!
IF '($GET(DUOUT)!$GET(DFOUT)!$GET(DIRUT)!$GET(DTOUT))
KILL DIR
SET DIR(0)="E"
DO ^DIR
+7 IF "C"=$EXTRACT(IOST)
WRITE !!!,*7,?20,">>>>> REPORTS COMPLETED <<<<<"
KILL DIR
SET DIR(0)="E"
DO ^DIR
+8 QUIT
V ;;'V' Verified
A ;;'A' Added
P ;;'P' Potential / Pending
D ;;'D' Data Differs but SSNs Match
N ;;'N' SSNs Differ but Data Matches
X ;;'X' SSA could not process