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

WV9PST.m

Go to the documentation of this file.
  1. WV9PST ;HCIOFO/DS-Patch 9 Post-Installation Routine ;1/26/00 16:18
  1. ;;1.0;WOMEN'S HEALTH;**9**;Jan 10, 2000
  1. ; Routine converts multiple address lines in WV(790.404 & WV(790.6
  1. ; to a single COMPLETE ADDRESS entry
  1. D PROC(790.404)
  1. D PROC(790.6)
  1. D QMAIL
  1. Q
  1. ;
  1. PROC(WVFILE) ; Replace mailing address placeholders with |COMPLETE ADDRESS|
  1. N WVNODE,WVSUB1,WVSUB2,WVX
  1. S WVSUB1=0
  1. F S WVSUB1=$O(^WV(WVFILE,WVSUB1)) Q:'WVSUB1 D
  1. . S WVSUB2=0
  1. . F S WVSUB2=$O(^WV(WVFILE,WVSUB1,1,WVSUB2)) Q:'WVSUB2 D
  1. . . S WVNODE=$G(^WV(WVFILE,WVSUB1,1,WVSUB2,0))
  1. . . Q:WVNODE=""
  1. . . I WVNODE["|MAILING ADDRESS-STREET|" D
  1. . . . S WVX=$F(WVNODE,"|"),WVX=WVX-2
  1. . . . S ^WV(WVFILE,WVSUB1,1,WVSUB2,0)=$$REPEAT^XLFSTR(" ",WVX)_"|COMPLETE ADDRESS|"
  1. . . . I $G(^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0))["|MAILING ADDRESS-CITY|" D
  1. . . . . S ^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0)=" "
  1. . . . . Q
  1. . . . Q
  1. . . Q
  1. . Q
  1. Q
  1. QMAIL ; Queue mail message
  1. N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
  1. S ZTRTN="MAIL^WV9PST",ZTDESC="WV*1*9 INSTALLED"
  1. S ZTIO="",ZTDTH=$H
  1. D ^%ZTLOAD
  1. Q
  1. MAIL ; Send message to default case managers to inform them of the changes
  1. ; made to the address placeholders of the form letters (790.404 & 790.6)
  1. N XMDUZ,XMSUB,XMTEXT,XMY,WVSITE,WVIEN,WVLINE,WVMSG
  1. I $D(ZTQUEUED) S ZTREQ="@"
  1. S (WVLINE,WVSITE)=0
  1. F S WVSITE=$O(^WV(790.02,WVSITE)) Q:'WVSITE D
  1. .S WVIEN=$P($G(^WV(790.02,WVSITE,0)),U,2) ;default case manager
  1. .Q:'WVIEN
  1. .S XMY(WVIEN)=""
  1. .Q
  1. I '$O(XMY(0)) Q
  1. SEND ; Create and send mail message
  1. S XMDUZ=.5 ;message sender
  1. S XMSUB="Women's Health patch #9 installed"
  1. S WVMSG(+$$LINE())="Patch #9 for the Women's Health package was installed. This patch changes"
  1. S WVMSG(+$$LINE())="the '|placeholder|' text used in the notification form letter templates to"
  1. S WVMSG(+$$LINE())="determine the patient's mailing address. Specifically, it replaces:"
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="|MAILING ADDRESS-STREET|"
  1. S WVMSG(+$$LINE())="|MAILING ADDRESS-CITY|, |MAILING ADDRESS-STATE| |MAILING ADDRESS-ZIP|"
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="with |COMPLETE ADDRESS|."
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="This change will allow the form letter to print mailing addresses that"
  1. S WVMSG(+$$LINE())="have more than one line for the street address portion."
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="Recommendation: Run the 'Print Notification Purpose & Letter File'"
  1. S WVMSG(+$$LINE())=" option on the Maintenance Menu."
  1. S WVMSG(+$$LINE())=" Send the output to a printer."
  1. S WVMSG(+$$LINE())=" Review the name and address portion of the form letter"
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="The name and address portion should appear as:"
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="|$P(NAME,"","",2)| |$P(NAME,"","")|"
  1. S WVMSG(+$$LINE())="|COMPLETE ADDRESS|"
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="If not, use the 'Add/Edit a Notification Purpose & Letter option on the"
  1. S WVMSG(+$$LINE())="Maintenance Menu to edit the form letter text."
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())=" "
  1. S WVMSG(+$$LINE())="Also, the generic form letter template used to create new form letters"
  1. S WVMSG(+$$LINE())="was modified to use the |COMPLETE ADDRESS| placeholder to generate the"
  1. S WVMSG(+$$LINE())="patient's mailing address."
  1. S XMTEXT="WVMSG("
  1. D ^XMD
  1. Q
  1. LINE() ; Increment line counter by 1
  1. S WVLINE=+$G(WVLINE)+1
  1. Q WVLINE
  1. ;