source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUAR0.m@ 1535

Last change on this file since 1535 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSUAR0 ; BIR/PDW - Master Routine for AR/WS PBMS Extraction ;25 AUG 1998
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3EN ; EP ENTRY FROM PSUCP
4PULL ; pull variables from ^XTMP
5 ;PSUJOB must exist and must be the job number used to store the data desired for this session.
6 I '$D(PSUJOB) S PSUJOB=$J
7 S PSUVARS="PSUSDT,PSUEDT,PSUMON,PSUDUZ,PSUMASF,PSUPBMG,PSUSMRY,ZTIO,PSUSNDR,PSUOPTS"
8 F I=1:1:$L(PSUVARS,",") S @$P(PSUVARS,",",I)=$P(^XTMP("PSU_"_PSUJOB,1),U,I)
9 ;
10 I '$D(PSUJOB) S PSUJOB=$J
11 S PSUVARS="PSUSDT,PSUEDT,PSUMON,PSUDUZ,PSUMASF,PSUPBMG,PSUSMRY,ZTIO,PSUSNDR,PSUOPTS"
12 F I=1:1:$L(PSUVARS,",") S @$P(PSUVARS,",",I)=$P(^XTMP("PSU_"_PSUJOB,1),U,I)
13COMPUTE ;EP for Compute Cycle of AR/WS Extract
14 S PSUARJOB=PSUJOB
15 S PSUARSUB="PSUAR_"_PSUARJOB
16 K ^XTMP(PSUARSUB)
17 S X1=DT,X2=6 D C^%DTC
18 S ^XTMP(PSUARSUB,0)=X_U_DT_"^ Storage for PBMS AR/WS Extract Data"
19 ;
20 ; Save Important Variables
21 S X="PSUSDT,PSUEDT,PSUMON,PSUDUZ,PSUMASF,PSUPBMG,PSUSMRY,PSUSNDR,PSUPRSUB,PSUPRJOB,PSUJOB,PSUOPTN,PSURTN"
22 F I=1:1 S Y=$P(X,",",I) Q:Y="" I $D(@Y) S X(Y)=@Y
23 M ^XTMP(PSUARSUB,"SAVE")=X
24 ;
25 D EN^PSUAR1 ; Gather Data
26 D EN^PSUAR2 ; Build Records from Data
27 D EN^PSUAR3(.PSUARM) ; Mail Message Generator
28 S PSUSUB="PSU_"_PSUJOB
29 I $D(^XTMP(PSUSUB)),PSUMASF M ^XTMP(PSUSUB,"CONFIRM")=PSUARM
30 I $D(^XTMP(PSUSUB)),PSUPBMG M ^XTMP(PSUSUB,"CONFIRM")=PSUARM
31 D EN^PSUAR4 ; Summary Messages
32 D EN^PSUAR6 ; AMIST Summary report
33 K PSUAR,PSUAMIS,AMISAR
34 Q
35 ;
36PRINT ;EP for Print Cycle
37 D EN^PSUAR5
38 Q
39EXIT ;EP for Cleaning up & Restoring variables
40 M Z=^XTMP(PSUARSUB,"SAVE")
41 K ^XTMP(PSUARJOB)
42 ; Kill PSU Variables
43 D VARKILL^PSUTL
44 ; Restore Important Variables
45 S Y="" F S Y=$O(Z(Y)) Q:Y="" S @Y=Z(Y)
46 K Z
47 Q
Note: See TracBrowser for help on using the repository browser.