AGSSP ; IHS/ASDS/EFG - PRINT SSN REPORTS ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
;the report selection is loaded into an array: AGSSP(report #)=type
S ;
K AGSSP,AGSSP1,AGSSPC
S DIC="^DIC(4,",DIC(0)="AEMQ"
S DIC("A")="Reports for Facility? "
S DIC("B")=$P(^DIC(4,DUZ(2),0),"^",1)
D ^DIC K DIC Q:+Y<0 S AGSSITE=+Y
I '$G(^AGSSTEMP(AGSSITE,0,"END-PROCESS")) D Q
.W !!,"Process NOT complete for facility ",$P(^DIC(4,AGSSITE,0),"^",1),".",!!
.K DIR S DIR(0)="E" D ^DIR K DIR
S1 D DISP
S1A F D ASK Q:'$D(AGSSP1)
I '$D(AGSSP) W !,"NO Reports Selected" Q
G ASK2
ASK ;EP
W ! I $D(AGSSP) D DISP W !,"You may continue to edit or add other reports"
K DIR,AGSSP1 S DIR(0)="LO^1:5",DIR("A")="Please select the report or range of reports. ex 1,2,3-5 ",DIR("??")="^D DISP^AGSSP" D ^DIR
Q:(+$G(DUOUT)+$G(DTOUT)+$G(DROUT)+$G(DIROUT)) Q:Y=""
S AGSSP1=Y
K DIR S DIR(0)="SO^S:Statistics;C:Complete",DIR("B")="S",DIR("A")="Please Select the type of report " D ^DIR
Q:(+$G(DUOUT)+$G(DTOUT)+$G(DROUT)+$G(DIROUT)) Q:Y=""
F AGSSI=1:1 S AGSSX=$P(AGSSP1,",",AGSSI) Q:'AGSSX S AGSSP($E("VADNPX",AGSSX))=Y,AGSSPC(AGSSX)=Y
Q
DISP ;EP
W $$S^AGVDF("IOF")
W ?15,"SSN VERIFICATION REPORTS",!
W:'$D(AGSSP) !,"The user can select any combination of the following reports"
W:'$D(AGSSP) !,"and the type, either Statistics or Complete.",!
W:'$D(AGSSP) !,"First answer the range of reports and then the type of report",!,"for the range selected",!
W:$D(AGSSP) !,"You have selected the following reports.",!
F AGSSI=1:1:5 W !,?5,AGSSI,?10,$P($T(@AGSSI),";;",2) W:$D(AGSSPC(AGSSI)) ?50,$S(AGSSPC(AGSSI)["S":"Statistics",1:"Complete")
;
1 ;;`V` Verified by SSA
2 ;;`A` Added by SSA
3 ;;`D` Match SSA SSN but DATA differs (*)
4 ;;`N` Match SSA DATA but SSNs differ (*)
5 ;;`P` Potential and/or Pending SSNs (*)
;
W !!,"SSA SSN Matching Process Data >> IS ",$S($D(^AGSSTEMP(AGSSITE)):"",1:"NOT")," << available. "
W !,"(*) data from SSA Matching Process added if available",!
Q
ASK2 K DIR S DIR(0)="Y",DIR("A")="Are You Satisfied with the above selection ?",DIR("B")="Y" D ^DIR
I (+$G(DUOUT)+$G(DTOUT)+$G(DROUT)+$G(DIROUT))!(Y="") G END
I Y=1 G CONT
K DIR S DIR(0)="S^S:Start Over;R:Re-edit;E:Exit",DIR("A")="Please Select: ",DIR("B")="S" D ^DIR
G:Y["S" S
G:Y["R" S1A
G END
CONT ;EP
S XBRC="^AGSSR",XBRP="PRINT^AGSSR",XBRX="END^AGSSP",XBNS="AGS"
D ^XBDBQUE
Q
END ;EP - kill variables from all print routines
D ^%ZISC
I '$D(ZTSK),$D(AGSS("JOBID")) K ^AGSTEMP(AGSS("JOBID")) ;kill of temporary global
END2 ;Consolidated duplicate kills of variables
K AGSS,AGSSI,AGSSX,AGSSP,AGSSC,AGSSN,AGSSP1,AGSSPC,AGSSPG
K AGSSPIO,AGSSPHIO,AGSSPION
K AGSSCSN,AGSSCSX,AGSSDOB,AGSSHDR,AGSSHRN,AGSSCPU
K AGSI,AGSX,AGSY,AGSRA,AGSRV,AGSRP,AGSRN,AGSRD,ABSRR,AGSRX
K AGSHRN,AGSDFN,AGSGLO
K AGSCDOB,AGSCLN,AGSCMN,AGSCFN,AGSCNM,AGSCREC
K AGSCSSN1,AGSCSSN2,AGSCSX,AGSCVC
K AGSSASSN
K AGSSCDOB,AGSSCFN,AGSSCHRN,AGSSCLN,AGSSCMN,AGSSCREC,AGSSCSSN
K AGSSDT,AGSSVC,AGSSNM,AGSSROU,AGSSFLAG
K AGSSLINE,AGSSPAT,AGSSREC
K AG0,AGSUFAC
K AGSLDOB,AGSLNM,AGSLSX,AGSLSSN,AGSLVC
K DIR,DFN
Q
AGSSP ; IHS/ASDS/EFG - PRINT SSN REPORTS ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 ;the report selection is loaded into an array: AGSSP(report #)=type
S ;
+1 KILL AGSSP,AGSSP1,AGSSPC
+2 SET DIC="^DIC(4,"
SET DIC(0)="AEMQ"
+3 SET DIC("A")="Reports for Facility? "
+4 SET DIC("B")=$PIECE(^DIC(4,DUZ(2),0),"^",1)
+5 DO ^DIC
KILL DIC
IF +Y<0
QUIT
SET AGSSITE=+Y
+6 IF '$GET(^AGSSTEMP(AGSSITE,0,"END-PROCESS"))
Begin DoDot:1
+7 WRITE !!,"Process NOT complete for facility ",$PIECE(^DIC(4,AGSSITE,0),"^",1),".",!!
+8 KILL DIR
SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
QUIT
S1 DO DISP
S1A FOR
DO ASK
IF '$DATA(AGSSP1)
QUIT
+1 IF '$DATA(AGSSP)
WRITE !,"NO Reports Selected"
QUIT
+2 GOTO ASK2
ASK ;EP
+1 WRITE !
IF $DATA(AGSSP)
DO DISP
WRITE !,"You may continue to edit or add other reports"
+2 KILL DIR,AGSSP1
SET DIR(0)="LO^1:5"
SET DIR("A")="Please select the report or range of reports. ex 1,2,3-5 "
SET DIR("??")="^D DISP^AGSSP"
DO ^DIR
+3 IF (+$GET(DUOUT)+$GET(DTOUT)+$GET(DROUT)+$GET(DIROUT))
QUIT
IF Y=""
QUIT
+4 SET AGSSP1=Y
+5 KILL DIR
SET DIR(0)="SO^S:Statistics;C:Complete"
SET DIR("B")="S"
SET DIR("A")="Please Select the type of report "
DO ^DIR
+6 IF (+$GET(DUOUT)+$GET(DTOUT)+$GET(DROUT)+$GET(DIROUT))
QUIT
IF Y=""
QUIT
+7 FOR AGSSI=1:1
SET AGSSX=$PIECE(AGSSP1,",",AGSSI)
IF 'AGSSX
QUIT
SET AGSSP($EXTRACT("VADNPX",AGSSX))=Y
SET AGSSPC(AGSSX)=Y
+8 QUIT
DISP ;EP
+1 WRITE $$S^AGVDF("IOF")
+2 WRITE ?15,"SSN VERIFICATION REPORTS",!
+3 IF '$DATA(AGSSP)
WRITE !,"The user can select any combination of the following reports"
+4 IF '$DATA(AGSSP)
WRITE !,"and the type, either Statistics or Complete.",!
+5 IF '$DATA(AGSSP)
WRITE !,"First answer the range of reports and then the type of report",!,"for the range selected",!
+6 IF $DATA(AGSSP)
WRITE !,"You have selected the following reports.",!
+7 FOR AGSSI=1:1:5
WRITE !,?5,AGSSI,?10,$PIECE($TEXT(@AGSSI),";;",2)
IF $DATA(AGSSPC(AGSSI))
WRITE ?50,$SELECT(AGSSPC(AGSSI)["S":"Statistics",1:"Complete")
+8 ;
1 ;;`V` Verified by SSA
2 ;;`A` Added by SSA
3 ;;`D` Match SSA SSN but DATA differs (*)
4 ;;`N` Match SSA DATA but SSNs differ (*)
5 ;;`P` Potential and/or Pending SSNs (*)
+1 ;
+2 WRITE !!,"SSA SSN Matching Process Data >> IS ",$SELECT($DATA(^AGSSTEMP(AGSSITE)):"",1:"NOT")," << available. "
+3 WRITE !,"(*) data from SSA Matching Process added if available",!
+4 QUIT
ASK2 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Are You Satisfied with the above selection ?"
SET DIR("B")="Y"
DO ^DIR
+1 IF (+$GET(DUOUT)+$GET(DTOUT)+$GET(DROUT)+$GET(DIROUT))!(Y="")
GOTO END
+2 IF Y=1
GOTO CONT
+3 KILL DIR
SET DIR(0)="S^S:Start Over;R:Re-edit;E:Exit"
SET DIR("A")="Please Select: "
SET DIR("B")="S"
DO ^DIR
+4 IF Y["S"
GOTO S
+5 IF Y["R"
GOTO S1A
+6 GOTO END
CONT ;EP
+1 SET XBRC="^AGSSR"
SET XBRP="PRINT^AGSSR"
SET XBRX="END^AGSSP"
SET XBNS="AGS"
+2 DO ^XBDBQUE
+3 QUIT
END ;EP - kill variables from all print routines
+1 DO ^%ZISC
+2 ;kill of temporary global
IF '$DATA(ZTSK)
IF $DATA(AGSS("JOBID"))
KILL ^AGSTEMP(AGSS("JOBID"))
END2 ;Consolidated duplicate kills of variables
+1 KILL AGSS,AGSSI,AGSSX,AGSSP,AGSSC,AGSSN,AGSSP1,AGSSPC,AGSSPG
+2 KILL AGSSPIO,AGSSPHIO,AGSSPION
+3 KILL AGSSCSN,AGSSCSX,AGSSDOB,AGSSHDR,AGSSHRN,AGSSCPU
+4 KILL AGSI,AGSX,AGSY,AGSRA,AGSRV,AGSRP,AGSRN,AGSRD,ABSRR,AGSRX
+5 KILL AGSHRN,AGSDFN,AGSGLO
+6 KILL AGSCDOB,AGSCLN,AGSCMN,AGSCFN,AGSCNM,AGSCREC
+7 KILL AGSCSSN1,AGSCSSN2,AGSCSX,AGSCVC
+8 KILL AGSSASSN
+9 KILL AGSSCDOB,AGSSCFN,AGSSCHRN,AGSSCLN,AGSSCMN,AGSSCREC,AGSSCSSN
+10 KILL AGSSDT,AGSSVC,AGSSNM,AGSSROU,AGSSFLAG
+11 KILL AGSSLINE,AGSSPAT,AGSSREC
+12 KILL AG0,AGSUFAC
+13 KILL AGSLDOB,AGSLNM,AGSLSX,AGSLSSN,AGSLVC
+14 KILL DIR,DFN
+15 QUIT