DG531044P ;ALB/ARF,KUM - DG*5.3*1044 INSTALL UTILITY;02/23/2021 15:21pm
;;5.3;Registration;**1044**;Feb 23 2021;Build 13
;
QUIT ;No direct entry
;
;---------------------------------------------------------------------------
;Patch DG*5.3*1044: Environment, Pre-Install, and Post-Install entry points.
;---------------------------------------------------------------------------
;
ENV ;Main entry point for Environment check
Q
;
PRE ;Main entry point for Pre-Install items
Q
;
POST ;Main entry point for Post-Install items
D POST1 ;Recompile all compiled input templates
D POST2 ;Update PERIOD OF SERVICE (#21) File entry AIR FORCE--ACTIVE DUTY to USAF, USSF - ACTIVE DUTY
;
D BMES^XPDUTL(">>> Patch DG*5.3*1044 - Post-install complete.")
Q
;
POST1 ;Recompile all compiled input templates
;Recompile all compiled input templates that contain specific fields.
;This is needed because the data dictionary definition of these fields
;has changed and they are being exported via KIDS.
;
; Supported ICR's:
; 10141: BMES^XPDUTL
; : MES^XPDUTL
; 3352: DIEZ^DIKCUTL3
;
N DGFLD
;
D BMES^XPDUTL(">>> Recompile all compiled input templates that contain the following fields:")
;
D BMES^XPDUTL(" o NUMBER (#.001) field in the BRANCH OF SERVICE (#23) file")
;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
S DGFLD(23,.001)="" ;BRANCH OF SERVICE file - NUMBER field (.001)
D DIEZ^DIKCUTL3(23,.DGFLD)
K DGFLD
;
D BMES^XPDUTL(">>> Re-compile completed.")
;
Q
POST2 ; Update entry in the PERIOD OF SERVICE File (#21)
;
N DGIEN,DGERR,DGNAM,DGFDA,DGIEN1,DGNAM1
S DGERR=""
S DGNAM="AIR FORCE--ACTIVE DUTY"
;
D BMES^XPDUTL(">>> Updating PERIOD OF SERVICE file (#21) entry - AIR FORCE--ACTIVE DUTY")
; Check if entry exists, use it if it does
S DGIEN=$O(^DIC(21,"B",DGNAM,0))
I 'DGIEN D BMES^XPDUTL(" "_DGNAM_" does not exist, no action is taken. ") Q
S DGIEN1=DGIEN
S DGIEN=DGIEN_","
;
L +^DIC(21,0):10 I '$T D BMES^XPDUTL(" PERIOD OF SERVICE file (#21) is locked by another user. Please log CA SDM ticket. ") Q
S DGFDA(21,DGIEN,.01)="USAF, USSF - ACTIVE DUTY"
D UPDATE^DIE("E","DGFDA","","DGERR")
I $D(DGERR("DIERR")) D
. S DGERR=$G(DGERR("DIERR",1,"TEXT",1)) Q
. D BMES^XPDUTL(" *** An Error occurred during updating PERIOD OF SERVICE file (#21) entry - AIR FORCE--ACTIVE DUTY")
. D MES^XPDUTL(" Please log CA SDM ticket.")
. Q
;
I DGERR="" D
. S DGNAM1=$P(^DIC(21,DGIEN1,0),"^",1)
. D BMES^XPDUTL(" o "_DGNAM_" entry's NAME field (#.01) is updated in PERIOD OF SERVICE file (#21) to "_DGNAM1_".")
L -^DIC(21,0)
D BMES^XPDUTL(">>> Update of PERIOD OF SERVICE file (#21) completed.")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG531044P 2921 printed Nov 22, 2024@17:45:41 Page 2
DG531044P ;ALB/ARF,KUM - DG*5.3*1044 INSTALL UTILITY;02/23/2021 15:21pm
+1 ;;5.3;Registration;**1044**;Feb 23 2021;Build 13
+2 ;
QUIT ;No direct entry
+1 ;
+2 ;---------------------------------------------------------------------------
+3 ;Patch DG*5.3*1044: Environment, Pre-Install, and Post-Install entry points.
+4 ;---------------------------------------------------------------------------
+5 ;
ENV ;Main entry point for Environment check
+1 QUIT
+2 ;
PRE ;Main entry point for Pre-Install items
+1 QUIT
+2 ;
POST ;Main entry point for Post-Install items
+1 ;Recompile all compiled input templates
DO POST1
+2 ;Update PERIOD OF SERVICE (#21) File entry AIR FORCE--ACTIVE DUTY to USAF, USSF - ACTIVE DUTY
DO POST2
+3 ;
+4 DO BMES^XPDUTL(">>> Patch DG*5.3*1044 - Post-install complete.")
+5 QUIT
+6 ;
POST1 ;Recompile all compiled input templates
+1 ;Recompile all compiled input templates that contain specific fields.
+2 ;This is needed because the data dictionary definition of these fields
+3 ;has changed and they are being exported via KIDS.
+4 ;
+5 ; Supported ICR's:
+6 ; 10141: BMES^XPDUTL
+7 ; : MES^XPDUTL
+8 ; 3352: DIEZ^DIKCUTL3
+9 ;
+10 NEW DGFLD
+11 ;
+12 DO BMES^XPDUTL(">>> Recompile all compiled input templates that contain the following fields:")
+13 ;
+14 DO BMES^XPDUTL(" o NUMBER (#.001) field in the BRANCH OF SERVICE (#23) file")
+15 ;build array of file and field numbers for top-level file and fields being exported
+16 ;array format: DGFLD(file#,field)=""
+17 ;recompile all compiled input templates that contain the fields in the DGLFD array passed by reference
+18 ;BRANCH OF SERVICE file - NUMBER field (.001)
SET DGFLD(23,.001)=""
+19 DO DIEZ^DIKCUTL3(23,.DGFLD)
+20 KILL DGFLD
+21 ;
+22 DO BMES^XPDUTL(">>> Re-compile completed.")
+23 ;
+24 QUIT
POST2 ; Update entry in the PERIOD OF SERVICE File (#21)
+1 ;
+2 NEW DGIEN,DGERR,DGNAM,DGFDA,DGIEN1,DGNAM1
+3 SET DGERR=""
+4 SET DGNAM="AIR FORCE--ACTIVE DUTY"
+5 ;
+6 DO BMES^XPDUTL(">>> Updating PERIOD OF SERVICE file (#21) entry - AIR FORCE--ACTIVE DUTY")
+7 ; Check if entry exists, use it if it does
+8 SET DGIEN=$ORDER(^DIC(21,"B",DGNAM,0))
+9 IF 'DGIEN
DO BMES^XPDUTL(" "_DGNAM_" does not exist, no action is taken. ")
QUIT
+10 SET DGIEN1=DGIEN
+11 SET DGIEN=DGIEN_","
+12 ;
+13 LOCK +^DIC(21,0):10
IF '$TEST
DO BMES^XPDUTL(" PERIOD OF SERVICE file (#21) is locked by another user. Please log CA SDM ticket. ")
QUIT
+14 SET DGFDA(21,DGIEN,.01)="USAF, USSF - ACTIVE DUTY"
+15 DO UPDATE^DIE("E","DGFDA","","DGERR")
+16 IF $DATA(DGERR("DIERR"))
Begin DoDot:1
+17 SET DGERR=$GET(DGERR("DIERR",1,"TEXT",1))
QUIT
+18 DO BMES^XPDUTL(" *** An Error occurred during updating PERIOD OF SERVICE file (#21) entry - AIR FORCE--ACTIVE DUTY")
+19 DO MES^XPDUTL(" Please log CA SDM ticket.")
+20 QUIT
End DoDot:1
+21 ;
+22 IF DGERR=""
Begin DoDot:1
+23 SET DGNAM1=$PIECE(^DIC(21,DGIEN1,0),"^",1)
+24 DO BMES^XPDUTL(" o "_DGNAM_" entry's NAME field (#.01) is updated in PERIOD OF SERVICE file (#21) to "_DGNAM1_".")
End DoDot:1
+25 LOCK -^DIC(21,0)
+26 DO BMES^XPDUTL(">>> Update of PERIOD OF SERVICE file (#21) completed.")
+27 QUIT
+28 ;