- TIU1P305 ;AITC/CR - Post Installation for Patch 305 ;12/18/17 3:58pm
- ;;1.0;TEXT INTEGRATION UTILITIES;**305**;JUN 20, 1997;Build 27
- ;
- ; call to: $$ADD^XPDMENU - supported by ICR #1157
- ; $$FIND1^DIC - supported by ICR #2051
- ; $$GET1^DIQ - supported by ICR #2056
- ; BMES^XPDUTL - supported by ICR #10141 (same for MES^XPDUTL)
- ;
- PRE ; clear the multiple field #3 of file #8925.1 in preparation for the text
- ; exported by this patch.
- K ^TMP("TIU1P305")
- D BMES^XPDUTL("Starting Pre-installation operations for patch TIU*1.0*305...")
- D BMES^XPDUTL("Preparing to delete the text in the BOILERPLATE TEXT field, please wait...")
- N IEN,TIUFILE,TIUFLD,TIUIEN,TIUOLDTL,TIUNAME,TIUTITLE,TIUROOT,WP
- ; find any title mapped to the TIU VHA ENTERPRISE STANDARD TITLE "COMPUTER DOWNTIME", #2166, in file #8926.1
- S TIUFILE=8925.1,TIUFLD=3,TIUROOT="" ;TIUFLD is the multiple for the Boilerplate Text
- D CHKMAP
- S TIUTITLE=$P($G(^TMP("TIU1P305",$J)),U,3)
- I TIUTITLE']"" G ERR1
- S TIUIEN=$$FIND1^DIC(TIUFILE,,"MX",TIUTITLE)
- ; get text stored in the multiple before override
- I TIUIEN S TIUOLDTL=$$GET1^DIQ(TIUFILE,TIUIEN_",",TIUFLD,"","WP") ; old text comes out in array WP
- I '$D(WP) D G EXIT1
- . D BMES^XPDUTL("There is no text to delete in field #"_TIUFLD_" of file #"_TIUFILE)
- ;
- D BMES^XPDUTL("Text in the BOILERPLATE TEXT field before deletion:")
- D BMES^XPDUTL("===================================================================")
- D BMES^XPDUTL(.WP)
- D MES^XPDUTL("===================================================================")
- I TIUIEN D WP^DIE(TIUFILE,TIUIEN_",",TIUFLD,"K",TIUROOT)
- PRE1 D BMES^XPDUTL("The text found in the BOILERPLATE TEXT field has been deleted.") D EXIT1
- Q
- ;
- POST ; add two new menu options in two menus in TIU
- ; [TIU DOWNTIME BOOKMARK PN] and [TIUFPC CREATE POST-SIGNATURE]
- ; under [TIU IRM MAINTENANCE MENU] and [TIUF DOCUMENT DEFINITION MGR]
- ; respectively
- D BMES^XPDUTL("Starting Post-installation operations for patch TIU*1.0*305...")
- D ADD1
- D ADD2
- D EXIT
- Q
- ;
- ADD1 ; update "TIU IRM MAINTENANCE MENU"
- N TIUOK,TIUSYN
- S TIUSYN=13 ; this can be changed later by the site if desired
- ; parameter order: menu to update, option to add, synonym
- S TIUOK=$$ADD^XPDMENU("TIU IRM MAINTENANCE MENU","TIU DOWNTIME BOOKMARK PN",TIUSYN)
- I TIUOK=1 D
- . D BMES^XPDUTL("[TIU DOWNTIME BOOKMARK PN] Option is part of [TIU IRM MAINTENANCE MENU]")
- E D G ERR
- . D BMES^XPDUTL("Couldn't add option [TIU DOWNTIME BOOKMARK PN] to [TIU IRM MAINTENANCE MENU]")
- Q
- ;
- ADD2 ; update "TIUF DOCUMENT DEFINITION MGR"
- N TIUOK,TIUSYN
- S TIUSYN=6
- ; parameter order: menu to update, option to add, synonym
- S TIUOK=$$ADD^XPDMENU("TIUF DOCUMENT DEFINITION MGR","TIUFPC CREATE POST-SIGNATURE",TIUSYN)
- I TIUOK=1 D
- . D BMES^XPDUTL("[TIUFPC CREATE POST-SIGNATURE] Option is part of [TIUF DOCUMENT DEFINITION MGR]")
- E D G ERR
- . D BMES^XPDUTL("Couldn't add option [TIUFPC CREATE POST-SIGNATURE] to [TIUF DOCUMENT DEFINITION MGR]")
- Q
- ;
- ERR ; alert the user if there is an error
- D BMES^XPDUTL("Unable to attach the menu option")
- Q
- ;
- ERR1 ; alert user if there is an error
- D BMES^XPDUTL("Pre-installation check: no local title mapped to title COMPUTER DOWNTIME.")
- D MES^XPDUTL("Please resolve this issue by mapping a local title in file #8925.1 to")
- D MES^XPDUTL("the TIU VHA ENTERPRISE STANDARD TITLE 'COMPUTER DOWNTIME' in file #8926.1")
- D MES^XPDUTL("before running the option 'TIU DOWNTIME BOOKMARK PN'.")
- D MES^XPDUTL("Patch installation will continue...")
- D EXIT1
- Q
- ;
- EXIT ;
- D BMES^XPDUTL("Finished Post-installation of patch TIU*1.0*305.")
- Q
- ;
- EXIT1 ;
- D BMES^XPDUTL("Finished Pre-installation of patch TIU*1.0*305.")
- K ^TMP("TIU1P305")
- Q
- ;
- CHKMAP ; look for a local title mapped to the TIU VHA ENTERPRISE STANDARD TITLE 'COMPUTER DOWNTIME' (IEN=2166)
- ; TIUNAME is the title in file #8925.1 mapped to the record #2166 in file #8926.1
- F IEN=0:0 S IEN=$O(^TIU(8925.1,IEN)) Q:'IEN I $$GET1^DIQ(8925.1,+IEN,1501,"I")=2166 S TIUTITLE=$$GET1^DIQ(8925.1,+IEN,1501,"E"),TIUIEN=+IEN,TIUNAME=$$GET1^DIQ(8925.1,+IEN,.01,"E"),^TMP("TIU1P305",$J)=TIUTITLE_U_IEN_U_TIUNAME
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIU1P305 4236 printed Feb 19, 2025@00:04:55 Page 2
- TIU1P305 ;AITC/CR - Post Installation for Patch 305 ;12/18/17 3:58pm
- +1 ;;1.0;TEXT INTEGRATION UTILITIES;**305**;JUN 20, 1997;Build 27
- +2 ;
- +3 ; call to: $$ADD^XPDMENU - supported by ICR #1157
- +4 ; $$FIND1^DIC - supported by ICR #2051
- +5 ; $$GET1^DIQ - supported by ICR #2056
- +6 ; BMES^XPDUTL - supported by ICR #10141 (same for MES^XPDUTL)
- +7 ;
- PRE ; clear the multiple field #3 of file #8925.1 in preparation for the text
- +1 ; exported by this patch.
- +2 KILL ^TMP("TIU1P305")
- +3 DO BMES^XPDUTL("Starting Pre-installation operations for patch TIU*1.0*305...")
- +4 DO BMES^XPDUTL("Preparing to delete the text in the BOILERPLATE TEXT field, please wait...")
- +5 NEW IEN,TIUFILE,TIUFLD,TIUIEN,TIUOLDTL,TIUNAME,TIUTITLE,TIUROOT,WP
- +6 ; find any title mapped to the TIU VHA ENTERPRISE STANDARD TITLE "COMPUTER DOWNTIME", #2166, in file #8926.1
- +7 ;TIUFLD is the multiple for the Boilerplate Text
- SET TIUFILE=8925.1
- SET TIUFLD=3
- SET TIUROOT=""
- +8 DO CHKMAP
- +9 SET TIUTITLE=$PIECE($GET(^TMP("TIU1P305",$JOB)),U,3)
- +10 IF TIUTITLE']""
- GOTO ERR1
- +11 SET TIUIEN=$$FIND1^DIC(TIUFILE,,"MX",TIUTITLE)
- +12 ; get text stored in the multiple before override
- +13 ; old text comes out in array WP
- IF TIUIEN
- SET TIUOLDTL=$$GET1^DIQ(TIUFILE,TIUIEN_",",TIUFLD,"","WP")
- +14 IF '$DATA(WP)
- Begin DoDot:1
- +15 DO BMES^XPDUTL("There is no text to delete in field #"_TIUFLD_" of file #"_TIUFILE)
- End DoDot:1
- GOTO EXIT1
- +16 ;
- +17 DO BMES^XPDUTL("Text in the BOILERPLATE TEXT field before deletion:")
- +18 DO BMES^XPDUTL("===================================================================")
- +19 DO BMES^XPDUTL(.WP)
- +20 DO MES^XPDUTL("===================================================================")
- +21 IF TIUIEN
- DO WP^DIE(TIUFILE,TIUIEN_",",TIUFLD,"K",TIUROOT)
- PRE1 DO BMES^XPDUTL("The text found in the BOILERPLATE TEXT field has been deleted.")
- DO EXIT1
- +1 QUIT
- +2 ;
- POST ; add two new menu options in two menus in TIU
- +1 ; [TIU DOWNTIME BOOKMARK PN] and [TIUFPC CREATE POST-SIGNATURE]
- +2 ; under [TIU IRM MAINTENANCE MENU] and [TIUF DOCUMENT DEFINITION MGR]
- +3 ; respectively
- +4 DO BMES^XPDUTL("Starting Post-installation operations for patch TIU*1.0*305...")
- +5 DO ADD1
- +6 DO ADD2
- +7 DO EXIT
- +8 QUIT
- +9 ;
- ADD1 ; update "TIU IRM MAINTENANCE MENU"
- +1 NEW TIUOK,TIUSYN
- +2 ; this can be changed later by the site if desired
- SET TIUSYN=13
- +3 ; parameter order: menu to update, option to add, synonym
- +4 SET TIUOK=$$ADD^XPDMENU("TIU IRM MAINTENANCE MENU","TIU DOWNTIME BOOKMARK PN",TIUSYN)
- +5 IF TIUOK=1
- Begin DoDot:1
- +6 DO BMES^XPDUTL("[TIU DOWNTIME BOOKMARK PN] Option is part of [TIU IRM MAINTENANCE MENU]")
- End DoDot:1
- +7 IF '$TEST
- Begin DoDot:1
- +8 DO BMES^XPDUTL("Couldn't add option [TIU DOWNTIME BOOKMARK PN] to [TIU IRM MAINTENANCE MENU]")
- End DoDot:1
- GOTO ERR
- +9 QUIT
- +10 ;
- ADD2 ; update "TIUF DOCUMENT DEFINITION MGR"
- +1 NEW TIUOK,TIUSYN
- +2 SET TIUSYN=6
- +3 ; parameter order: menu to update, option to add, synonym
- +4 SET TIUOK=$$ADD^XPDMENU("TIUF DOCUMENT DEFINITION MGR","TIUFPC CREATE POST-SIGNATURE",TIUSYN)
- +5 IF TIUOK=1
- Begin DoDot:1
- +6 DO BMES^XPDUTL("[TIUFPC CREATE POST-SIGNATURE] Option is part of [TIUF DOCUMENT DEFINITION MGR]")
- End DoDot:1
- +7 IF '$TEST
- Begin DoDot:1
- +8 DO BMES^XPDUTL("Couldn't add option [TIUFPC CREATE POST-SIGNATURE] to [TIUF DOCUMENT DEFINITION MGR]")
- End DoDot:1
- GOTO ERR
- +9 QUIT
- +10 ;
- ERR ; alert the user if there is an error
- +1 DO BMES^XPDUTL("Unable to attach the menu option")
- +2 QUIT
- +3 ;
- ERR1 ; alert user if there is an error
- +1 DO BMES^XPDUTL("Pre-installation check: no local title mapped to title COMPUTER DOWNTIME.")
- +2 DO MES^XPDUTL("Please resolve this issue by mapping a local title in file #8925.1 to")
- +3 DO MES^XPDUTL("the TIU VHA ENTERPRISE STANDARD TITLE 'COMPUTER DOWNTIME' in file #8926.1")
- +4 DO MES^XPDUTL("before running the option 'TIU DOWNTIME BOOKMARK PN'.")
- +5 DO MES^XPDUTL("Patch installation will continue...")
- +6 DO EXIT1
- +7 QUIT
- +8 ;
- EXIT ;
- +1 DO BMES^XPDUTL("Finished Post-installation of patch TIU*1.0*305.")
- +2 QUIT
- +3 ;
- EXIT1 ;
- +1 DO BMES^XPDUTL("Finished Pre-installation of patch TIU*1.0*305.")
- +2 KILL ^TMP("TIU1P305")
- +3 QUIT
- +4 ;
- CHKMAP ; look for a local title mapped to the TIU VHA ENTERPRISE STANDARD TITLE 'COMPUTER DOWNTIME' (IEN=2166)
- +1 ; TIUNAME is the title in file #8925.1 mapped to the record #2166 in file #8926.1
- +2 FOR IEN=0:0
- SET IEN=$ORDER(^TIU(8925.1,IEN))
- if 'IEN
- QUIT
- IF $$GET1^DIQ(8925.1,+IEN,1501,"I")=2166
- SET TIUTITLE=$$GET1^DIQ(8925.1,+IEN,1501,"E")
- SET TIUIEN=+IEN
- SET TIUNAME=$$GET1^DIQ(8925.1,+IEN,.01,"E")
- SET ^TMP("TIU1P305",$JOB)=TIUTITLE_U_IEN_U_TIUNAME
- +3 QUIT