SDES860P ;ALB/MGD,ANU - SD*5.3*860 Post Init Routine ; Aug 04, 2023
;;5.3;SCHEDULING;**860**;AUG 13, 1993;Build 12
;;Per VHA Directive 6402, this routine should not be modified
;
; Update E-Checkin Allowed (#20) in Hospital Location (#44) file to "No" if null value or blank found
; Update Pre-Checkin Allowed (#21) in Hospial Location (#44) file to "No" if null value or blank found
;
Q
;
EN ; Update the VS GUI version in #409.98
D FIND
D UPD44 ; Update #20 and #21 fields of #44 file
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.48
S DA=SDECDA,DIE=409.98,DR="2///1.7.48;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.48;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
;
UPD44 ; entry point for updating #44 file
N SDIEN,SDNAME,SDFDA,SDERR,SDCOUNT
S SDCOUNT=0
D MES^XPDUTL("")
D MES^XPDUTL("Updating of Fields #20 and #21 in HOSPITAL LOCATION (#44) FILE...")
D MES^XPDUTL("")
S SDNAME=""
F S SDNAME=$O(^SC("B",SDNAME)) Q:SDNAME="" F SDIEN=0:0 S SDIEN=$O(^SC("B",SDNAME,SDIEN)) Q:'SDIEN D
. K SDERR,SDFDA
. I $P($G(^SC(SDIEN,0)),U,26)="" S SDFDA(44,SDIEN_",",20)=0 ; E-Checkin Allowed
. I $P($G(^SC(SDIEN,0)),U,27)="" S SDFDA(44,SDIEN_",",21)=0 ; Pre-Checkin Allowed
. I $D(SDFDA) D FILE^DIE(,"SDFDA","SDERR") S SDCOUNT=SDCOUNT+1
. I $D(SDERR) D MES^XPDUTL(SDNAME_" with IEN "_SDIEN_" failed to update #20 and #21 fields in HOSPITAL LOCATION file.")
D MES^XPDUTL("")
D MES^XPDUTL("Update of Fields #20 and #21 in HOSPITAL LOCATION (#44) File is completed.")
D MES^XPDUTL(SDCOUNT_" number of records in HOSPITAL LOCATION (#44) File updated.")
D MES^XPDUTL("")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES860P 2247 printed Nov 22, 2024@18:05:10 Page 2
SDES860P ;ALB/MGD,ANU - SD*5.3*860 Post Init Routine ; Aug 04, 2023
+1 ;;5.3;SCHEDULING;**860**;AUG 13, 1993;Build 12
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 ; Update E-Checkin Allowed (#20) in Hospital Location (#44) file to "No" if null value or blank found
+5 ; Update Pre-Checkin Allowed (#21) in Hospial Location (#44) file to "No" if null value or blank found
+6 ;
+7 QUIT
+8 ;
EN ; Update the VS GUI version in #409.98
+1 DO FIND
+2 ; Update #20 and #21 fields of #44 file
DO UPD44
+3 QUIT
+4 ;
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.48
+1 ;update VS GUI NATIONAL
SET DA=SDECDA
SET DIE=409.98
SET DR="2///1.7.48;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.48;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
+3 ;
UPD44 ; entry point for updating #44 file
+1 NEW SDIEN,SDNAME,SDFDA,SDERR,SDCOUNT
+2 SET SDCOUNT=0
+3 DO MES^XPDUTL("")
+4 DO MES^XPDUTL("Updating of Fields #20 and #21 in HOSPITAL LOCATION (#44) FILE...")
+5 DO MES^XPDUTL("")
+6 SET SDNAME=""
+7 FOR
SET SDNAME=$ORDER(^SC("B",SDNAME))
if SDNAME=""
QUIT
FOR SDIEN=0:0
SET SDIEN=$ORDER(^SC("B",SDNAME,SDIEN))
if 'SDIEN
QUIT
Begin DoDot:1
+8 KILL SDERR,SDFDA
+9 ; E-Checkin Allowed
IF $PIECE($GET(^SC(SDIEN,0)),U,26)=""
SET SDFDA(44,SDIEN_",",20)=0
+10 ; Pre-Checkin Allowed
IF $PIECE($GET(^SC(SDIEN,0)),U,27)=""
SET SDFDA(44,SDIEN_",",21)=0
+11 IF $DATA(SDFDA)
DO FILE^DIE(,"SDFDA","SDERR")
SET SDCOUNT=SDCOUNT+1
+12 IF $DATA(SDERR)
DO MES^XPDUTL(SDNAME_" with IEN "_SDIEN_" failed to update #20 and #21 fields in HOSPITAL LOCATION file.")
End DoDot:1
+13 DO MES^XPDUTL("")
+14 DO MES^XPDUTL("Update of Fields #20 and #21 in HOSPITAL LOCATION (#44) File is completed.")
+15 DO MES^XPDUTL(SDCOUNT_" number of records in HOSPITAL LOCATION (#44) File updated.")
+16 DO MES^XPDUTL("")
+17 QUIT
+18 ;