SDES885P ;ALB/MGD,BWF - SD*5.3*885 Post Init Routine ; July 07, 2024
;;5.3;SCHEDULING;**885**;AUG 13, 1993;Build 5
;;Per VHA Directive 6402, this routine should not be modified
;
Q
;
EN ; Update the VS GUI version in #409.98
D FIND
D TASK
D TASK2
Q
;
FIND ;FIND THE IEN FOR "VS GUI NATIONAL"
N SDECDA,SDECDA1
D MES^XPDUTL("")
D MES^XPDUTL(" Updating SDEC SETTINGS file (#409.98)")
S SDECDA=0,SDECDA=$O(^SDEC(409.98,"B","VS GUI NATIONAL",SDECDA)) G:$G(SDECDA)="" NOFIND
D VERSION ;update GUI version number and date
Q
VERSION ;SET THE NEW VERSION UPDATE IN SDEC SETTING FILE #409.98 TO 1.7.59
S DA=SDECDA,DIE=409.98,DR="2///1.7.59;3///"_DT D ^DIE ;update VS GUI NATIONAL
K DIE,DR,DA
S SDECDA1=0,SDECDA1=$O(^SDEC(409.98,"B","VS GUI LOCAL",SDECDA1)) Q:$G(SDECDA1)="" ;get DA for the VS GUI LOCAL
S DA=SDECDA1,DIE=409.98,DR="2///1.7.59;3///"_DT D ^DIE ;update VS GUI LOCAL
K DIE,DR,DA
Q
;
NOFIND ;"VS GUI NATIONAL" NOT FOUND
D MES^XPDUTL(" VS GUI NATIONAL not found in the SDEC SETTINGS file (#409.98)")
Q
TASK ;
D MES^XPDUTL("")
D MES^XPDUTL(" SD*5.3*885 Post-Install to create new indexes")
D MES^XPDUTL(" in the SDEC APPT REQUEST file (#409.85) is being")
D MES^XPDUTL(" queued to run in the background.")
D MES^XPDUTL("")
N ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
S ZTDESC="SD*5.3*885 Post Install Routine"
D NOW^%DTC S ZTDTH=X,ZTIO="",ZTRTN="INDEX^SDES885P",ZTSAVE("*")="" D ^%ZTLOAD
I $D(ZTSK) D
. D MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
. D MES^XPDUTL("")
I '$D(ZTSK) D
. D MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
. D MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
Q
INDEX ;
N DIK
S DIK="^SDEC(409.85,"
S DIK(1)="23^EC^ECC^ESC^ESP^ES"
D ENALL^DIK
Q
TASK2 ;
D MES^XPDUTL("")
D MES^XPDUTL(" SD*5.3*885 Post-Install to update the SD Audit Statistics file #409.97")
D MES^XPDUTL(" for option SDEC COMPILE AUDIT REPORT is being")
D MES^XPDUTL(" queued to run in the background.")
D MES^XPDUTL("")
N ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
S ZTDESC="SD*5.3*885 Post Install Routine for file #409.97"
D NOW^%DTC S ZTDTH=X,ZTIO="",ZTRTN="RUN^SDES885P",ZTSAVE("*")="" D ^%ZTLOAD
I $D(ZTSK) D
. D MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
. D MES^XPDUTL("")
I '$D(ZTSK) D
. D MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
. D MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
Q
RUN ;
N AUDITDT,AIEN,FDA,DATEARRY,COMPILEDT
S AUDITDT=3240528
F S AUDITDT=$O(^SDAUDIT("C",AUDITDT)) Q:'AUDITDT D
.S DATEARRY(AUDITDT)=AUDITDT
.S AIEN=0 F S AIEN=$O(^SDAUDIT("C",AUDITDT,AIEN)) Q:'AIEN D
..S FDA(409.97,AIEN_",",.01)="@" D FILE^DIE(,"FDA") K FDA
S COMPILEDT=0 F S COMPILEDT=$O(DATEARRY(COMPILEDT)) Q:'COMPILEDT D
.D COMPILE^SDECAUD(COMPILEDT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES885P 2875 printed Nov 22, 2024@18:05:22 Page 2
SDES885P ;ALB/MGD,BWF - SD*5.3*885 Post Init Routine ; July 07, 2024
+1 ;;5.3;SCHEDULING;**885**;AUG 13, 1993;Build 5
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 QUIT
+5 ;
EN ; Update the VS GUI version in #409.98
+1 DO FIND
+2 DO TASK
+3 DO TASK2
+4 QUIT
+5 ;
FIND ;FIND THE IEN FOR "VS GUI NATIONAL"
+1 NEW SDECDA,SDECDA1
+2 DO MES^XPDUTL("")
+3 DO MES^XPDUTL(" Updating SDEC SETTINGS file (#409.98)")
+4 SET SDECDA=0
SET SDECDA=$ORDER(^SDEC(409.98,"B","VS GUI NATIONAL",SDECDA))
if $GET(SDECDA)=""
GOTO NOFIND
+5 ;update GUI version number and date
DO VERSION
+6 QUIT
VERSION ;SET THE NEW VERSION UPDATE IN SDEC SETTING FILE #409.98 TO 1.7.59
+1 ;update VS GUI NATIONAL
SET DA=SDECDA
SET DIE=409.98
SET DR="2///1.7.59;3///"_DT
DO ^DIE
+2 KILL DIE,DR,DA
+3 ;get DA for the VS GUI LOCAL
SET SDECDA1=0
SET SDECDA1=$ORDER(^SDEC(409.98,"B","VS GUI LOCAL",SDECDA1))
if $GET(SDECDA1)=""
QUIT
+4 ;update VS GUI LOCAL
SET DA=SDECDA1
SET DIE=409.98
SET DR="2///1.7.59;3///"_DT
DO ^DIE
+5 KILL DIE,DR,DA
+6 QUIT
+7 ;
NOFIND ;"VS GUI NATIONAL" NOT FOUND
+1 DO MES^XPDUTL(" VS GUI NATIONAL not found in the SDEC SETTINGS file (#409.98)")
+2 QUIT
TASK ;
+1 DO MES^XPDUTL("")
+2 DO MES^XPDUTL(" SD*5.3*885 Post-Install to create new indexes")
+3 DO MES^XPDUTL(" in the SDEC APPT REQUEST file (#409.85) is being")
+4 DO MES^XPDUTL(" queued to run in the background.")
+5 DO MES^XPDUTL("")
+6 NEW ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
+7 SET ZTDESC="SD*5.3*885 Post Install Routine"
+8 DO NOW^%DTC
SET ZTDTH=X
SET ZTIO=""
SET ZTRTN="INDEX^SDES885P"
SET ZTSAVE("*")=""
DO ^%ZTLOAD
+9 IF $DATA(ZTSK)
Begin DoDot:1
+10 DO MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
+11 DO MES^XPDUTL("")
End DoDot:1
+12 IF '$DATA(ZTSK)
Begin DoDot:1
+13 DO MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
+14 DO MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
End DoDot:1
+15 QUIT
INDEX ;
+1 NEW DIK
+2 SET DIK="^SDEC(409.85,"
+3 SET DIK(1)="23^EC^ECC^ESC^ESP^ES"
+4 DO ENALL^DIK
+5 QUIT
TASK2 ;
+1 DO MES^XPDUTL("")
+2 DO MES^XPDUTL(" SD*5.3*885 Post-Install to update the SD Audit Statistics file #409.97")
+3 DO MES^XPDUTL(" for option SDEC COMPILE AUDIT REPORT is being")
+4 DO MES^XPDUTL(" queued to run in the background.")
+5 DO MES^XPDUTL("")
+6 NEW ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
+7 SET ZTDESC="SD*5.3*885 Post Install Routine for file #409.97"
+8 DO NOW^%DTC
SET ZTDTH=X
SET ZTIO=""
SET ZTRTN="RUN^SDES885P"
SET ZTSAVE("*")=""
DO ^%ZTLOAD
+9 IF $DATA(ZTSK)
Begin DoDot:1
+10 DO MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
+11 DO MES^XPDUTL("")
End DoDot:1
+12 IF '$DATA(ZTSK)
Begin DoDot:1
+13 DO MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
+14 DO MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
End DoDot:1
+15 QUIT
RUN ;
+1 NEW AUDITDT,AIEN,FDA,DATEARRY,COMPILEDT
+2 SET AUDITDT=3240528
+3 FOR
SET AUDITDT=$ORDER(^SDAUDIT("C",AUDITDT))
if 'AUDITDT
QUIT
Begin DoDot:1
+4 SET DATEARRY(AUDITDT)=AUDITDT
+5 SET AIEN=0
FOR
SET AIEN=$ORDER(^SDAUDIT("C",AUDITDT,AIEN))
if 'AIEN
QUIT
Begin DoDot:2
+6 SET FDA(409.97,AIEN_",",.01)="@"
DO FILE^DIE(,"FDA")
KILL FDA
End DoDot:2
End DoDot:1
+7 SET COMPILEDT=0
FOR
SET COMPILEDT=$ORDER(DATEARRY(COMPILEDT))
if 'COMPILEDT
QUIT
Begin DoDot:1
+8 DO COMPILE^SDECAUD(COMPILEDT)
End DoDot:1
+9 QUIT