Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDES845P

SDES845P.m

Go to the documentation of this file.
SDES845P ;ALB/MGD,JAS - SD*5.3*845 Post Init Routine ; May 04, 2023
 ;;5.3;SCHEDULING;**845**;AUG 13, 1993;Build 8
 ;;Per VHA Directive 6402, this routine should not be modified
 ;
 Q
 ;
EN ; Update the VS GUI version in #409.98
 D FIND,UPDTRSNS
 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.43
 S DA=SDECDA,DIE=409.98,DR="2///1.7.43;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.43;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
 ;
UPDTRSNS ;
 ;
 ;   Update CANCELLATION REASONS file
 ;
 D MES^XPDUTL("")
 D MES^XPDUTL("   Updating CANCELLATION REASONS file (#409.2)")
 ;
 N SYSUSELST
 S SYSUSELST("AUTOMATED CANCELLATION")=""
 S SYSUSELST("BLOCK AND MOVE")=""
 S SYSUSELST("DO NOT RESCHEDULE")=""
 S SYSUSELST("RESCHEDULE - CALL BACK")=""
 S SYSUSELST("RESCHEDULE - VET WILL CALL")=""
 ;
 N CANRSNIEN,CANRSNNAME
 S CANRSNNAME=""
 F  S CANRSNNAME=$O(^SD(409.2,"B",CANRSNNAME)) Q:CANRSNNAME=""  D
 . S CANRSNIEN=0
 . F  S CANRSNIEN=$O(^SD(409.2,"B",CANRSNNAME,CANRSNIEN)) Q:'CANRSNIEN  D
 . . I $D(^SD(409.2,CANRSNIEN,0)) D
 . . . N FDA,FERR
 . . . S FDA(409.2,CANRSNIEN_",",6)=0
 . . . I $D(SYSUSELST(CANRSNNAME)) D
 . . . . S FDA(409.2,CANRSNIEN_",",6)=1
 . . . D FILE^DIE("","FDA","FERR")
 . . . I $D(FERR) D
 . . . . D MES^XPDUTL("")
 . . . . D MES^XPDUTL("   Cancellation Reason "_CANRSNNAME_" could not be updated at this time.")
 . . . . D MES^XPDUTL(" Please set the SYSTEM USE ONLY field (#6) manually.")
 D MES^XPDUTL("")
 D MES^XPDUTL("   The update of the CANCELLATION REASONS file (#409.2) has completed.")
 Q