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

SD53P765.m

Go to the documentation of this file.
  1. SD53P765 ;TMP/GN - TMP POST INSTALL FOR PATCH SD*5.3*765;July 30, 2018
  1. ;;5.3;Scheduling;**765**;May 29, 2018;Build 13
  1. ;
  1. ;Post install routine for SD*5.3*765 to load new Stop codes to the TMP file SD TELE HEALTH STOP CODE FILE #40.6.
  1. ;** this post install can be rerun with no harm, will report already on file if codes already there.
  1. ;
  1. TMP28 ;Begin Post Install FOR TMP-28 ISSUE
  1. N ERRCNT,QQ,STP,STP1,STP2 S ERRCNT=0
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("Beginning update of SD TELE HEALTH STOP CODE FILE...")
  1. D MES^XPDUTL("") H 1
  1. F QQ=1:1 S STP=$P($T(STPCODES+QQ),";;",2) Q:STP="" D
  1. .K DIE,FDA,SDIEN,TMPERR
  1. .I $O(^SD(40.6,"B",STP,"")) D MES^XPDUTL(STP_" already on file") Q ;skip already on file
  1. .I $L(STP)=3 D Q
  1. ..I '$$CHKSTOP^SDTMPHLA(STP) D MES^XPDUTL(STP_" ** Not added, invalid stop code") Q
  1. ..S FDA(40.6,"+1,",.01)=STP D UPDATE^DIE("","FDA","SDIEN","TMPERR") D:'$D(TMPERR) MES^XPDUTL(STP_" added stop code")
  1. ..I $D(TMPERR) S ERRCNT=ERRCNT+1 D MES^XPDUTL(STP_" failed an attempt to add to the file.")
  1. .I $L(STP)=6 D Q
  1. ..S STP1=$E(STP,1,3),STP2=$E(STP,4,6) I ('$$CHKSTOP^SDTMPHLA(STP1))!('$$CHKSTOP^SDTMPHLA(STP2)) D MES^XPDUTL(STP_" ** Not added, one or both stop codes in pair is invalid") Q
  1. ..S FDA(40.6,"+1,",.01)=STP D UPDATE^DIE("","FDA","SDIEN","TMPERR") D:'$D(TMPERR) MES^XPDUTL(STP_" added stop code pair")
  1. ..I $D(TMPERR) S ERRCNT=ERRCNT+1 D MES^XPDUTL(STP_" failed an attempt to add to the file.")
  1. .K DIE,FDA,SDIEN,TMPERR
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("Stop Code Update completed. "_ERRCNT_" error(s) found.")
  1. D MES^XPDUTL("")
  1. ;
  1. D POST^SDPAWS
  1. Q
  1. STPCODES ;Add Clinic/Telephone stop codes not already on file (only if Valid stop codes on file 40.7 1st)
  1. ;;137;;Clinic stop codes begin
  1. ;;225
  1. ;;322
  1. ;;323531
  1. ;;440
  1. ;;444
  1. ;;445
  1. ;;446
  1. ;;447
  1. ;;644
  1. ;;645
  1. ;;646
  1. ;;647
  1. ;;679
  1. ;;718
  1. ;;723
  1. ;;724
  1. ;;103;;Telephone stop codes begin
  1. ;;103801
  1. ;;103802
  1. ;;103803
  1. ;;147
  1. ;;148
  1. ;;169
  1. ;;178
  1. ;;181
  1. ;;182
  1. ;;199
  1. ;;216
  1. ;;221
  1. ;;224
  1. ;;229
  1. ;;324
  1. ;;325
  1. ;;326
  1. ;;338
  1. ;;338531
  1. ;;424
  1. ;;425
  1. ;;428
  1. ;;441
  1. ;;527
  1. ;;528
  1. ;;530
  1. ;;536
  1. ;;542
  1. ;;545
  1. ;;546
  1. ;;579
  1. ;;584
  1. ;;597
  1. ;;611
  1. ;;686