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

DG531075P.m

Go to the documentation of this file.
  1. DG531075P ;ALB/JAM - DG*5.3*1075 INSTALL UTILITY;07/12/2021 15:21pm
  1. ;;5.3;Registration;**1075**;Jan 26 2022;Build 13
  1. ;
  1. QUIT ;No direct entry
  1. ;
  1. ;---------------------------------------------------------------------------
  1. ;Patch DG*5.3*1075: Environment, Pre-Install, and Post-Install entry points.
  1. ;---------------------------------------------------------------------------
  1. ;
  1. ; Reference to DIEZ^DIKCUTL3 supported by ICR #3352
  1. ; Reference to BMES^XPDUTL supported by ICR #10141
  1. ; Reference to MES^XPDUTL supported by ICR #10141
  1. ; Reference to DELIX^DDMOD supported by ICR #2916
  1. ;
  1. ; This routine is also used as an Environmental Check routine, though it does nothing except make the HELP
  1. ; tag below available for the Installation question in the build.
  1. Q
  1. ;
  1. HELP ; Help for ?? on Installation Question POS1 (use direct writes in env check routine)
  1. W !,"Enter 1 if patch is being installed in a Pre-Production (Mirror) system."
  1. W !,"Enter 2 if patch is being installed in a Software Quality Assurance system."
  1. W !,"Enter 3 if patch is being installed in a Development system."
  1. Q
  1. ;
  1. ENV ;Main entry point for Environment check
  1. Q
  1. ;
  1. PRE ;Main entry point for Pre-Install items
  1. D BMES^XPDUTL(">>> Beginning the DG*5.3*1075 Pre-install routine...")
  1. D PRE1
  1. D BMES^XPDUTL(">>> Patch DG*5.3*1075 - Pre-install complete.")
  1. Q
  1. ;
  1. PRE1 ; ;Remove non-SAC compliant trigger on ELIGIBILITY field #.01 of PATIENT ELIGIBILITIES subfile #361 for PATIENT file #2
  1. ; ^^TRIGGER^2.0361^.03
  1. ; The patch DG*5.3*1075 will replace this with an updated trigger
  1. ;
  1. D BMES^XPDUTL(" o Removing non-SAC compliant trigger on ELIGIBILITY (#.01) field")
  1. D MES^XPDUTL(" of the PATIENT ELIGIBILITIES (#361) subfile")
  1. D MES^XPDUTL(" of the PATIENT (#2) file")
  1. N DGFILE,DGFIELD,DGREF
  1. S DGFILE=2.0361,DGFIELD=.01,DGREF=3
  1. D DELIX^DDMOD(DGFILE,DGFIELD,DGREF)
  1. Q
  1. POST ;Main entry point for Post-Install items
  1. ;
  1. D BMES^XPDUTL(">>> Beginning the DG*5.3*1075 Post-install routine...")
  1. D POST1
  1. D POST2
  1. D POST3
  1. D POST4
  1. D BMES^XPDUTL(">>> Patch DG*5.3*1075 - Post-install complete.")
  1. Q
  1. ;
  1. POST1 ; Modify port/host DG EE SUMMARY SERVER and SEVICE
  1. ; ICRs:
  1. ; 7190 : Read access to file 18.02
  1. ; 7191 : R/W access to file 18.12
  1. ;
  1. N DGSRVR,DGIEN
  1. D BMES^XPDUTL(" o Modify DG EE SUMMARY SERVER Endpoint and Port...")
  1. S DGSRVR="DG EE SUMMARY SERVER"
  1. ; Get the IEN of the DG EE SUMMARY SERVER - if not found, notify user of the problem
  1. S DGIEN=$$FIND1^DIC(18.12,,"B",DGSRVR)
  1. I 'DGIEN D Q
  1. . D BMES^XPDUTL("*** ERROR! ***")
  1. . D MES^XPDUTL(" - DG EE SUMMARY SERVER missing from WEB SERVER file (#18.12)")
  1. . D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
  1. . D MES^XPDUTL(" for assistance.")
  1. ; Set the DG EE SUMMARY SERVER to DISABLED so the update of the server won't cause errors
  1. ; The patch installation will set it back to ENABLED.
  1. D DISABLE(DGIEN)
  1. ; Modify the server
  1. D SERVER(DGIEN)
  1. Q
  1. ;
  1. SERVER(DGIEN) ; Modify the web server
  1. N DGEXIT,DGTYPE,DGCOUNT,DGEPT,DGPORT,DGDATA
  1. N DGIENS,DGSERVER,DGERR12,DGSERVICE
  1. ; Get the site type entered in the Installation question POS1
  1. S DGTYPE=$G(XPDQUES("POS1"))
  1. ; DGTYPE will be a value of 1-3 (PRE-PROD, SQA, DEVELOPMENT) (if no value, this is a PRODUCTION system, set to 4)
  1. I 'DGTYPE S DGTYPE=4
  1. D BMES^XPDUTL(" o Setting up the server for "_$S(DGTYPE=1:"PRE-PROD",DGTYPE=2:"SQA",DGTYPE=3:"DEVELOPMENT",1:"PRODUCTION")_".")
  1. S DGEXIT=0
  1. ; Get the matching endpoint and port for the site type
  1. F DGCOUNT=1:1 S DGDATA=$P($T(TYPEMAP+DGCOUNT),";;",2) D Q:DGEXIT
  1. . I $P(DGDATA,";",1)=DGTYPE S DGEPT=$P(DGDATA,";",3),DGPORT=$P(DGDATA,";",4),DGEXIT=1
  1. S DGIENS=DGIEN_","
  1. ; PORT
  1. S DGSERVER(18.12,DGIENS,.03)=DGPORT
  1. ; SERVER endpoint
  1. S DGSERVER(18.12,DGIENS,.04)=DGEPT
  1. ; STATUS
  1. ; For Pre-Prod, set Status to disabled, otherwise, enable
  1. S DGSERVER(18.12,DGIENS,.06)=$S(DGTYPE=1:0,1:1)
  1. ; SSL PORT
  1. S DGSERVER(18.12,DGIENS,3.03)=DGPORT
  1. ;
  1. D FILE^DIE("","DGSERVER","DGERR12") ; update existing entry
  1. I '$D(DGERR12("DIERR",1,"TEXT",1)) D
  1. . I $S(DGTYPE=1:0,1:1) D BMES^XPDUTL(" o '"_DGSRVR_"' server enabled.")
  1. . D BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' update succeeded.")
  1. I $D(DGERR12("DIERR",1,"TEXT",1)) D BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' Error: "_DGERR12("DIERR",1,"TEXT",1)) Q
  1. Q
  1. ;
  1. DISABLE(DGIEN) ; Get the DG EE SUMMARY server IEN and disable it - update of server will set it back to enabled (except for Pre-prod)
  1. N DGSERVER,DGERR12
  1. ; Set STATUS to DISABLED
  1. S DGSERVER(18.12,DGIEN_",",.06)=0
  1. D FILE^DIE("","DGSERVER","DGERR12") ; update existing entry
  1. D BMES^XPDUTL(" o '"_DGSRVR_"' server disabled.")
  1. Q
  1. ;
  1. POST2 ; Set the parameter to Date/Time
  1. N DGERR
  1. D BMES^XPDUTL(" o Setting parameter instance DG PATCH DG*5.3*1075 ACTIVE in the")
  1. D MES^XPDUTL(" PARAMETER (#8989.5) file to date/time value of Aug 3, 2022@1700")
  1. D EN^XPAR("PKG","DG PATCH DG*5.3*1075 ACTIVE",1,3220803.1700,.DGERR)
  1. I $G(DGERR) D
  1. . D BMES^XPDUTL("*** ERROR! ***")
  1. . D MES^XPDUTL(" - Parameter set failed: "_DGERR)
  1. . D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
  1. . D MES^XPDUTL(" for assistance.")
  1. Q
  1. ;
  1. POST3 ; Add HUD-VASH eligibility to file #8
  1. NEW DGEC,DGPH,DGFDA,DGERR
  1. S DGEC="HUD-VASH"
  1. D BMES^XPDUTL(" o Adding 'HUD-VASH' to the ELIGIBILITY CODE (#8) file.")
  1. S DGPH=$$FIND1^DIC(8.1,"","X",DGEC)
  1. I 'DGPH D Q
  1. . D BMES^XPDUTL("*** ERROR! ***")
  1. . D MES^XPDUTL(" - HUD-VASH entry missing from MAS ELIGIBILITY CODE (#8.1) file")
  1. . D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
  1. . D MES^XPDUTL(" for assistance.")
  1. I $$FIND1^DIC(8,"","X",DGEC) D Q
  1. . D BMES^XPDUTL("*** HUD-VASH entry already exists... No action required.")
  1. ; Add entry to file
  1. S DGFDA(8,"+1,",.01)=DGEC
  1. S DGFDA(8,"+1,",1)="RED"
  1. S DGFDA(8,"+1,",2)="HUDV"
  1. S DGFDA(8,"+1,",3)=13
  1. S DGFDA(8,"+1,",4)="N"
  1. S DGFDA(8,"+1,",5)=DGEC
  1. S DGFDA(8,"+1,",7)=1
  1. S DGFDA(8,"+1,",8)=DGEC
  1. S DGFDA(8,"+1,",9)="VA STANDARD"
  1. S DGFDA(8,"+1,",11)="VA"
  1. D UPDATE^DIE("E","DGFDA","","DGERR")
  1. I '$D(DGERR) D BMES^XPDUTL(" o HUD-VASH successfully added to ELIGIBILITY CODE (#8) file.")
  1. I $D(DGERR) D
  1. . D BMES^XPDUTL("*** ERROR! ***")
  1. . D MES^XPDUTL(" - HUD-VASH was NOT successfully added to the ELIGIBILITY CODE (#8) file.")
  1. . D MES^XPDUTL(" - Submit a YOUR IT Services ticket with the Enterprise Service Desk")
  1. . D MES^XPDUTL(" for assistance.")
  1. Q
  1. ;
  1. POST4 ; Recompile all input templates for fields that were modified
  1. ; - ELIGIBILITY (#.01) field of the PATIENT ELIGIBILITIES (#361) subfile of the PATIENT (#2) file
  1. ;
  1. N DGFLD
  1. D BMES^XPDUTL(" o Recompile all compiled input templates that contain the following field:")
  1. D MES^XPDUTL(" PATIENT (#2) file: ")
  1. D MES^XPDUTL(" - ELIGIBILITY (#.01) field of the PATIENT ELIGIBILITIES (#361) subfile")
  1. ;
  1. ;build array of file and field numbers for top-level file and fields being exported
  1. ;array format: DGFLD(file#,field)=""
  1. ;recompile all compiled input templates that contain the fields in the DGLFD array passed by reference
  1. ; PATIENT file #2
  1. S DGFLD(2.0361,.01)=""
  1. D DIEZ^DIKCUTL3(2,.DGFLD)
  1. Q
  1. ;
  1. TYPEMAP ; Map the system type to the SERVER endpoint and Port values
  1. ;;1;PREPROD;prep.ves.domain.ext;443
  1. ;;2;SQA;sqa.ves.domain.ext;443
  1. ;;3;DEV;dev03.ves.domain.ext;443
  1. ;;4;PROD;ves.domain.ext;443