PSUCS0 ;BIR/DJE,DJM - PBM CONTROLLED SUBSTANCE (CONTROL POINT) ;25 AUG 1998
;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ;EN(PSUMSGT) ; Entry point
I '$D(PSUJOB) S PSUJOB=$J
S PSUVARS="PSUSDT,PSUEDT,PSUMON,PSUDUZ,PSUMASF,PSUPBMG,PSUSMRY,ZTIO,PSUSNDR,PSUOPTS"
F I=1:1:$L(PSUVARS,",") S @$P(PSUVARS,",",I)=$P(^XTMP("PSU_"_PSUJOB,1),U,I)
S PSUDUZ=$G(PSUDUZ,DUZ) ;
D EN^PSUCS1 ; Collect all data
D EN^PSUCSR0(.PSUMSGT) ; Mail reports
D EN^PSUCSR2 ; Generate and Mail AMIS summary report
K CSAM,AMISC
Q
PRINT ;EP - FOR HARD COPY REPORTING
I '$D(^XTMP("PSU_"_PSUJOB,"CBAMIS")) D
.D GENREP^PSUCSR1(.PSUMSGT) ;CS AMIS SUMMARY
I $D(^XTMP("PSU_"_PSUJOB,"CBAMIS")) D
.D COMBO^PSUCSR1(.PSUMSGT) ;Combo AMIS summary reports
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSUCS0 766 printed Dec 13, 2024@02:27:32 Page 2
PSUCS0 ;BIR/DJE,DJM - PBM CONTROLLED SUBSTANCE (CONTROL POINT) ;25 AUG 1998
+1 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ;EN(PSUMSGT) ; Entry point
+1 IF '$DATA(PSUJOB)
SET PSUJOB=$JOB
+2 SET PSUVARS="PSUSDT,PSUEDT,PSUMON,PSUDUZ,PSUMASF,PSUPBMG,PSUSMRY,ZTIO,PSUSNDR,PSUOPTS"
+3 FOR I=1:1:$LENGTH(PSUVARS,",")
SET @$PIECE(PSUVARS,",",I)=$PIECE(^XTMP("PSU_"_PSUJOB,1),U,I)
+4 ;
SET PSUDUZ=$GET(PSUDUZ,DUZ)
+5 ; Collect all data
DO EN^PSUCS1
+6 ; Mail reports
DO EN^PSUCSR0(.PSUMSGT)
+7 ; Generate and Mail AMIS summary report
DO EN^PSUCSR2
+8 KILL CSAM,AMISC
+9 QUIT
PRINT ;EP - FOR HARD COPY REPORTING
+1 IF '$DATA(^XTMP("PSU_"_PSUJOB,"CBAMIS"))
Begin DoDot:1
+2 ;CS AMIS SUMMARY
DO GENREP^PSUCSR1(.PSUMSGT)
End DoDot:1
+3 IF $DATA(^XTMP("PSU_"_PSUJOB,"CBAMIS"))
Begin DoDot:1
+4 ;Combo AMIS summary reports
DO COMBO^PSUCSR1(.PSUMSGT)
End DoDot:1
+5 QUIT