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

TIU1P305.m

Go to the documentation of this file.
  1. 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
  1. ;
  1. ; call to: $$ADD^XPDMENU - supported by ICR #1157
  1. ; $$FIND1^DIC - supported by ICR #2051
  1. ; $$GET1^DIQ - supported by ICR #2056
  1. ; BMES^XPDUTL - supported by ICR #10141 (same for MES^XPDUTL)
  1. ;
  1. PRE ; clear the multiple field #3 of file #8925.1 in preparation for the text
  1. ; exported by this patch.
  1. K ^TMP("TIU1P305")
  1. D BMES^XPDUTL("Starting Pre-installation operations for patch TIU*1.0*305...")
  1. D BMES^XPDUTL("Preparing to delete the text in the BOILERPLATE TEXT field, please wait...")
  1. N IEN,TIUFILE,TIUFLD,TIUIEN,TIUOLDTL,TIUNAME,TIUTITLE,TIUROOT,WP
  1. ; find any title mapped to the TIU VHA ENTERPRISE STANDARD TITLE "COMPUTER DOWNTIME", #2166, in file #8926.1
  1. S TIUFILE=8925.1,TIUFLD=3,TIUROOT="" ;TIUFLD is the multiple for the Boilerplate Text
  1. D CHKMAP
  1. S TIUTITLE=$P($G(^TMP("TIU1P305",$J)),U,3)
  1. I TIUTITLE']"" G ERR1
  1. S TIUIEN=$$FIND1^DIC(TIUFILE,,"MX",TIUTITLE)
  1. ; get text stored in the multiple before override
  1. I TIUIEN S TIUOLDTL=$$GET1^DIQ(TIUFILE,TIUIEN_",",TIUFLD,"","WP") ; old text comes out in array WP
  1. I '$D(WP) D G EXIT1
  1. . D BMES^XPDUTL("There is no text to delete in field #"_TIUFLD_" of file #"_TIUFILE)
  1. ;
  1. D BMES^XPDUTL("Text in the BOILERPLATE TEXT field before deletion:")
  1. D BMES^XPDUTL("===================================================================")
  1. D BMES^XPDUTL(.WP)
  1. D MES^XPDUTL("===================================================================")
  1. I TIUIEN D WP^DIE(TIUFILE,TIUIEN_",",TIUFLD,"K",TIUROOT)
  1. PRE1 D BMES^XPDUTL("The text found in the BOILERPLATE TEXT field has been deleted.") D EXIT1
  1. Q
  1. ;
  1. POST ; add two new menu options in two menus in TIU
  1. ; [TIU DOWNTIME BOOKMARK PN] and [TIUFPC CREATE POST-SIGNATURE]
  1. ; under [TIU IRM MAINTENANCE MENU] and [TIUF DOCUMENT DEFINITION MGR]
  1. ; respectively
  1. D BMES^XPDUTL("Starting Post-installation operations for patch TIU*1.0*305...")
  1. D ADD1
  1. D ADD2
  1. D EXIT
  1. Q
  1. ;
  1. ADD1 ; update "TIU IRM MAINTENANCE MENU"
  1. N TIUOK,TIUSYN
  1. S TIUSYN=13 ; this can be changed later by the site if desired
  1. ; parameter order: menu to update, option to add, synonym
  1. S TIUOK=$$ADD^XPDMENU("TIU IRM MAINTENANCE MENU","TIU DOWNTIME BOOKMARK PN",TIUSYN)
  1. I TIUOK=1 D
  1. . D BMES^XPDUTL("[TIU DOWNTIME BOOKMARK PN] Option is part of [TIU IRM MAINTENANCE MENU]")
  1. E D G ERR
  1. . D BMES^XPDUTL("Couldn't add option [TIU DOWNTIME BOOKMARK PN] to [TIU IRM MAINTENANCE MENU]")
  1. Q
  1. ;
  1. ADD2 ; update "TIUF DOCUMENT DEFINITION MGR"
  1. N TIUOK,TIUSYN
  1. S TIUSYN=6
  1. ; parameter order: menu to update, option to add, synonym
  1. S TIUOK=$$ADD^XPDMENU("TIUF DOCUMENT DEFINITION MGR","TIUFPC CREATE POST-SIGNATURE",TIUSYN)
  1. I TIUOK=1 D
  1. . D BMES^XPDUTL("[TIUFPC CREATE POST-SIGNATURE] Option is part of [TIUF DOCUMENT DEFINITION MGR]")
  1. E D G ERR
  1. . D BMES^XPDUTL("Couldn't add option [TIUFPC CREATE POST-SIGNATURE] to [TIUF DOCUMENT DEFINITION MGR]")
  1. Q
  1. ;
  1. ERR ; alert the user if there is an error
  1. D BMES^XPDUTL("Unable to attach the menu option")
  1. Q
  1. ;
  1. ERR1 ; alert user if there is an error
  1. D BMES^XPDUTL("Pre-installation check: no local title mapped to title COMPUTER DOWNTIME.")
  1. D MES^XPDUTL("Please resolve this issue by mapping a local title in file #8925.1 to")
  1. D MES^XPDUTL("the TIU VHA ENTERPRISE STANDARD TITLE 'COMPUTER DOWNTIME' in file #8926.1")
  1. D MES^XPDUTL("before running the option 'TIU DOWNTIME BOOKMARK PN'.")
  1. D MES^XPDUTL("Patch installation will continue...")
  1. D EXIT1
  1. Q
  1. ;
  1. EXIT ;
  1. D BMES^XPDUTL("Finished Post-installation of patch TIU*1.0*305.")
  1. Q
  1. ;
  1. EXIT1 ;
  1. D BMES^XPDUTL("Finished Pre-installation of patch TIU*1.0*305.")
  1. K ^TMP("TIU1P305")
  1. Q
  1. ;
  1. 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
  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
  1. Q