SDEC745P ;ALB/CLT - PATCH 745 POST INSTALL ROUTINE ;Jun 10, 2020@1:44
;;5.3;SCHEDULING;**745**;AUG 13, 1993;Build 40
;
FIND ;FIND THE IEN FOR "VS GUI NATIONAL"
N SDECDA,SDECDA1,SDECLNK
W !!?3,"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
S SDECDA1=0,SDECDA1=$O(^SDEC(409.98,1,1,"B","OIT Helpdesk - (855) 673-4357",SDECDA1))
I $G(SDECDA1)="" G XIT ; did not find cross-reference
D RMOVE,ADD G XIT
RMOVE ;REMOVE OLD ENTRY
K ^SDEC(409.98,SDECDA,1,"B",$E($P(^SDEC(409.98,SDECDA,1,SDECDA1,0),U,1),1,30),SDECDA1)
Q
ADD ;ADD UPDATED ENTRY
S SDECLNK="VA Enterprise Service Desk (ESD) (855) 673-4357"
S $P(^SDEC(409.98,SDECDA,1,SDECDA1,0),U,1)=SDECLNK
S ^SDEC(409.98,SDECDA,1,"B",$E(SDECLNK,1,30),SDECDA1)="" ;cross-reference is first 30 characters
Q
VERSION ;SET THE NEW VERSION UPDATE IN SDEC SETTING FILE #409.98 TO 1.7.1
S DA=SDECDA,DIE=409.98,DR="2///1.7.1 R1;3///3200623" D ^DIE ;update VS GUI NATIONAL
K DIE,DR,DA
S SDECDA2=0,SDECDA2=$O(^SDEC(409.98,"B","VS GUI LOCAL",SDECDA2)) Q:$G(SDECDA2)="" ;get DA for the VS GUI LOCAL
S DA=SDECDA2,DIE=409.98,DR="2///1.7.1 R1;3///3200623" D ^DIE ;update VS GUI LOCAL
K DIE,DR,DA
Q
NOFIND ;"VS GUI NATIONAL" NOT FOUND
W !!?3,"VS GUI NATIONAL not found in the SDEC SETTINGS file (#409.98)"
XIT ;EXIT ROUTINE
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDEC745P 1444 printed Dec 13, 2024@02:51:05 Page 2
SDEC745P ;ALB/CLT - PATCH 745 POST INSTALL ROUTINE ;Jun 10, 2020@1:44
+1 ;;5.3;SCHEDULING;**745**;AUG 13, 1993;Build 40
+2 ;
FIND ;FIND THE IEN FOR "VS GUI NATIONAL"
+1 NEW SDECDA,SDECDA1,SDECLNK
+2 WRITE !!?3,"Updating SDEC SETTINGS file (#409.98)",!!
+3 SET SDECDA=0
SET SDECDA=$ORDER(^SDEC(409.98,"B","VS GUI NATIONAL",SDECDA))
if $GET(SDECDA)=""
GOTO NOFIND
+4 ;update GUI version number and date
DO VERSION
+5 SET SDECDA1=0
SET SDECDA1=$ORDER(^SDEC(409.98,1,1,"B","OIT Helpdesk - (855) 673-4357",SDECDA1))
+6 ; did not find cross-reference
IF $GET(SDECDA1)=""
GOTO XIT
+7 DO RMOVE
DO ADD
GOTO XIT
RMOVE ;REMOVE OLD ENTRY
+1 KILL ^SDEC(409.98,SDECDA,1,"B",$EXTRACT($PIECE(^SDEC(409.98,SDECDA,1,SDECDA1,0),U,1),1,30),SDECDA1)
+2 QUIT
ADD ;ADD UPDATED ENTRY
+1 SET SDECLNK="VA Enterprise Service Desk (ESD) (855) 673-4357"
+2 SET $PIECE(^SDEC(409.98,SDECDA,1,SDECDA1,0),U,1)=SDECLNK
+3 ;cross-reference is first 30 characters
SET ^SDEC(409.98,SDECDA,1,"B",$EXTRACT(SDECLNK,1,30),SDECDA1)=""
+4 QUIT
VERSION ;SET THE NEW VERSION UPDATE IN SDEC SETTING FILE #409.98 TO 1.7.1
+1 ;update VS GUI NATIONAL
SET DA=SDECDA
SET DIE=409.98
SET DR="2///1.7.1 R1;3///3200623"
DO ^DIE
+2 KILL DIE,DR,DA
+3 ;get DA for the VS GUI LOCAL
SET SDECDA2=0
SET SDECDA2=$ORDER(^SDEC(409.98,"B","VS GUI LOCAL",SDECDA2))
if $GET(SDECDA2)=""
QUIT
+4 ;update VS GUI LOCAL
SET DA=SDECDA2
SET DIE=409.98
SET DR="2///1.7.1 R1;3///3200623"
DO ^DIE
+5 KILL DIE,DR,DA
+6 QUIT
NOFIND ;"VS GUI NATIONAL" NOT FOUND
+1 WRITE !!?3,"VS GUI NATIONAL not found in the SDEC SETTINGS file (#409.98)"
XIT ;EXIT ROUTINE
+1 ;
+2 QUIT