HDI1015A ;BPFO/DTG - PATCH 15 POST INSTALL ;14 Apr 2016
;;1.0;HEALTH DATA & INFORMATICS;**15**;Feb 22, 2005;Build 10
;
POST ;
N DOMAIN,HDIDOM,HDIERROR,HDIMSG,DOM,HIDOM
;
S HDIMSG(1)="Post-Installation (POST^HDI1015A) will now be run."
S HDIMSG(2)=" "
D MES^XPDUTL(.HDIMSG) K HDIMSG
;
S DOMAIN="LABORATORY" ; domain to be added to HDIS DOMAIN File #7115.1
;
S HDIDOM=$$GETDOM(DOMAIN)
I +HDIDOM>0 G VER
; add domain
I '+$$UPDTDOM^HDISVCUT(DOMAIN) D Q
. D MES^XPDUTL("***** Error adding the "_DOMAIN_" domain to the HDIS DOMAIN FILE #7115.1."),PSTHALT("")
;
; get domain IEN
I '+$$GETIEN^HDISVF09(DOMAIN,.HDIDOM) D Q
. D MES^XPDUTL("***** Error retrieving the IEN for the "_DOMAIN_" domain."),PSTHALT("")
;
VER ; verify domain IEN
I '+HDIDOM D Q
. D MES^XPDUTL("***** Error verifying the IEN for the "_DOMAIN_" domain."),PSTHALT("")
;
; get files & fields to be added to File #7115.6
N DATA,LINE F LINE=1:1 S DATA=$P($T(DATA+LINE),";;",2) Q:DATA="" D
. N FILE,FIELD,HDIDATA,HDIERMSG
. S FILE=$P(DATA,U),FIELD=$P(DATA,U,2)
. I +$$GETIEN^HDISVF05(FILE,FIELD) Q ; quit if entry already exists
. S HDIDATA(FILE)=FIELD
. ; add entry to HDIS FILE/FIELD File #7115.6
. I '+$$ADDDFFS^HDISVF09(HDIDOM,.HDIDATA,.HDIERMSG) D
. . I '$D(HDIERROR) D MES^XPDUTL("***** "_"Error updating File #7115.6")
. . S HDIERROR=1
. . D MES^XPDUTL("***** "_HDIERMSG)
;
I +$D(HDIERROR) D PSTHALT("") Q
;
S HDIMSG(1)="Post-Installation complete."
S HDIMSG(2)=""
D MES^XPDUTL(.HDIMSG)
Q
PSTHALT(MSG) ; display error message
S HDIMSG(1)=""
S HDIMSG(2)=MSG
S HDIMSG(3)="***** Post-installation has been halted."
S HDIMSG(4)="***** Please contact Enterprise VistA Support."
S HDIMSG(5)=""
D MES^XPDUTL(.HDIMSG)
Q
;
GETDOM(DOM) ; get the domain IEN
I '+$$GETIEN^HDISVF09(DOM,.HIDOM) Q "0"
Q +HIDOM
;
DATA ;
;;66.3^.01
;;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHDI1015A 1907 printed Dec 13, 2024@01:56:22 Page 2
HDI1015A ;BPFO/DTG - PATCH 15 POST INSTALL ;14 Apr 2016
+1 ;;1.0;HEALTH DATA & INFORMATICS;**15**;Feb 22, 2005;Build 10
+2 ;
POST ;
+1 NEW DOMAIN,HDIDOM,HDIERROR,HDIMSG,DOM,HIDOM
+2 ;
+3 SET HDIMSG(1)="Post-Installation (POST^HDI1015A) will now be run."
+4 SET HDIMSG(2)=" "
+5 DO MES^XPDUTL(.HDIMSG)
KILL HDIMSG
+6 ;
+7 ; domain to be added to HDIS DOMAIN File #7115.1
SET DOMAIN="LABORATORY"
+8 ;
+9 SET HDIDOM=$$GETDOM(DOMAIN)
+10 IF +HDIDOM>0
GOTO VER
+11 ; add domain
+12 IF '+$$UPDTDOM^HDISVCUT(DOMAIN)
Begin DoDot:1
+13 DO MES^XPDUTL("***** Error adding the "_DOMAIN_" domain to the HDIS DOMAIN FILE #7115.1.")
DO PSTHALT("")
End DoDot:1
QUIT
+14 ;
+15 ; get domain IEN
+16 IF '+$$GETIEN^HDISVF09(DOMAIN,.HDIDOM)
Begin DoDot:1
+17 DO MES^XPDUTL("***** Error retrieving the IEN for the "_DOMAIN_" domain.")
DO PSTHALT("")
End DoDot:1
QUIT
+18 ;
VER ; verify domain IEN
+1 IF '+HDIDOM
Begin DoDot:1
+2 DO MES^XPDUTL("***** Error verifying the IEN for the "_DOMAIN_" domain.")
DO PSTHALT("")
End DoDot:1
QUIT
+3 ;
+4 ; get files & fields to be added to File #7115.6
+5 NEW DATA,LINE
FOR LINE=1:1
SET DATA=$PIECE($TEXT(DATA+LINE),";;",2)
if DATA=""
QUIT
Begin DoDot:1
+6 NEW FILE,FIELD,HDIDATA,HDIERMSG
+7 SET FILE=$PIECE(DATA,U)
SET FIELD=$PIECE(DATA,U,2)
+8 ; quit if entry already exists
IF +$$GETIEN^HDISVF05(FILE,FIELD)
QUIT
+9 SET HDIDATA(FILE)=FIELD
+10 ; add entry to HDIS FILE/FIELD File #7115.6
+11 IF '+$$ADDDFFS^HDISVF09(HDIDOM,.HDIDATA,.HDIERMSG)
Begin DoDot:2
+12 IF '$DATA(HDIERROR)
DO MES^XPDUTL("***** "_"Error updating File #7115.6")
+13 SET HDIERROR=1
+14 DO MES^XPDUTL("***** "_HDIERMSG)
End DoDot:2
End DoDot:1
+15 ;
+16 IF +$DATA(HDIERROR)
DO PSTHALT("")
QUIT
+17 ;
+18 SET HDIMSG(1)="Post-Installation complete."
+19 SET HDIMSG(2)=""
+20 DO MES^XPDUTL(.HDIMSG)
+21 QUIT
PSTHALT(MSG) ; display error message
+1 SET HDIMSG(1)=""
+2 SET HDIMSG(2)=MSG
+3 SET HDIMSG(3)="***** Post-installation has been halted."
+4 SET HDIMSG(4)="***** Please contact Enterprise VistA Support."
+5 SET HDIMSG(5)=""
+6 DO MES^XPDUTL(.HDIMSG)
+7 QUIT
+8 ;
GETDOM(DOM) ; get the domain IEN
+1 IF '+$$GETIEN^HDISVF09(DOM,.HIDOM)
QUIT "0"
+2 QUIT +HIDOM
+3 ;
DATA ;
+1 ;;66.3^.01
+2 ;;
+3 QUIT