source: WorldVistAEHR/trunk/r/PHARMACY_BENEFITS_MANAGEMENT-PSU/PSUVIT2.m@ 1093

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1PSUVIT2 ;BIR/RDC - Vitals/Immunizations Mail Messages; 24 DEC 2003
2 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
3 ;
4 ;DBIAs
5 ;
6VIMAIL ;ENtry point for Vitals/Immunizations Mail Message
7 ;
8 S DOMSG=""
9 S XMCHAN=1
10 S XMDUZ=DUZ
11 S MSGTOT=$G(^XTMP("PSU_"_PSUJOB,"PSUVI","MSGTCNT"))
12 S:MSGTOT="" MSGTOT=1
13 S LINECNT=$G(^XTMP("PSU_"_PSUJOB,"PSUVI","LINECNT"))
14 S:LINECNT=0 LINECNT=1
15 ; ** SET THE HEADER DATA
16 S X=$$VALI^PSUTL(4.3,1,217)
17 S PSUVFAC=+$$VAL^PSUTL(4,X,99)
18 ;
19 S X=PSUVFAC,DIC=40.8,DIC(0)="X",D="C" D IX^DIC
20 S X=+Y S PSUVDIV=$$VAL^PSUTL(40.8,X,.01)
21 ;
22 I $G(PSUMASF)!$G(PSUDUZ)!$G(PSUPBMG) S DOMSG=1 D
23 . I '$D(^XTMP("PSU_"_PSUJOB,"PSUVI","MSGTCNT")) D Q ; quit - no data
24 .. S CURMSG=1
25 .. S XMSUB="V. 4.0 PBMVI"_" "_PSUMON_" "_CURMSG_"/"_MSGTOT_" "_PSUVFAC_" "_PSUVDIV
26 .. S ^XTMP("PSU_"_PSUJOB,"PSUVI","ERR",1)="No data to report"
27 .. S XMTEXT="^XTMP(""PSU_"_PSUJOB_""",""PSUVI"",""ERR"","
28 .. M XMY=PSUXMYS1
29 .. D ^XMD
30 . ; ** there are messages - send them **
31 . F CURMSG=1:1:MSGTOT D
32 .. S XMSUB="V. 4.0 PBMVI"_" "_PSUMON_" "_CURMSG_"/"_MSGTOT_" "_PSUVFAC_" "_PSUVDIV
33 .. S XMTEXT="^XTMP(""PSU_"_PSUJOB_""",""PSUVI"","_CURMSG_","
34 .. M XMY=PSUXMYH
35 .. D ^XMD
36 I DOMSG D ; ** CONFIRMATION MESSAGE **
37 . S ^XTMP("PSU_"_PSUJOB,"CONFIRM",PSUVFAC,12,"L")=LINECNT
38 . S ^XTMP("PSU_"_PSUJOB,"CONFIRM",PSUVFAC,12,"M")=MSGTOT
39 ;
40 Q
41 ;
Note: See TracBrowser for help on using the repository browser.