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

PSUV0.m

Go to the documentation of this file.
PSUV0 ;BIR/CFL - Master Routine for PBMS IV Module; 09/09/1998
 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN S PSUJOB=$G(PSUJOB,$J),PSUIVSUB="PSUIV_"_PSUJOB
 S X1=PSUSDT,X2=-31
 D C^%DTC K %,%H,%T
 S PSUIVDT=X
 K ^XTMP(PSUIVSUB)
 S X1=DT,X2=6 D C^%DTC K %,%H,%T
 S ^XTMP(PSUIVSUB,0)=X_U_DT_U_"PSU PBM 'IV' STATISTICAL DATA"
 D SECTN^PSUTL1
 D ^PSUV1
 I '$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG")) D EN^PSUV3(.PSUARM)
 ;
 D PULL^PSUCP
 F I=1:1:$L(PSUOPTS,",") S PSUMOD($P(PSUOPTS,",",I))=""
 ;
 I $D(PSUMOD(10)) D IVSSN^PSUDEM4   ;Provider extract
 ;
 ;Patient demographics IV summary report
 I '$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG")) D
 .I '$D(^XTMP("PSU_"_PSUJOB,"PSUMFLAG")) D EN^PSUSUM4
 ;
 K ^XTMP("PSU_"_PSUJOB,"PSUFLAG1")
 ;
 I '$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG")) D EN^PSUV11
 D CLEAN
 Q
PRINT ;Print hard copies of summary reports
 S PSUIVSUB="PSUIV_"_PSUJOB
 D EN^PSUV5
 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 ADTIV,COUNT,DASH,DATA,DFN,DIC,DLM,ENDIT,EXTD,GENRIC,I,INDEX,J,LINE,LNCNT,NONE,OCC
 K PSBAGS,PSDISP,PSECT,PSIVNFI,PSIVNFR,PSLN,PSNAME,REC,RECIND,RECTYP
 K SOLDA,SOLDRUG,SPECPTR,TYPE,VOLUME,X,X1,X2,Y,Z
 D PULL^PSUCP,OPTS^PSUCP
 K PSUIVA,PSUAMIS,LVP,PB,TPN,CH,SYR,AMIS
CLEANQ Q