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

PSUVIT2.m

Go to the documentation of this file.
  1. PSUVIT2 ;BIR/RDC - Vitals/Immunizations Mail Messages; 24 DEC 2003
  1. ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
  1. ;
  1. ;DBIAs
  1. ;
  1. VIMAIL ;ENtry point for Vitals/Immunizations Mail Message
  1. ;
  1. S DOMSG=""
  1. S XMCHAN=1
  1. S XMDUZ=DUZ
  1. S MSGTOT=$G(^XTMP("PSU_"_PSUJOB,"PSUVI","MSGTCNT"))
  1. S:MSGTOT="" MSGTOT=1
  1. S LINECNT=$G(^XTMP("PSU_"_PSUJOB,"PSUVI","LINECNT"))
  1. S:LINECNT=0 LINECNT=1
  1. ; ** SET THE HEADER DATA
  1. S X=$$VALI^PSUTL(4.3,1,217)
  1. S PSUVFAC=+$$VAL^PSUTL(4,X,99)
  1. ;
  1. S X=PSUVFAC,DIC=40.8,DIC(0)="X",D="C" D IX^DIC
  1. S X=+Y S PSUVDIV=$$VAL^PSUTL(40.8,X,.01)
  1. ;
  1. I $G(PSUMASF)!$G(PSUDUZ)!$G(PSUPBMG) S DOMSG=1 D
  1. . I '$D(^XTMP("PSU_"_PSUJOB,"PSUVI","MSGTCNT")) D Q ; quit - no data
  1. .. S CURMSG=1
  1. .. S XMSUB="V. 4.0 PBMVI"_" "_PSUMON_" "_CURMSG_"/"_MSGTOT_" "_PSUVFAC_" "_PSUVDIV
  1. .. S ^XTMP("PSU_"_PSUJOB,"PSUVI","ERR",1)="No data to report"
  1. .. S XMTEXT="^XTMP(""PSU_"_PSUJOB_""",""PSUVI"",""ERR"","
  1. .. M XMY=PSUXMYS1
  1. .. D ^XMD
  1. . ; ** there are messages - send them **
  1. . F CURMSG=1:1:MSGTOT D
  1. .. S XMSUB="V. 4.0 PBMVI"_" "_PSUMON_" "_CURMSG_"/"_MSGTOT_" "_PSUVFAC_" "_PSUVDIV
  1. .. S XMTEXT="^XTMP(""PSU_"_PSUJOB_""",""PSUVI"","_CURMSG_","
  1. .. M XMY=PSUXMYH
  1. .. D ^XMD
  1. I DOMSG D ; ** CONFIRMATION MESSAGE **
  1. . S ^XTMP("PSU_"_PSUJOB,"CONFIRM",PSUVFAC,12,"L")=LINECNT
  1. . S ^XTMP("PSU_"_PSUJOB,"CONFIRM",PSUVFAC,12,"M")=MSGTOT
  1. ;
  1. Q
  1. ;