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

SD53P876.m

Go to the documentation of this file.
  1. SD53P876 ;BAH/DF - SD*5.3*876 Post Init Routine ;Jan 11, 2024
  1. ;;5.3;Scheduling;**876**;Aug 13, 1993;Build 5
  1. ;
  1. ; load new Stop codes to the SD TELE HEALTH STOP CODE FILE #40.6.
  1. ; *** post install can be rerun with no harm ***
  1. ;
  1. Q
  1. EN ; entry point
  1. N ERRCNT,FDA,SDIEN,ERR,STP,DA,DIK
  1. S ERRCNT=0
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("Updating of SD TELE HEALTH STOP CODE FILE...")
  1. ;Add new codes
  1. D MES^XPDUTL("") H 1
  1. F STP=355 D
  1. . I $O(^SD(40.6,"B",STP,"")) D MES^XPDUTL(STP_" already on file") Q
  1. . I '$$CHKSTOP^SDTMPEDT(STP) D MES^XPDUTL(STP_" ** Not added, invalid stop code") Q
  1. . S FDA(40.6,"+1,",.01)=STP D UPDATE^DIE("","FDA","SDIEN","ERR")
  1. . D:'$D(ERR) MES^XPDUTL(STP_" added stop code")
  1. . I $D(ERR) D MES^XPDUTL(STP_" failed an attempt to add to the file.") S ERRCNT=ERRCNT+1
  1. . K FDA,SDIEN,ERR
  1. ;Delete removed codes
  1. S DIK="^SD(40.6,"
  1. F STP=656 D
  1. . S DA=$O(^SD(40.6,"B",STP,""))
  1. . I 'DA D MES^XPDUTL(STP_" already deleted") Q
  1. . D ^DIK
  1. . D MES^XPDUTL(STP_" deleted")
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("Stop Code Update completed. "_ERRCNT_" error(s) found.")
  1. D MES^XPDUTL("") H 2
  1. Q