Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSUAMC

PSUAMC.m

Go to the documentation of this file.
  1. PSUAMC ;BIR/DAM - Combined AMIS Summary Report:21 APR 2004
  1. ;;4.0;PHARMACY BENEFITS MANAGEMENT;**9**;MARCH, 2005;Build 6
  1. ;
  1. ;This routine creates a combined AMIS summary report when
  1. ;the following extracts are run either by the automatic
  1. ;monthly extract or manual selection
  1. ; 1. IV extract
  1. ; 2. UD extract
  1. ; 3. AR/WS extract
  1. ; 4. Prescription extract
  1. ; 6. CS extract
  1. ;
  1. ;
  1. EN ;Entry point. Called from ^PSUCSR2
  1. ;
  1. K AMIS
  1. ;
  1. S Y=PSUSDT\1 X ^DD("DD") S PSUDTS=Y ; start date
  1. S Y=PSUEDT\1 X ^DD("DD") S PSUDTE=Y ; end date
  1. ; * PSU*4*9 - RESET THE PARENT FACILITY
  1. S X=PSUSNDR,DIC=40.8,DIC(0)="X",D="C" D IX^DIC
  1. K DIC,DIC(0),D
  1. S X=+Y S PSUDIVNM=$$VAL^PSUTL(40.8,X,.01)
  1. ;
  1. S AMIS(1,1)="Monthly AMIS Summary for "_PSUDTS_" through "_PSUDTE_" for "_PSUDIVNM
  1. S AMIS(1,2)=""
  1. S AMIS(1,3)=""
  1. ;
  1. M AMIS(2)=^XTMP("PSU_"_PSUJOB,"OPCOMBO")
  1. ;
  1. M AMIS(3)=^XTMP("PSU_"_PSUJOB,"UDCOMBO")
  1. ;
  1. M AMIS(4)=^XTMP("PSU_"_PSUJOB,"ARCOMBO")
  1. ;
  1. M AMIS(5)=^XTMP("PSU_"_PSUJOB,"CSCOMBO")
  1. ;
  1. M AMIS(6)=^XTMP("PSU_"_PSUJOB,"IVCOMBO")
  1. ;
  1. ;Reorganize AMIS array
  1. S C=1
  1. S PSUCT=0
  1. F S PSUCT=$O(AMIS(PSUCT)) Q:PSUCT="" D
  1. .S PSULN=0
  1. .F S PSULN=$O(AMIS(PSUCT,PSULN)) Q:PSULN="" D
  1. ..S AMIS(C)=AMIS(PSUCT,PSULN)
  1. ..S C=C+1
  1. ;
  1. D MAIL
  1. Q
  1. ;
  1. MAIL ;Mail combo message
  1. ;
  1. S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1) ;Facility #
  1. S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2) ;Facility name
  1. ;
  1. S XMSUB="V. 4.0 PBMAMIS "_PSUMON_" "_PSUST_" "_PSUSTNM
  1. S XMTEXT="AMIS("
  1. M ^XTMP("PSU_"_PSUJOB,"COMBOAMIS")=AMIS
  1. S XMCHAN=1
  1. M XMY=PSUXMYS2
  1. D ^XMD
  1. ;
  1. Q