- SD53P821 ;TMP/SA - SD*5.3*821 Post Init Routine ; September 15, 2022
- ;;5.3;Scheduling;**821**;May 29, 2018;Build 9
- ;
- ; load new Stop codes to the SD TELE HEALTH STOP CODE FILE #40.6.
- ; *** post install can be rerun with no harm ***
- ;
- EN ; entry point
- N ERRCNT,FDA,SDIEN,ERR,STP
- S ERRCNT=0
- D MES^XPDUTL("")
- D MES^XPDUTL("Updating of SD TELE HEALTH STOP CODE FILE...")
- D MES^XPDUTL("") H 1
- F STP=497,498 D
- . I $O(^SD(40.6,"B",STP,"")) D MES^XPDUTL(STP_" already on file") Q
- . I '$$CHKSTOP^SDTMPEDT(STP) D MES^XPDUTL(STP_" ** Not added, invalid stop code") Q
- . S FDA(40.6,"+1,",.01)=STP D UPDATE^DIE("","FDA","SDIEN","ERR")
- . D:'$D(ERR) MES^XPDUTL(STP_" added stop code")
- . I $D(ERR) D MES^XPDUTL(STP_" failed an attempt to add to the file.") S ERRCNT=ERRCNT+1
- . K FDA,SDIEN,ERR
- D MES^XPDUTL("")
- D MES^XPDUTL("Stop Code Update completed. "_ERRCNT_" error(s) found.")
- D MES^XPDUTL("")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53P821 936 printed Dec 13, 2024@02:46:44 Page 2
- SD53P821 ;TMP/SA - SD*5.3*821 Post Init Routine ; September 15, 2022
- +1 ;;5.3;Scheduling;**821**;May 29, 2018;Build 9
- +2 ;
- +3 ; load new Stop codes to the SD TELE HEALTH STOP CODE FILE #40.6.
- +4 ; *** post install can be rerun with no harm ***
- +5 ;
- EN ; entry point
- +1 NEW ERRCNT,FDA,SDIEN,ERR,STP
- +2 SET ERRCNT=0
- +3 DO MES^XPDUTL("")
- +4 DO MES^XPDUTL("Updating of SD TELE HEALTH STOP CODE FILE...")
- +5 DO MES^XPDUTL("")
- HANG 1
- +6 FOR STP=497,498
- Begin DoDot:1
- +7 IF $ORDER(^SD(40.6,"B",STP,""))
- DO MES^XPDUTL(STP_" already on file")
- QUIT
- +8 IF '$$CHKSTOP^SDTMPEDT(STP)
- DO MES^XPDUTL(STP_" ** Not added, invalid stop code")
- QUIT
- +9 SET FDA(40.6,"+1,",.01)=STP
- DO UPDATE^DIE("","FDA","SDIEN","ERR")
- +10 if '$DATA(ERR)
- DO MES^XPDUTL(STP_" added stop code")
- +11 IF $DATA(ERR)
- DO MES^XPDUTL(STP_" failed an attempt to add to the file.")
- SET ERRCNT=ERRCNT+1
- +12 KILL FDA,SDIEN,ERR
- End DoDot:1
- +13 DO MES^XPDUTL("")
- +14 DO MES^XPDUTL("Stop Code Update completed. "_ERRCNT_" error(s) found.")
- +15 DO MES^XPDUTL("")
- +16 QUIT