source: FOIAVistA/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUDEM5.m@ 1671

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

initial load of FOIAVistA 6/30/08 version

File size: 4.4 KB
Line 
1PSUDEM5 ;BIR/DAM - Patient Demographics Mail Messages ; 20 DEC 2001
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3 ;
4PDMAIL ;EN Mail patient demographics message
5 ;
6 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
7 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto extract
8 ;
9 D VAR
10 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
11 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
12 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
13 I $G(^XTMP("PSU_"_PSUJOB,"REXMIT"))="YES" S PSUMON=PSURMON
14 S XMDUZ=DUZ
15 S XMSUB="V. 4.0 PBMPD"_" "_PSUMON_" "_PSUM_"/"_PSUMC_" "_PSUST_" "_PSUSTNM
16 S XMCHAN=1
17 ;S PSUPBMG=^XTMP("PSU_"_PSUJOB,"PSUPBMG")
18 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUXMD"",PSUM,"
19 I PSUMASF!PSUDUZ!PSUPBMG D
20 .I 'PSUSMRY M XMY=PSUXMYH D ;Detailed message to Hines and self
21 .D ^XMD
22 Q
23 ;
24AUTO ;Find month if auto extract is run
25 ;
26 D NOW^%DTC S PSUMON=$S('$D(DT):X,1:DT),PSUMON=$E(PSUMON,1,5)-1 ;Prior mt
27 I $E(PSUMON,4,5)="00" S PSUMON=($E(PSUMON,1,3)-1)_"12"
28 S ^XTMP("PSU_"_PSUJOB,"PSUMONTH")=PSUMON
29 Q
30 ;
31VAR ;Get variables common to all extract messages
32 ;
33 N PSUSTNM,PSUST,PSUMON
34 D INST^PSUDEM1
35 ;
36 Q
37 ;
38PROV ;EN Mail Provider message
39 ;
40 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
41 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto
42 D VAR
43 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
44 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
45 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
46 ;
47 S XMCHAN=1
48 S XMDUZ=DUZ
49 S XMSUB="V. 4.0 PBMPRO"_" "_PSUMON_" "_PSUM_"/"_PSUMC_" "_PSUST_" "_PSUSTNM
50 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUXMD"",PSUM,"
51 I PSUMASF!PSUDUZ!PSUPBMG D
52 .I 'PSUSMRY M XMY=PSUXMYH D ;Detailed message to Hines and self
53 .D ^XMD
54 Q
55 ;
56OPV ;EN Outpatient encounter message
57 ;
58 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
59 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto
60 D VAR
61 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
62 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
63 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
64 I '$D(^XTMP("PSU_"_PSUJOB,"PSUOPV")) S PSUMC=1
65 ;
66 S XMDUZ=DUZ
67 S XMSUB="V. 4.0 PBMOV"_" "_PSUMON_" "_PSUM_"/"_PSUMC_" "_PSUST_" "_PSUSTNM
68 S XMCHAN=1
69 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUXMD"",PSUM,"
70 I PSUMASF!PSUDUZ!PSUPBMG D
71 .I 'PSUSMRY M XMY=PSUXMYH D ;Detailed message to Hines and self
72 .D ^XMD
73 I '$D(^XTMP("PSU_"_PSUJOB,"PSUOPV")) M XMY=PSUXMYS1 D ;NODATA message
74 .D ^XMD
75 ;K ^XTMP("PSU_"_PSUJOB,"PSUMONTH")
76 Q
77 ;
78PTF ;EN INPATIENT RECORD MESSAGE
79 ;
80 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
81 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto
82 D VAR
83 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
84 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
85 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
86 I '$D(^XTMP("PSU_"_PSUJOB,"PSUIPV")) S PSUMC=1
87 ;
88 S XMDUZ=DUZ
89 S XMSUB="V. 4.0 PBMPTF"_" "_PSUMON_" "_PSUM_"/"_PSUMC_" "_PSUST_" "_PSUSTNM
90 S XMCHAN=1
91 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUXMD"",PSUM,"
92 I PSUMASF!PSUDUZ!PSUPBMG D
93 .I 'PSUSMRY M XMY=PSUXMYH D ;Detailed message to Hines and self
94 .D ^XMD
95 I '$D(^XTMP("PSU_"_PSUJOB,"PSUIPV")) M XMY=PSUXMYS1 D ;NODATA message
96 .D ^XMD
97 Q
98 ;
99PRSUM ;EN Provider summary message
100 ;
101 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
102 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto
103 D VAR
104 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
105 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
106 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
107 ;
108 S XMDUZ=DUZ
109 S XMCHAN=1
110 S XMSUB="V. 4.0 PBMPRO"_" "_PSUMON_" "_PSUST_" "_PSUSTNM
111 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUSUM"","
112 M XMY=PSUXMYS1
113 I PSUSMRY=1 M XMY=PSUXMYS2 ;Summary only mailgroup
114 D ^XMD
115 Q
116 ;
117PDSUM ;EN Pt. demographics summary message
118 ;
119 Q:$D(^XTMP("PSU_"_PSUJOB,"PSUFLAG3")) ;don't send a mailman message if flag is set
120 ;N PSUSTNM,PSUST
121 D PULL^PSUCP
122 I '$D(^XTMP("PSU_"_PSUJOB,"PSUMONTH")) D AUTO ;Find month if auto
123 D VAR
124 S PSUST=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,1)
125 S PSUSTNM=$P(^XTMP("PSU_"_PSUJOB,"PSUSITE"),U,2)
126 S PSUMON=$P(^XTMP("PSU_"_PSUJOB,"PSUMONTH"),U,1)
127 ;
128 S XMDUZ=DUZ
129 S XMCHAN=1
130 S XMSUB="V. 4.0 PBMPD"_" "_PSUMON_" "_PSUST_" "_PSUSTNM
131 S XMTEXT="^XTMP(""PSU_""_PSUJOB,""PSUSUMA"","
132 I PSUSMRY=1 M XMY=PSUXMYS2 ;Summary only mailgroup
133 M XMY=PSUXMYS1 ;No Data mailgroup
134 D ^XMD
135 Q
Note: See TracBrowser for help on using the repository browser.