PSUAMC ;BIR/DAM - Combined AMIS Summary Report:21 APR 2004
;;4.0;PHARMACY BENEFITS MANAGEMENT;**9**;MARCH, 2005;Build 6
;
;This routine creates a combined AMIS summary report when
;the following extracts are run either by the automatic
;monthly extract or manual selection
; 1. IV extract
; 2. UD extract
; 3. AR/WS extract
; 4. Prescription extract
; 6. CS extract
;
;
EN ;Entry point. Called from ^PSUCSR2
;
K AMIS
;
S Y=PSUSDT\1 X ^DD("DD") S PSUDTS=Y ; start date
S Y=PSUEDT\1 X ^DD("DD") S PSUDTE=Y ; end date
; * PSU*4*9 - RESET THE PARENT FACILITY
S X=PSUSNDR,DIC=40.8,DIC(0)="X",D="C" D IX^DIC
K DIC,DIC(0),D
S X=+Y S PSUDIVNM=$$VAL^PSUTL(40.8,X,.01)
;
S AMIS(1,1)="Monthly AMIS Summary for "_PSUDTS_" through "_PSUDTE_" for "_PSUDIVNM
S AMIS(1,2)=""
S AMIS(1,3)=""
;
M AMIS(2)=^XTMP("PSU_"_PSUJOB,"OPCOMBO")
;
M AMIS(3)=^XTMP("PSU_"_PSUJOB,"UDCOMBO")
;
M AMIS(4)=^XTMP("PSU_"_PSUJOB,"ARCOMBO")
;
M AMIS(5)=^XTMP("PSU_"_PSUJOB,"CSCOMBO")
;
M AMIS(6)=^XTMP("PSU_"_PSUJOB,"IVCOMBO")
;
;Reorganize AMIS array
S C=1
S PSUCT=0
F S PSUCT=$O(AMIS(PSUCT)) Q:PSUCT="" D
.S PSULN=0
.F S PSULN=$O(AMIS(PSUCT,PSULN)) Q:PSULN="" D
..S AMIS(C)=AMIS(PSUCT,PSULN)
..S C=C+1
;
D MAIL
Q
;
MAIL ;Mail combo message
;
S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1) ;Facility #
S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2) ;Facility name
;
S XMSUB="V. 4.0 PBMAMIS "_PSUMON_" "_PSUST_" "_PSUSTNM
S XMTEXT="AMIS("
M ^XTMP("PSU_"_PSUJOB,"COMBOAMIS")=AMIS
S XMCHAN=1
M XMY=PSUXMYS2
D ^XMD
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSUAMC 1625 printed Oct 16, 2024@18:28:02 Page 2
PSUAMC ;BIR/DAM - Combined AMIS Summary Report:21 APR 2004
+1 ;;4.0;PHARMACY BENEFITS MANAGEMENT;**9**;MARCH, 2005;Build 6
+2 ;
+3 ;This routine creates a combined AMIS summary report when
+4 ;the following extracts are run either by the automatic
+5 ;monthly extract or manual selection
+6 ; 1. IV extract
+7 ; 2. UD extract
+8 ; 3. AR/WS extract
+9 ; 4. Prescription extract
+10 ; 6. CS extract
+11 ;
+12 ;
EN ;Entry point. Called from ^PSUCSR2
+1 ;
+2 KILL AMIS
+3 ;
+4 ; start date
SET Y=PSUSDT\1
XECUTE ^DD("DD")
SET PSUDTS=Y
+5 ; end date
SET Y=PSUEDT\1
XECUTE ^DD("DD")
SET PSUDTE=Y
+6 ; * PSU*4*9 - RESET THE PARENT FACILITY
+7 SET X=PSUSNDR
SET DIC=40.8
SET DIC(0)="X"
SET D="C"
DO IX^DIC
+8 KILL DIC,DIC(0),D
+9 SET X=+Y
SET PSUDIVNM=$$VAL^PSUTL(40.8,X,.01)
+10 ;
+11 SET AMIS(1,1)="Monthly AMIS Summary for "_PSUDTS_" through "_PSUDTE_" for "_PSUDIVNM
+12 SET AMIS(1,2)=""
+13 SET AMIS(1,3)=""
+14 ;
+15 MERGE AMIS(2)=^XTMP("PSU_"_PSUJOB,"OPCOMBO")
+16 ;
+17 MERGE AMIS(3)=^XTMP("PSU_"_PSUJOB,"UDCOMBO")
+18 ;
+19 MERGE AMIS(4)=^XTMP("PSU_"_PSUJOB,"ARCOMBO")
+20 ;
+21 MERGE AMIS(5)=^XTMP("PSU_"_PSUJOB,"CSCOMBO")
+22 ;
+23 MERGE AMIS(6)=^XTMP("PSU_"_PSUJOB,"IVCOMBO")
+24 ;
+25 ;Reorganize AMIS array
+26 SET C=1
+27 SET PSUCT=0
+28 FOR
SET PSUCT=$ORDER(AMIS(PSUCT))
if PSUCT=""
QUIT
Begin DoDot:1
+29 SET PSULN=0
+30 FOR
SET PSULN=$ORDER(AMIS(PSUCT,PSULN))
if PSULN=""
QUIT
Begin DoDot:2
+31 SET AMIS(C)=AMIS(PSUCT,PSULN)
+32 SET C=C+1
End DoDot:2
End DoDot:1
+33 ;
+34 DO MAIL
+35 QUIT
+36 ;
MAIL ;Mail combo message
+1 ;
+2 ;Facility #
SET PSUST=$PIECE(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
+3 ;Facility name
SET PSUSTNM=$PIECE(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
+4 ;
+5 SET XMSUB="V. 4.0 PBMAMIS "_PSUMON_" "_PSUST_" "_PSUSTNM
+6 SET XMTEXT="AMIS("
+7 MERGE ^XTMP("PSU_"_PSUJOB,"COMBOAMIS")=AMIS
+8 SET XMCHAN=1
+9 MERGE XMY=PSUXMYS2
+10 DO ^XMD
+11 ;
+12 QUIT