DG531027P ;ALB/MCF - DG*5.3*1027 PRE AND POST-INSTALL ROUTINE TO SET UP HWSC ENTRIES FOR E&E WEB SERVICE;9 September 2020 9:00 AM
;;5.3;Registration;**1027**;Aug 13, 1993;Build 70
;
; This routine is also used as an Environmental Check routine, though it does nothing except make the HELP
; tag below available for the Installation question in the build.
Q
;
HELP ; Help for ?? on Installation Question POS1 (use direct writes in env check routine)
W !,"Enter 1 if patch is being installed in a Pre-Production (Mirror) system."
W !,"Enter 2 if patch is being installed in a Software Quality Assurance system."
W !,"Enter 3 if patch is being installed in a Development system."
Q
;
PRE ; PRE INSTALL Main entry point
; This routine contains the pre-install check which gets executed
; before patch DG*5.3*1027 is allowed to install.
; - Check that the wsdl file is accessible
;
; ICRs: #2320 : $$LIST^%ZISH,$$DEFDIR^%ZISH
; 10141 : BMES^XPDUTL
; : MES^XPDUTL
;
; Input: Variables set by KIDS during pre-install check
; Output: XPDABORT - KIDS variable set to abort installation - set to 1 to remove installation from the system
;
D BMES^XPDUTL(">>> Beginning the DG*5.3*1027 Pre-install Routine")
;
; Check for wsdl file
D CHK
I $G(XPDABORT) D Q
. D BMES^XPDUTL(">>> DG*5.3*1027 Pre-install Routine Failed.")
. D MES^XPDUTL(" - Installation Terminated.")
. D MES^XPDUTL(" - Transport global removed from system.")
D BMES^XPDUTL(">>> DG*5.3*1027 Pre-Install Successful")
Q
;
CHK ; Check for existence of WSDL file.
N DGBPATH
D BMES^XPDUTL(" o Checking for the existence of the WSDL file eesummary.wsdl")
S DGBPATH=$$GETPATH("eesummary.wsdl")
; If file is not found, abort the install
I DGBPATH="" S XPDABORT=1
E D MES^XPDUTL(" > WSDL file located: "_DGBPATH)
Q
;
GETPATH(DGBWSDL) ; - Get the location of the DGBWSDL file
; Return the path of the file. If not found, give error message and return NULL
N DGBSTAT,DGBPATH,DGBFILE
; First check SOFTWARE directory
S DGBPATH="/srv/vista/patches/SOFTWARE/"
S DGBFILE(DGBWSDL)=""
S DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
I 'DGBSTAT!($D(DGBSTAT)'=11) D
. ; If not found, check PUB directory
. S DGBPATH="/srv/vista/patches/PUB/DG_53_P1027/"
. S DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
. I 'DGBSTAT!($D(DGBSTAT)'=11) D
. . ; If not found, check PRIMARY HFS DIRECTORY
. . S DGBPATH=$$DEFDIR^%ZISH
. . S DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
. . I 'DGBSTAT!($D(DGBSTAT)'=11) D
. . . D BMES^XPDUTL("**** Error cannot find file "_DGBWSDL)
. . . D MES^XPDUTL("**** WSDL file "_DGBPATH_DGBWSDL_" not found.")
. . . D MES^XPDUTL(" File is needed prior to install.")
. . . S DGBPATH=""
Q DGBPATH
;
POST ; POST INSTALL Main entry point
; ICRs:
; 10141 : BMES^XPDUTL
; : MES^XPDUTL
; 5421 : GENPORT^XOBWLIB
; 7190 : R/W access to file 18.02
; 7191 : R/W access to file 18.12
; 2240 : $$ENCRYP^XUSRB1
; 10096 : ^%ZSOF("DEL")
; 3352 : DIEZ^DIKCUTL3
;
D BMES^XPDUTL(">>> Patch DG*5.3*1027 - Post-install start...")
D POST1
D POST2
D POST3
D BMES^XPDUTL(">>> Patch DG*5.3*1027 - Post-install complete.")
Q
POST1 ; Setup DG EE SUMMARY SERVER and SEVICE
N DGSRVR,DGSRVC
D BMES^XPDUTL(" o Post-install set up for SSL Configuration...")
S DGSRVR="DG EE SUMMARY SERVER"
S DGSRVC="DG EE SUMMARY SERVICE"
; If the DG EE SUMMARY SERVER is installed, set it to DISABLED so the update of the server won't cause errors
; The patch installation will set it back to ENABLED.
D DISABLE
D SERVICE
D SERVER
Q
;
SERVICE ; from wsdl, create/compile classes and set up service
N DGARR,DGSTAT,DGBPATH
S DGBPATH=$$GETPATH("eesummary.wsdl")
S DGARR("WSDL FILE")=DGBPATH_"eesummary.wsdl"
S DGARR("CACHE PACKAGE NAME")="dgeewebsvc"
S DGARR("WEB SERVICE NAME")=DGSRVC
; $$GENPORT^XOBWLIB handles BMES^XPDUTL messaging in the event of a success.
S DGSTAT=$$GENPORT^XOBWLIB(.DGARR)
I +DGSTAT=0 D BMES^XPDUTL($P(DGSTAT,"^",2)) Q ; in the event of a failure
Q
;
SERVER ; set up web server
N DGEXIT,DGTYPE,DGCOUNT,DGEPT,DGPW,DGPORT,DGDATA
N DGIEN,DGIENS,DGSERVER,DGFDAI,DGERR,DGERR12,DGERR02,DGSRVIEN,DGSERVICE
; Get the site type entered in the Installation question POS1
S DGTYPE=$G(XPDQUES("POS1"))
; DGTYPE will be a value of 1-3 (PRE-PROD, SQA, DEVELOPMENT) (if no value, this is a PRODUCTION system)
I 'DGTYPE S DGTYPE=4
D MES^XPDUTL(" o Setting up the server for "_$S(DGTYPE=1:"PRE-PROD",DGTYPE=2:"SQA",DGTYPE=3:"DEVELOPMENT",1:"PRODUCTION")_".")
S DGEXIT=0
; Get the matching endpoint, password and port for the site type
F DGCOUNT=1:1 S DGDATA=$P($T(TYPEMAP+DGCOUNT),";;",2) D Q:DGEXIT
. I $P(DGDATA,";",1)=DGTYPE S DGEPT=$P(DGDATA,";",3),DGPW=$P(DGDATA,";",4),DGPORT=$P(DGDATA,";",5),DGEXIT=1
S DGIEN("SRV")=$$FIND1^DIC(18.12,,"B",DGSRVR)
I DGIEN("SRV") S DGIENS("SRV")=DGIEN("SRV")_","
E S DGIENS("SRV")="+1,"
; NAME
S DGSERVER(18.12,DGIENS("SRV"),.01)=DGSRVR
; PORT
S DGSERVER(18.12,DGIENS("SRV"),.03)=DGPORT
; SERVER endpoint
S DGSERVER(18.12,DGIENS("SRV"),.04)=DGEPT
; STATUS
; For Pre-Prod, set Status to disabled, otherwise, enable
S DGSERVER(18.12,DGIENS("SRV"),.06)=$S(DGTYPE=1:0,1:1)
; LOGIN REQUIRED
S DGSERVER(18.12,DGIENS("SRV"),1.01)=1
; SSL ENABLED
S DGSERVER(18.12,DGIENS("SRV"),3.01)=1
; SSL CONFIGURATION
S DGSERVER(18.12,DGIENS("SRV"),3.02)="encrypt_only_tlsv12"
; SSL PORT
S DGSERVER(18.12,DGIENS("SRV"),3.03)=DGPORT
; USERNAME
S DGSERVER(18.12,DGIENS("SRV"),200)="VistASvcUsr"
; PASSWORD - must be encrypted
S DGSERVER(18.12,DGIENS("SRV"),300)=$$ENCRYP^XUSRB1(DGPW)
;
I DGIEN("SRV") D FILE^DIE("","DGSERVER","DGERR12") ; update existing entry
I 'DGIEN("SRV") D UPDATE^DIE("","DGSERVER","DGFDAI","DGERR") ; create new entry
I $D(DGFDAI) S DGIENS("SRV")=DGFDAI(1)_",",DGIEN("SRV")=DGFDAI(1)
I '$D(DGERR12("DIERR",1,"TEXT",1)) D BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' addition/update succeeded.")
I $D(DGERR12("DIERR",1,"TEXT",1)) D BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' Error: "_DGERR12("DIERR",1,"TEXT",1)) Q
; once server is set up add the web service
S DGIENS("SRC")="+1,"
S DGSRVIEN=0
F S DGSRVIEN=$O(^XOB(18.12,DGIEN("SRV"),100,"B",DGSRVIEN)) Q:'DGSRVIEN D
. I $$GET1^DIQ(18.02,DGSRVIEN,.01)=DGSRVC S DGIENS("SRC")=DGSRVIEN_","
I DGIENS("SRC")'="+1," Q ; don't update subentry pointers if already exist.
K DGSERVICE,DGFDAI
S DGSERVICE(18.121,DGIENS("SRC")_DGIENS("SRV"),.01)=DGSRVC
S DGSERVICE(18.121,DGIENS("SRC")_DGIENS("SRV"),.06)="ENABLED"
D UPDATE^DIE("E","DGSERVICE","DGFDAI","DGERR02") ; create new entry
I $D(DGERR02("DIERR",1,"TEXT",1)) D MES^XPDUTL(" o "_DGERR02("DIERR",1,"TEXT",1))
I '$D(DGERR02("DIERR",1,"TEXT",1)) D BMES^XPDUTL(" o '"_DGSRVC_"' service successfully authorized on server.")
Q
;
DISABLE ; Disable DG EE SUMMARY server if it exists - update of server will set it back to enabled (except for Pre-prod)
N DGIEN,DGSERVER,DGERR12
S DGIEN("SRV")=$$FIND1^DIC(18.12,,"B",DGSRVR)
I 'DGIEN("SRV") Q
; Set STATUS to DISABLED
S DGSERVER(18.12,DGIEN("SRV")_",",.06)=0
D FILE^DIE("","DGSERVER","DGERR12") ; update existing entry
D BMES^XPDUTL(" o '"_DGSRVR_"' server temporarily disabled.")
Q
;
POST2 ; Cleanup of routines generated by WSDL compilation
D BMES^XPDUTL(" o Cleanup of routines compiled from the WSDL.")
N DGCOUNT,DGDATA,X
F DGCOUNT=1:1 S DGDATA=$P($T(ROU+DGCOUNT),";;",2) Q:DGDATA="END" D
. ; Delete all routines from the uppercase DGEEWEBS namespace
. S X="DGEEWEBS."_(DGDATA) X ^%ZOSF("DEL")
. ; Delete the routines in the lowercase dgeewebsvc namespace except the ones needed by the DG EE SUMMARY SERVICE
. I DGDATA="eeSummary.1"!(DGDATA="enrollmentDeterminationInfo.1")!(DGDATA="registrationInfo.1")!(DGDATA="eeSummaryPortSoap11.getEESummary.1")!(DGDATA="eeSummaryPortSoap11.1") Q
. S X="dgeewebsvc."_(DGDATA) X ^%ZOSF("DEL")
Q
;
POST3 ; Recompile all input templates for fields that were modified
;Recompile all compiled input templates that contain specific fields.
N DGFLD
D BMES^XPDUTL(" o Recompile all compiled input templates that contain the following fields:")
D MES^XPDUTL(" PATIENT ENROLLMENT file(#27.11): ")
D MES^XPDUTL(" o APPLICATION DATE (#.01)")
D MES^XPDUTL(" o REASON/CANCELLED DECLINED (#.05)")
D MES^XPDUTL(" o PT APPLIED FOR ENROLLMENT? (#.14)")
D MES^XPDUTL(" o REGISTRATION ONLY REASON (#.15)")
;
;build array of file and field numbers for top-level file and fields being exported
;array format: DGFLD(file#,field)=""
;recompile all compiled input templates that contain the fields in the DGLFD array passed by reference
; PATIENT ENROLLMENT file #27.11
S DGFLD(27.11,.01)="" ; APPLICATION DATE
S DGFLD(27.11,.05)="" ; REASON/CANCELLED DECLINED
S DGFLD(27.11,.14)="" ; PT APPLIED FOR ENROLLMENT?
S DGFLD(27.11,.15)="" ; REGISTRATION ONLY REASON
D DIEZ^DIKCUTL3(27.11,.DGFLD)
Q
;
ROU ; WSDL routines compiled
;;EmailType.1
;;NotificationType.1
;;baseAddressInfo.1
;;assetInfo.1
;;baseFinancialInfo.1
;;addressInfo.1
;;associationInfo.1
;;cancelDeclineInfo.1
;;beneficiaryTravelInfo.1
;;cdConditionInfo.1
;;categoryInfo.1
;;cdProcedureInfo.1
;;combatEpisodeInfo.1
;;catastrophicDisabilityInfo.1
;;conflictExperienceInfo.1
;;consentInfo.1
;;communityCareEligibilityInfo.1
;;debitInfo.1
;;contactInfo.1
;;deathRecondInfo.1
;;dependentInfo.1
;;demographicInfo.1
;;eligibilityInfo.1
;;dependentFinancialsInfo.1
;;eligibilityStatusInfo.1
;;eligibilityVerificationInfo.1
;;emergencyResponseInfo.1
;;employmentInfo.1
;;eeSummary.1
;;emailInfo.1
;;expenseInfo.1
;;feeBasisInfo.1
;;financialsInfo.1
;;geocodingInfo.1
;;financialStatementInfo.1
;;incomeInfo.1
;;hardshipInfo.1
;;healthBenefitPlanInfo.1
;;enrollmentDeterminationInfo.1
;;incompetenceRulingInfo.1
;;ineligibilityFactorInfo.1
;;incomeTestStatusInfo.1
;;ivmLetterCandidateInfo.1
;;ivmCandidateInfo.1
;;incomeTestInfo.1
;;ivmLetterInfo.1
;;ivmLetterStatusInfo.1
;;linkNotificationInfo.1
;;militaryServiceEpisodeInfo.1
;;insuranceInfo.1
;;militarySexualTraumaInfo.1
;;monetaryBenefitAwardInfo.1
;;militaryServiceInfo.1
;;moveNotificationInfo.1
;;nameInfo.1
;;militaryServiceSiteRecordInfo.1
;;monetaryBenefitInfo.1
;;phoneInfo.1
;;nonPrimaryFinancialStatementInfo.1
;;noseThroatRadiumInfo.1
;;powEpisodeInfo.1
;;primaryviewNotificationInfo.1
;;preferredFacilityInfo.1
;;prisonerOfWarInfo.1
;;purpleHeartInfo.1
;;registrationInfo.1
;;personInfo.1
;;relationInfo.1
;;sendIVMInfo.1
;;ratedDisabilityInfo.1
;;specialFactorsInfo.1
;;sensitivityInfo.1
;;serviceConnectionAwardInfo.1
;;spinalCordInjuryInfo.1
;;ssnInfo.1
;;spouseFinancialsInfo.1
;;vamcInfo.1
;;vceEligibilityInfo.1
;;spouseInfo.1
;;deliveryPreferenceInfo.1
;;eeSummaryPortSoap11.1
;;eeSummaryPortSoap11.getDeliveryPreference.1
;;eeSummaryPortSoap11.getEESummary.1
;;eeSummaryPortSoap11.getEESummaryHistory.1
;;eeSummaryPortSoap11.getEligibilityDetermination.1
;;eeSummaryPortSoap11.getIVMLetterStatuses.1
;;eeSummaryPortSoap11.getPersonNotification.1
;;eeSummaryPortSoap11.retrieveIVMCandidates.1
;;eeSummaryPortSoap11.sendIVMUpdates.1
;;eeSummaryPortSoap11.updateDeliveryPreference.1
;;eeSummaryPortSoap11.updateIVMRecordStatus.1
;;END
TYPEMAP ; Map the system type to the SERVER endpoint, Password and Port values
;;1;PREPROD;vaww.esrpre-prod.aac.domain.ext;Th7$kj32;8443
;;2;SQA;vaww.esrstage1a.aac.domain.ext;P6hy%43!;8443
;;3;DEV;vaww.dev03-esm.domain.ext;4rfv$RFV;443
;;4;PROD;vaww.esr.aac.domain.ext;Nh8#lkm7;8443
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531027P 11895 printed Nov 22, 2024@17:45:40 Page 2
DG531027P ;ALB/MCF - DG*5.3*1027 PRE AND POST-INSTALL ROUTINE TO SET UP HWSC ENTRIES FOR E&E WEB SERVICE;9 September 2020 9:00 AM
+1 ;;5.3;Registration;**1027**;Aug 13, 1993;Build 70
+2 ;
+3 ; This routine is also used as an Environmental Check routine, though it does nothing except make the HELP
+4 ; tag below available for the Installation question in the build.
+5 QUIT
+6 ;
HELP ; Help for ?? on Installation Question POS1 (use direct writes in env check routine)
+1 WRITE !,"Enter 1 if patch is being installed in a Pre-Production (Mirror) system."
+2 WRITE !,"Enter 2 if patch is being installed in a Software Quality Assurance system."
+3 WRITE !,"Enter 3 if patch is being installed in a Development system."
+4 QUIT
+5 ;
PRE ; PRE INSTALL Main entry point
+1 ; This routine contains the pre-install check which gets executed
+2 ; before patch DG*5.3*1027 is allowed to install.
+3 ; - Check that the wsdl file is accessible
+4 ;
+5 ; ICRs: #2320 : $$LIST^%ZISH,$$DEFDIR^%ZISH
+6 ; 10141 : BMES^XPDUTL
+7 ; : MES^XPDUTL
+8 ;
+9 ; Input: Variables set by KIDS during pre-install check
+10 ; Output: XPDABORT - KIDS variable set to abort installation - set to 1 to remove installation from the system
+11 ;
+12 DO BMES^XPDUTL(">>> Beginning the DG*5.3*1027 Pre-install Routine")
+13 ;
+14 ; Check for wsdl file
+15 DO CHK
+16 IF $GET(XPDABORT)
Begin DoDot:1
+17 DO BMES^XPDUTL(">>> DG*5.3*1027 Pre-install Routine Failed.")
+18 DO MES^XPDUTL(" - Installation Terminated.")
+19 DO MES^XPDUTL(" - Transport global removed from system.")
End DoDot:1
QUIT
+20 DO BMES^XPDUTL(">>> DG*5.3*1027 Pre-Install Successful")
+21 QUIT
+22 ;
CHK ; Check for existence of WSDL file.
+1 NEW DGBPATH
+2 DO BMES^XPDUTL(" o Checking for the existence of the WSDL file eesummary.wsdl")
+3 SET DGBPATH=$$GETPATH("eesummary.wsdl")
+4 ; If file is not found, abort the install
+5 IF DGBPATH=""
SET XPDABORT=1
+6 IF '$TEST
DO MES^XPDUTL(" > WSDL file located: "_DGBPATH)
+7 QUIT
+8 ;
GETPATH(DGBWSDL) ; - Get the location of the DGBWSDL file
+1 ; Return the path of the file. If not found, give error message and return NULL
+2 NEW DGBSTAT,DGBPATH,DGBFILE
+3 ; First check SOFTWARE directory
+4 SET DGBPATH="/srv/vista/patches/SOFTWARE/"
+5 SET DGBFILE(DGBWSDL)=""
+6 SET DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
+7 IF 'DGBSTAT!($DATA(DGBSTAT)'=11)
Begin DoDot:1
+8 ; If not found, check PUB directory
+9 SET DGBPATH="/srv/vista/patches/PUB/DG_53_P1027/"
+10 SET DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
+11 IF 'DGBSTAT!($DATA(DGBSTAT)'=11)
Begin DoDot:2
+12 ; If not found, check PRIMARY HFS DIRECTORY
+13 SET DGBPATH=$$DEFDIR^%ZISH
+14 SET DGBSTAT=$$LIST^%ZISH(DGBPATH,"DGBFILE","DGBSTAT")
+15 IF 'DGBSTAT!($DATA(DGBSTAT)'=11)
Begin DoDot:3
+16 DO BMES^XPDUTL("**** Error cannot find file "_DGBWSDL)
+17 DO MES^XPDUTL("**** WSDL file "_DGBPATH_DGBWSDL_" not found.")
+18 DO MES^XPDUTL(" File is needed prior to install.")
+19 SET DGBPATH=""
End DoDot:3
End DoDot:2
End DoDot:1
+20 QUIT DGBPATH
+21 ;
POST ; POST INSTALL Main entry point
+1 ; ICRs:
+2 ; 10141 : BMES^XPDUTL
+3 ; : MES^XPDUTL
+4 ; 5421 : GENPORT^XOBWLIB
+5 ; 7190 : R/W access to file 18.02
+6 ; 7191 : R/W access to file 18.12
+7 ; 2240 : $$ENCRYP^XUSRB1
+8 ; 10096 : ^%ZSOF("DEL")
+9 ; 3352 : DIEZ^DIKCUTL3
+10 ;
+11 DO BMES^XPDUTL(">>> Patch DG*5.3*1027 - Post-install start...")
+12 DO POST1
+13 DO POST2
+14 DO POST3
+15 DO BMES^XPDUTL(">>> Patch DG*5.3*1027 - Post-install complete.")
+16 QUIT
POST1 ; Setup DG EE SUMMARY SERVER and SEVICE
+1 NEW DGSRVR,DGSRVC
+2 DO BMES^XPDUTL(" o Post-install set up for SSL Configuration...")
+3 SET DGSRVR="DG EE SUMMARY SERVER"
+4 SET DGSRVC="DG EE SUMMARY SERVICE"
+5 ; If the DG EE SUMMARY SERVER is installed, set it to DISABLED so the update of the server won't cause errors
+6 ; The patch installation will set it back to ENABLED.
+7 DO DISABLE
+8 DO SERVICE
+9 DO SERVER
+10 QUIT
+11 ;
SERVICE ; from wsdl, create/compile classes and set up service
+1 NEW DGARR,DGSTAT,DGBPATH
+2 SET DGBPATH=$$GETPATH("eesummary.wsdl")
+3 SET DGARR("WSDL FILE")=DGBPATH_"eesummary.wsdl"
+4 SET DGARR("CACHE PACKAGE NAME")="dgeewebsvc"
+5 SET DGARR("WEB SERVICE NAME")=DGSRVC
+6 ; $$GENPORT^XOBWLIB handles BMES^XPDUTL messaging in the event of a success.
+7 SET DGSTAT=$$GENPORT^XOBWLIB(.DGARR)
+8 ; in the event of a failure
IF +DGSTAT=0
DO BMES^XPDUTL($PIECE(DGSTAT,"^",2))
QUIT
+9 QUIT
+10 ;
SERVER ; set up web server
+1 NEW DGEXIT,DGTYPE,DGCOUNT,DGEPT,DGPW,DGPORT,DGDATA
+2 NEW DGIEN,DGIENS,DGSERVER,DGFDAI,DGERR,DGERR12,DGERR02,DGSRVIEN,DGSERVICE
+3 ; Get the site type entered in the Installation question POS1
+4 SET DGTYPE=$GET(XPDQUES("POS1"))
+5 ; DGTYPE will be a value of 1-3 (PRE-PROD, SQA, DEVELOPMENT) (if no value, this is a PRODUCTION system)
+6 IF 'DGTYPE
SET DGTYPE=4
+7 DO MES^XPDUTL(" o Setting up the server for "_$SELECT(DGTYPE=1:"PRE-PROD",DGTYPE=2:"SQA",DGTYPE=3:"DEVELOPMENT",1:"PRODUCTION")_".")
+8 SET DGEXIT=0
+9 ; Get the matching endpoint, password and port for the site type
+10 FOR DGCOUNT=1:1
SET DGDATA=$PIECE($TEXT(TYPEMAP+DGCOUNT),";;",2)
Begin DoDot:1
+11 IF $PIECE(DGDATA,";",1)=DGTYPE
SET DGEPT=$PIECE(DGDATA,";",3)
SET DGPW=$PIECE(DGDATA,";",4)
SET DGPORT=$PIECE(DGDATA,";",5)
SET DGEXIT=1
End DoDot:1
if DGEXIT
QUIT
+12 SET DGIEN("SRV")=$$FIND1^DIC(18.12,,"B",DGSRVR)
+13 IF DGIEN("SRV")
SET DGIENS("SRV")=DGIEN("SRV")_","
+14 IF '$TEST
SET DGIENS("SRV")="+1,"
+15 ; NAME
+16 SET DGSERVER(18.12,DGIENS("SRV"),.01)=DGSRVR
+17 ; PORT
+18 SET DGSERVER(18.12,DGIENS("SRV"),.03)=DGPORT
+19 ; SERVER endpoint
+20 SET DGSERVER(18.12,DGIENS("SRV"),.04)=DGEPT
+21 ; STATUS
+22 ; For Pre-Prod, set Status to disabled, otherwise, enable
+23 SET DGSERVER(18.12,DGIENS("SRV"),.06)=$SELECT(DGTYPE=1:0,1:1)
+24 ; LOGIN REQUIRED
+25 SET DGSERVER(18.12,DGIENS("SRV"),1.01)=1
+26 ; SSL ENABLED
+27 SET DGSERVER(18.12,DGIENS("SRV"),3.01)=1
+28 ; SSL CONFIGURATION
+29 SET DGSERVER(18.12,DGIENS("SRV"),3.02)="encrypt_only_tlsv12"
+30 ; SSL PORT
+31 SET DGSERVER(18.12,DGIENS("SRV"),3.03)=DGPORT
+32 ; USERNAME
+33 SET DGSERVER(18.12,DGIENS("SRV"),200)="VistASvcUsr"
+34 ; PASSWORD - must be encrypted
+35 SET DGSERVER(18.12,DGIENS("SRV"),300)=$$ENCRYP^XUSRB1(DGPW)
+36 ;
+37 ; update existing entry
IF DGIEN("SRV")
DO FILE^DIE("","DGSERVER","DGERR12")
+38 ; create new entry
IF 'DGIEN("SRV")
DO UPDATE^DIE("","DGSERVER","DGFDAI","DGERR")
+39 IF $DATA(DGFDAI)
SET DGIENS("SRV")=DGFDAI(1)_","
SET DGIEN("SRV")=DGFDAI(1)
+40 IF '$DATA(DGERR12("DIERR",1,"TEXT",1))
DO BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' addition/update succeeded.")
+41 IF $DATA(DGERR12("DIERR",1,"TEXT",1))
DO BMES^XPDUTL(" o WEB SERVER '"_DGSRVR_"' Error: "_DGERR12("DIERR",1,"TEXT",1))
QUIT
+42 ; once server is set up add the web service
+43 SET DGIENS("SRC")="+1,"
+44 SET DGSRVIEN=0
+45 FOR
SET DGSRVIEN=$ORDER(^XOB(18.12,DGIEN("SRV"),100,"B",DGSRVIEN))
if 'DGSRVIEN
QUIT
Begin DoDot:1
+46 IF $$GET1^DIQ(18.02,DGSRVIEN,.01)=DGSRVC
SET DGIENS("SRC")=DGSRVIEN_","
End DoDot:1
+47 ; don't update subentry pointers if already exist.
IF DGIENS("SRC")'="+1,"
QUIT
+48 KILL DGSERVICE,DGFDAI
+49 SET DGSERVICE(18.121,DGIENS("SRC")_DGIENS("SRV"),.01)=DGSRVC
+50 SET DGSERVICE(18.121,DGIENS("SRC")_DGIENS("SRV"),.06)="ENABLED"
+51 ; create new entry
DO UPDATE^DIE("E","DGSERVICE","DGFDAI","DGERR02")
+52 IF $DATA(DGERR02("DIERR",1,"TEXT",1))
DO MES^XPDUTL(" o "_DGERR02("DIERR",1,"TEXT",1))
+53 IF '$DATA(DGERR02("DIERR",1,"TEXT",1))
DO BMES^XPDUTL(" o '"_DGSRVC_"' service successfully authorized on server.")
+54 QUIT
+55 ;
DISABLE ; Disable DG EE SUMMARY server if it exists - update of server will set it back to enabled (except for Pre-prod)
+1 NEW DGIEN,DGSERVER,DGERR12
+2 SET DGIEN("SRV")=$$FIND1^DIC(18.12,,"B",DGSRVR)
+3 IF 'DGIEN("SRV")
QUIT
+4 ; Set STATUS to DISABLED
+5 SET DGSERVER(18.12,DGIEN("SRV")_",",.06)=0
+6 ; update existing entry
DO FILE^DIE("","DGSERVER","DGERR12")
+7 DO BMES^XPDUTL(" o '"_DGSRVR_"' server temporarily disabled.")
+8 QUIT
+9 ;
POST2 ; Cleanup of routines generated by WSDL compilation
+1 DO BMES^XPDUTL(" o Cleanup of routines compiled from the WSDL.")
+2 NEW DGCOUNT,DGDATA,X
+3 FOR DGCOUNT=1:1
SET DGDATA=$PIECE($TEXT(ROU+DGCOUNT),";;",2)
if DGDATA="END"
QUIT
Begin DoDot:1
+4 ; Delete all routines from the uppercase DGEEWEBS namespace
+5 SET X="DGEEWEBS."_(DGDATA)
XECUTE ^%ZOSF("DEL")
+6 ; Delete the routines in the lowercase dgeewebsvc namespace except the ones needed by the DG EE SUMMARY SERVICE
+7 IF DGDATA="eeSummary.1"!(DGDATA="enrollmentDeterminationInfo.1")!(DGDATA="registrationInfo.1")!(DGDATA="eeSummaryPortSoap11.getEESummary.1")!(DGDATA="eeSummaryPortSoap11.1")
QUIT
+8 SET X="dgeewebsvc."_(DGDATA)
XECUTE ^%ZOSF("DEL")
End DoDot:1
+9 QUIT
+10 ;
POST3 ; Recompile all input templates for fields that were modified
+1 ;Recompile all compiled input templates that contain specific fields.
+2 NEW DGFLD
+3 DO BMES^XPDUTL(" o Recompile all compiled input templates that contain the following fields:")
+4 DO MES^XPDUTL(" PATIENT ENROLLMENT file(#27.11): ")
+5 DO MES^XPDUTL(" o APPLICATION DATE (#.01)")
+6 DO MES^XPDUTL(" o REASON/CANCELLED DECLINED (#.05)")
+7 DO MES^XPDUTL(" o PT APPLIED FOR ENROLLMENT? (#.14)")
+8 DO MES^XPDUTL(" o REGISTRATION ONLY REASON (#.15)")
+9 ;
+10 ;build array of file and field numbers for top-level file and fields being exported
+11 ;array format: DGFLD(file#,field)=""
+12 ;recompile all compiled input templates that contain the fields in the DGLFD array passed by reference
+13 ; PATIENT ENROLLMENT file #27.11
+14 ; APPLICATION DATE
SET DGFLD(27.11,.01)=""
+15 ; REASON/CANCELLED DECLINED
SET DGFLD(27.11,.05)=""
+16 ; PT APPLIED FOR ENROLLMENT?
SET DGFLD(27.11,.14)=""
+17 ; REGISTRATION ONLY REASON
SET DGFLD(27.11,.15)=""
+18 DO DIEZ^DIKCUTL3(27.11,.DGFLD)
+19 QUIT
+20 ;
ROU ; WSDL routines compiled
+1 ;;EmailType.1
+2 ;;NotificationType.1
+3 ;;baseAddressInfo.1
+4 ;;assetInfo.1
+5 ;;baseFinancialInfo.1
+6 ;;addressInfo.1
+7 ;;associationInfo.1
+8 ;;cancelDeclineInfo.1
+9 ;;beneficiaryTravelInfo.1
+10 ;;cdConditionInfo.1
+11 ;;categoryInfo.1
+12 ;;cdProcedureInfo.1
+13 ;;combatEpisodeInfo.1
+14 ;;catastrophicDisabilityInfo.1
+15 ;;conflictExperienceInfo.1
+16 ;;consentInfo.1
+17 ;;communityCareEligibilityInfo.1
+18 ;;debitInfo.1
+19 ;;contactInfo.1
+20 ;;deathRecondInfo.1
+21 ;;dependentInfo.1
+22 ;;demographicInfo.1
+23 ;;eligibilityInfo.1
+24 ;;dependentFinancialsInfo.1
+25 ;;eligibilityStatusInfo.1
+26 ;;eligibilityVerificationInfo.1
+27 ;;emergencyResponseInfo.1
+28 ;;employmentInfo.1
+29 ;;eeSummary.1
+30 ;;emailInfo.1
+31 ;;expenseInfo.1
+32 ;;feeBasisInfo.1
+33 ;;financialsInfo.1
+34 ;;geocodingInfo.1
+35 ;;financialStatementInfo.1
+36 ;;incomeInfo.1
+37 ;;hardshipInfo.1
+38 ;;healthBenefitPlanInfo.1
+39 ;;enrollmentDeterminationInfo.1
+40 ;;incompetenceRulingInfo.1
+41 ;;ineligibilityFactorInfo.1
+42 ;;incomeTestStatusInfo.1
+43 ;;ivmLetterCandidateInfo.1
+44 ;;ivmCandidateInfo.1
+45 ;;incomeTestInfo.1
+46 ;;ivmLetterInfo.1
+47 ;;ivmLetterStatusInfo.1
+48 ;;linkNotificationInfo.1
+49 ;;militaryServiceEpisodeInfo.1
+50 ;;insuranceInfo.1
+51 ;;militarySexualTraumaInfo.1
+52 ;;monetaryBenefitAwardInfo.1
+53 ;;militaryServiceInfo.1
+54 ;;moveNotificationInfo.1
+55 ;;nameInfo.1
+56 ;;militaryServiceSiteRecordInfo.1
+57 ;;monetaryBenefitInfo.1
+58 ;;phoneInfo.1
+59 ;;nonPrimaryFinancialStatementInfo.1
+60 ;;noseThroatRadiumInfo.1
+61 ;;powEpisodeInfo.1
+62 ;;primaryviewNotificationInfo.1
+63 ;;preferredFacilityInfo.1
+64 ;;prisonerOfWarInfo.1
+65 ;;purpleHeartInfo.1
+66 ;;registrationInfo.1
+67 ;;personInfo.1
+68 ;;relationInfo.1
+69 ;;sendIVMInfo.1
+70 ;;ratedDisabilityInfo.1
+71 ;;specialFactorsInfo.1
+72 ;;sensitivityInfo.1
+73 ;;serviceConnectionAwardInfo.1
+74 ;;spinalCordInjuryInfo.1
+75 ;;ssnInfo.1
+76 ;;spouseFinancialsInfo.1
+77 ;;vamcInfo.1
+78 ;;vceEligibilityInfo.1
+79 ;;spouseInfo.1
+80 ;;deliveryPreferenceInfo.1
+81 ;;eeSummaryPortSoap11.1
+82 ;;eeSummaryPortSoap11.getDeliveryPreference.1
+83 ;;eeSummaryPortSoap11.getEESummary.1
+84 ;;eeSummaryPortSoap11.getEESummaryHistory.1
+85 ;;eeSummaryPortSoap11.getEligibilityDetermination.1
+86 ;;eeSummaryPortSoap11.getIVMLetterStatuses.1
+87 ;;eeSummaryPortSoap11.getPersonNotification.1
+88 ;;eeSummaryPortSoap11.retrieveIVMCandidates.1
+89 ;;eeSummaryPortSoap11.sendIVMUpdates.1
+90 ;;eeSummaryPortSoap11.updateDeliveryPreference.1
+91 ;;eeSummaryPortSoap11.updateIVMRecordStatus.1
+92 ;;END
TYPEMAP ; Map the system type to the SERVER endpoint, Password and Port values
+1 ;;1;PREPROD;vaww.esrpre-prod.aac.domain.ext;Th7$kj32;8443
+2 ;;2;SQA;vaww.esrstage1a.aac.domain.ext;P6hy%43!;8443
+3 ;;3;DEV;vaww.dev03-esm.domain.ext;4rfv$RFV;443
+4 ;;4;PROD;vaww.esr.aac.domain.ext;Nh8#lkm7;8443