PSUUD0 ;BIR/TJH,PDW;PBM UNIT DOSE CONTROL POINT;07/08/1998
;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ; Entry point for processing
;
;
D ^PSUUD1 ; Collect all data
I '$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG")) D
.D ^PSUUD3 ; Mail reports
.D EN^PSUUD7 ; Mail AMIS summary reports
;
;pt. demographics summary reports
D PULL^PSUCP
F I=1:1:$L(PSUOPTS,",") S PSUMOD($P(PSUOPTS,",",I))=""
;
I $D(PSUMOD(10)) D UDSSN^PSUDEM4 ;Provider extract
;
I '$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG")) D
.I '$D(^XTMP("PSU_"_PSUJOB,"PSUMFLAG")) D
..D EN^PSUSUM3 ;UD PD summary
..;
..;IV/UD summary report
..I $D(PSUMOD(2))&$D(PSUMOD(1))&'$D(PSUMOD(4)) D
...D EN^PSUSUM5
;
K ^XTMP("PSU_"_PSUJOB,"PSUFLAG1")
D CLEAN
K UDAM,SPEC,AMIS,DOSE,DOSTOT,DIVTOT,GTOT
Q
PRINT ; Entry point for printing function
D ^PSUUD5 ; Print summary reports
D CLEAN
Q
;
CLEAN ; clean up local symbol table
S XPSUOPTN=PSUOPTN,XPSUJOB=PSUJOB M XPSUMOD=PSUMOD
D VARKILL^PSUTL ; kill all PSU namespace variables
S PSUOPTN=XPSUOPTN,PSUJOB=XPSUJOB M PSUMOD=XPSUMOD K XPSUOPTN,XPSUJOB,XPSUMOD
K DADATE,DADRUG,DAHOW,DAMT,DASH,DFN,DIC,DLM,ENDIT,EXTD
K PSDATE,PSDOSE,PSECT,PSPAT,REC1,REC2,SPACES,X1,X2,Y,Z
D PULL^PSUCP,OPTS^PSUCP
CLEANQ Q
PSUUD0 ;BIR/TJH,PDW;PBM UNIT DOSE CONTROL POINT;07/08/1998
+1 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ; Entry point for processing
+1 ;
+2 ;
+3 ; Collect all data
DO ^PSUUD1
+4 IF '$DATA(^XTMP("PSU_"_PSUJOB,"PSUFLAG"))
Begin DoDot:1
+5 ; Mail reports
DO ^PSUUD3
+6 ; Mail AMIS summary reports
DO EN^PSUUD7
End DoDot:1
+7 ;
+8 ;pt. demographics summary reports
+9 DO PULL^PSUCP
+10 FOR I=1:1:$LENGTH(PSUOPTS,",")
SET PSUMOD($PIECE(PSUOPTS,",",I))=""
+11 ;
+12 ;Provider extract
IF $DATA(PSUMOD(10))
DO UDSSN^PSUDEM4
+13 ;
+14 IF '$DATA(^XTMP("PSU_"_PSUJOB,"PSUFLAG"))
Begin DoDot:1
+15 IF '$DATA(^XTMP("PSU_"_PSUJOB,"PSUMFLAG"))
Begin DoDot:2
+16 ;UD PD summary
DO EN^PSUSUM3
+17 ;
+18 ;IV/UD summary report
+19 IF $DATA(PSUMOD(2))&$DATA(PSUMOD(1))&'$DATA(PSUMOD(4))
Begin DoDot:3
+20 DO EN^PSUSUM5
End DoDot:3
End DoDot:2
End DoDot:1
+21 ;
+22 KILL ^XTMP("PSU_"_PSUJOB,"PSUFLAG1")
+23 DO CLEAN
+24 KILL UDAM,SPEC,AMIS,DOSE,DOSTOT,DIVTOT,GTOT
+25 QUIT
PRINT ; Entry point for printing function
+1 ; Print summary reports
DO ^PSUUD5
+2 DO CLEAN
+3 QUIT
+4 ;
CLEAN ; clean up local symbol table
+1 SET XPSUOPTN=PSUOPTN
SET XPSUJOB=PSUJOB
MERGE XPSUMOD=PSUMOD
+2 ; kill all PSU namespace variables
DO VARKILL^PSUTL
+3 SET PSUOPTN=XPSUOPTN
SET PSUJOB=XPSUJOB
MERGE PSUMOD=XPSUMOD
KILL XPSUOPTN,XPSUJOB,XPSUMOD
+4 KILL DADATE,DADRUG,DAHOW,DAMT,DASH,DFN,DIC,DLM,ENDIT,EXTD
+5 KILL PSDATE,PSDOSE,PSECT,PSPAT,REC1,REC2,SPACES,X1,X2,Y,Z
+6 DO PULL^PSUCP
DO OPTS^PSUCP
CLEANQ QUIT