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

YS199PST.m

Go to the documentation of this file.
  1. YS199PST ;BAL/KTL - Patch 199 Post-init ; 01/27/2022
  1. ;;5.01;MENTAL HEALTH;**199**;Dec 30, 1994;Build 18
  1. ;
  1. ; Reference to EN^XPAR in ICR #2263
  1. ; Reference to GETLST^XPAR in ICR #2263
  1. ; Reference to XLFSTR in ICR #10104
  1. Q
  1. EDTDATE ; date used to update 601.71:18
  1. ;;3220127.2029
  1. Q
  1. PRE ; nothing necessary
  1. Q
  1. POST ; post-init
  1. D INSTALLQ^YTXCHG("XCHGLST","YS199PST")
  1. D UPDTST("BARTHEL INDEX")
  1. D UPDTST("BASIS-24 PSYCHOSIS")
  1. D UPDTST("BBHI-2")
  1. D UPDTST("BPRS-A")
  1. D UPDTST("C-SSRS")
  1. D UPDTST("I9+C-SSRS")
  1. D UPDTST("PSS-3")
  1. D UPDTST("PSS-3 2ND")
  1. D UPDTST("WHODAS2.0-12")
  1. D CATS4CAT
  1. D UPDURL
  1. Q
  1. ;
  1. UPDTST(NAME) ; Update Date Edited
  1. N IEN,REC
  1. S IEN=$O(^YTT(601.71,"B",NAME,0)) Q:'IEN
  1. S REC(18)=$P($T(EDTDATE+1),";;",2)
  1. D FMUPD^YTXCHGU(601.71,.REC,IEN)
  1. Q
  1. ;
  1. CATS4CAT ; Add categories for new CAT's
  1. D SETCAT("CAD-PTSD-DX","CAT/CAD")
  1. D SETCAT("CAD-PTSD-DX","Anxiety/PTSD")
  1. D SETCAT("CAT-PTSD-E","CAT/CAD")
  1. D SETCAT("CAT-PTSD-E","Anxiety/PTSD")
  1. Q
  1. SETCAT(TEST,CATNM) ; add category to TEST if not already there
  1. N CAT
  1. I TEST'=+TEST S TEST=$O(^YTT(601.71,"B",TEST,0)) QUIT:'TEST
  1. S CAT=$O(^YTT(601.97,"B",CATNM,0)) QUIT:'CAT
  1. I $D(^YTT(601.71,TEST,10,"B",CAT))=10 QUIT ; already there
  1. ;
  1. N YTFDA,YTIEN,DIERR
  1. S YTFDA(601.71101,"+1,"_TEST_",",.01)=CATNM
  1. D UPDATE^DIE("E","YTFDA","YTIEN")
  1. I $D(DIERR) D MES^XPDUTL(CATNM_": "_$G(^TMP("DIERR",$J,1,"TEXT",1)))
  1. D CLEAN^DILF
  1. Q
  1. ;
  1. SCREEN ; line to put in DATA SCREEN of KIDS build
  1. ; $$INCLUDE^YTXCHG(Y,"TAG","RTN") calls TAG^RTN to get an array of
  1. ; instrument exchange entries to include in the build. It sets Y
  1. ; to true if the entry should be included.
  1. ;
  1. I $$INCLUDE^YTXCHG(Y,"XCHGLST","YS199PST")
  1. Q
  1. ;
  1. XCHGLST(ARRAY) ; return array of instrument exchange entries
  1. ; ARRAY(cnt,1)=instrument exchange entry name
  1. ; ARRAY(cnt,2)=instrument exchange entry creation date
  1. ;
  1. N I,X
  1. F I=1:1 S X=$P($T(ENTRIES+I),";;",2,99) Q:X="zzzzz" D
  1. . S ARRAY(I,1)=$P(X,U)
  1. . S ARRAY(I,2)=$P(X,U,2)
  1. Q
  1. UPDURL ; Update GUI TOOLS URL for MHA Web
  1. N LIST,PARM,ERR,ENT,INST,VAL,TITL,CMD,SPEC,NEWVAL
  1. K ^TMP($J,"XPAR")
  1. S LIST=$NA(^TMP($J,"XPAR"))
  1. S PARM="ORWT TOOLS MENU"
  1. D ENVAL^XPAR(LIST,PARM,"",.ERR,1)
  1. S ^XTMP("YS199-TOOLS",0)=$$FMADD^XLFDT(DT,7)_U_DT_U_"MH Backup Tools Menu"
  1. M ^XTMP("YS199-TOOLS","XPAR")=^TMP($J,"XPAR")
  1. S SPEC("/home?")="/home/a/?",SPEC("/home/?")="/home/a/?" ;In case URL entered home/?
  1. S ENT="" F S ENT=$O(^TMP($J,"XPAR",ENT)) Q:ENT="" D
  1. . S INST=0 F S INST=$O(^TMP($J,"XPAR",ENT,INST)) Q:+INST=0 D
  1. .. S VAL=^TMP($J,"XPAR",ENT,INST)
  1. .. I (VAL["mha.domain.ext/app/home?"!(VAL["mha.domain.ext/app/home/?")) D
  1. ... S TITL=$P(VAL,"="),CMD=$P(VAL,"=",2,99)
  1. ... S CMD=$$REPLACE^XLFSTR(CMD,.SPEC)
  1. ... S NEWVAL=TITL_"="_CMD
  1. ... D BMES^XPDUTL("Updating "_CMD_" for "_ENT)
  1. ... D EN^XPAR(ENT,PARM,INST,NEWVAL,.ERR)
  1. K ^TMP($J,"XPAR")
  1. Q
  1. ENTRIES ; New MHA instruments^Exchange Entry Date
  1. ;;YS*5.01*199 UPDATES^01/27/2022@09:02:19
  1. ;;YS*5.01*199 CAT PTSD^02/28/2022@16:15:18
  1. ;;zzzzz