- WV9PST ;HCIOFO/DS-Patch 9 Post-Installation Routine ;1/26/00 16:18
- ;;1.0;WOMEN'S HEALTH;**9**;Jan 10, 2000
- ; Routine converts multiple address lines in WV(790.404 & WV(790.6
- ; to a single COMPLETE ADDRESS entry
- D PROC(790.404)
- D PROC(790.6)
- D QMAIL
- Q
- ;
- PROC(WVFILE) ; Replace mailing address placeholders with |COMPLETE ADDRESS|
- N WVNODE,WVSUB1,WVSUB2,WVX
- S WVSUB1=0
- F S WVSUB1=$O(^WV(WVFILE,WVSUB1)) Q:'WVSUB1 D
- . S WVSUB2=0
- . F S WVSUB2=$O(^WV(WVFILE,WVSUB1,1,WVSUB2)) Q:'WVSUB2 D
- . . S WVNODE=$G(^WV(WVFILE,WVSUB1,1,WVSUB2,0))
- . . Q:WVNODE=""
- . . I WVNODE["|MAILING ADDRESS-STREET|" D
- . . . S WVX=$F(WVNODE,"|"),WVX=WVX-2
- . . . S ^WV(WVFILE,WVSUB1,1,WVSUB2,0)=$$REPEAT^XLFSTR(" ",WVX)_"|COMPLETE ADDRESS|"
- . . . I $G(^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0))["|MAILING ADDRESS-CITY|" D
- . . . . S ^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0)=" "
- . . . . Q
- . . . Q
- . . Q
- . Q
- Q
- QMAIL ; Queue mail message
- N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
- S ZTRTN="MAIL^WV9PST",ZTDESC="WV*1*9 INSTALLED"
- S ZTIO="",ZTDTH=$H
- D ^%ZTLOAD
- Q
- MAIL ; Send message to default case managers to inform them of the changes
- ; made to the address placeholders of the form letters (790.404 & 790.6)
- N XMDUZ,XMSUB,XMTEXT,XMY,WVSITE,WVIEN,WVLINE,WVMSG
- I $D(ZTQUEUED) S ZTREQ="@"
- S (WVLINE,WVSITE)=0
- F S WVSITE=$O(^WV(790.02,WVSITE)) Q:'WVSITE D
- .S WVIEN=$P($G(^WV(790.02,WVSITE,0)),U,2) ;default case manager
- .Q:'WVIEN
- .S XMY(WVIEN)=""
- .Q
- I '$O(XMY(0)) Q
- SEND ; Create and send mail message
- S XMDUZ=.5 ;message sender
- S XMSUB="Women's Health patch #9 installed"
- S WVMSG(+$$LINE())="Patch #9 for the Women's Health package was installed. This patch changes"
- S WVMSG(+$$LINE())="the '|placeholder|' text used in the notification form letter templates to"
- S WVMSG(+$$LINE())="determine the patient's mailing address. Specifically, it replaces:"
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="|MAILING ADDRESS-STREET|"
- S WVMSG(+$$LINE())="|MAILING ADDRESS-CITY|, |MAILING ADDRESS-STATE| |MAILING ADDRESS-ZIP|"
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="with |COMPLETE ADDRESS|."
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="This change will allow the form letter to print mailing addresses that"
- S WVMSG(+$$LINE())="have more than one line for the street address portion."
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="Recommendation: Run the 'Print Notification Purpose & Letter File'"
- S WVMSG(+$$LINE())=" option on the Maintenance Menu."
- S WVMSG(+$$LINE())=" Send the output to a printer."
- S WVMSG(+$$LINE())=" Review the name and address portion of the form letter"
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="The name and address portion should appear as:"
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="|$P(NAME,"","",2)| |$P(NAME,"","")|"
- S WVMSG(+$$LINE())="|COMPLETE ADDRESS|"
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="If not, use the 'Add/Edit a Notification Purpose & Letter option on the"
- S WVMSG(+$$LINE())="Maintenance Menu to edit the form letter text."
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())=" "
- S WVMSG(+$$LINE())="Also, the generic form letter template used to create new form letters"
- S WVMSG(+$$LINE())="was modified to use the |COMPLETE ADDRESS| placeholder to generate the"
- S WVMSG(+$$LINE())="patient's mailing address."
- S XMTEXT="WVMSG("
- D ^XMD
- Q
- LINE() ; Increment line counter by 1
- S WVLINE=+$G(WVLINE)+1
- Q WVLINE
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWV9PST 3487 printed Mar 13, 2025@21:51:34 Page 2
- WV9PST ;HCIOFO/DS-Patch 9 Post-Installation Routine ;1/26/00 16:18
- +1 ;;1.0;WOMEN'S HEALTH;**9**;Jan 10, 2000
- +2 ; Routine converts multiple address lines in WV(790.404 & WV(790.6
- +3 ; to a single COMPLETE ADDRESS entry
- +4 DO PROC(790.404)
- +5 DO PROC(790.6)
- +6 DO QMAIL
- +7 QUIT
- +8 ;
- PROC(WVFILE) ; Replace mailing address placeholders with |COMPLETE ADDRESS|
- +1 NEW WVNODE,WVSUB1,WVSUB2,WVX
- +2 SET WVSUB1=0
- +3 FOR
- SET WVSUB1=$ORDER(^WV(WVFILE,WVSUB1))
- if 'WVSUB1
- QUIT
- Begin DoDot:1
- +4 SET WVSUB2=0
- +5 FOR
- SET WVSUB2=$ORDER(^WV(WVFILE,WVSUB1,1,WVSUB2))
- if 'WVSUB2
- QUIT
- Begin DoDot:2
- +6 SET WVNODE=$GET(^WV(WVFILE,WVSUB1,1,WVSUB2,0))
- +7 if WVNODE=""
- QUIT
- +8 IF WVNODE["|MAILING ADDRESS-STREET|"
- Begin DoDot:3
- +9 SET WVX=$FIND(WVNODE,"|")
- SET WVX=WVX-2
- +10 SET ^WV(WVFILE,WVSUB1,1,WVSUB2,0)=$$REPEAT^XLFSTR(" ",WVX)_"|COMPLETE ADDRESS|"
- +11 IF $GET(^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0))["|MAILING ADDRESS-CITY|"
- Begin DoDot:4
- +12 SET ^WV(WVFILE,WVSUB1,1,(WVSUB2+1),0)=" "
- +13 QUIT
- End DoDot:4
- +14 QUIT
- End DoDot:3
- +15 QUIT
- End DoDot:2
- +16 QUIT
- End DoDot:1
- +17 QUIT
- QMAIL ; Queue mail message
- +1 NEW ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
- +2 SET ZTRTN="MAIL^WV9PST"
- SET ZTDESC="WV*1*9 INSTALLED"
- +3 SET ZTIO=""
- SET ZTDTH=$HOROLOG
- +4 DO ^%ZTLOAD
- +5 QUIT
- 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)
- +2 NEW XMDUZ,XMSUB,XMTEXT,XMY,WVSITE,WVIEN,WVLINE,WVMSG
- +3 IF $DATA(ZTQUEUED)
- SET ZTREQ="@"
- +4 SET (WVLINE,WVSITE)=0
- +5 FOR
- SET WVSITE=$ORDER(^WV(790.02,WVSITE))
- if 'WVSITE
- QUIT
- Begin DoDot:1
- +6 ;default case manager
- SET WVIEN=$PIECE($GET(^WV(790.02,WVSITE,0)),U,2)
- +7 if 'WVIEN
- QUIT
- +8 SET XMY(WVIEN)=""
- +9 QUIT
- End DoDot:1
- +10 IF '$ORDER(XMY(0))
- QUIT
- SEND ; Create and send mail message
- +1 ;message sender
- SET XMDUZ=.5
- +2 SET XMSUB="Women's Health patch #9 installed"
- +3 SET WVMSG(+$$LINE())="Patch #9 for the Women's Health package was installed. This patch changes"
- +4 SET WVMSG(+$$LINE())="the '|placeholder|' text used in the notification form letter templates to"
- +5 SET WVMSG(+$$LINE())="determine the patient's mailing address. Specifically, it replaces:"
- +6 SET WVMSG(+$$LINE())=" "
- +7 SET WVMSG(+$$LINE())="|MAILING ADDRESS-STREET|"
- +8 SET WVMSG(+$$LINE())="|MAILING ADDRESS-CITY|, |MAILING ADDRESS-STATE| |MAILING ADDRESS-ZIP|"
- +9 SET WVMSG(+$$LINE())=" "
- +10 SET WVMSG(+$$LINE())="with |COMPLETE ADDRESS|."
- +11 SET WVMSG(+$$LINE())=" "
- +12 SET WVMSG(+$$LINE())="This change will allow the form letter to print mailing addresses that"
- +13 SET WVMSG(+$$LINE())="have more than one line for the street address portion."
- +14 SET WVMSG(+$$LINE())=" "
- +15 SET WVMSG(+$$LINE())="Recommendation: Run the 'Print Notification Purpose & Letter File'"
- +16 SET WVMSG(+$$LINE())=" option on the Maintenance Menu."
- +17 SET WVMSG(+$$LINE())=" Send the output to a printer."
- +18 SET WVMSG(+$$LINE())=" Review the name and address portion of the form letter"
- +19 SET WVMSG(+$$LINE())=" "
- +20 SET WVMSG(+$$LINE())="The name and address portion should appear as:"
- +21 SET WVMSG(+$$LINE())=" "
- +22 SET WVMSG(+$$LINE())="|$P(NAME,"","",2)| |$P(NAME,"","")|"
- +23 SET WVMSG(+$$LINE())="|COMPLETE ADDRESS|"
- +24 SET WVMSG(+$$LINE())=" "
- +25 SET WVMSG(+$$LINE())="If not, use the 'Add/Edit a Notification Purpose & Letter option on the"
- +26 SET WVMSG(+$$LINE())="Maintenance Menu to edit the form letter text."
- +27 SET WVMSG(+$$LINE())=" "
- +28 SET WVMSG(+$$LINE())=" "
- +29 SET WVMSG(+$$LINE())="Also, the generic form letter template used to create new form letters"
- +30 SET WVMSG(+$$LINE())="was modified to use the |COMPLETE ADDRESS| placeholder to generate the"
- +31 SET WVMSG(+$$LINE())="patient's mailing address."
- +32 SET XMTEXT="WVMSG("
- +33 DO ^XMD
- +34 QUIT
- LINE() ; Increment line counter by 1
- +1 SET WVLINE=+$GET(WVLINE)+1
- +2 QUIT WVLINE
- +3 ;