ORY348 ;SLC/TC - Post-install for patch OR*3*348 ;05/07/12 07:35
;;3.0;ORDER ENTRY/RESULTS REPORTING;**348**;Dec 17, 1997;Build 14
;
; ICR #2053 UPDATE^DIE
; ICR #2263 EN^XPAR
; ICR #10013 ^DIK
; ICR #10141 MES^XPDUTL
;
POST ; Initiate post-init processes
;
D ADDNOT
D NOTPARAM
Q
;
ADDNOT ; Add Suicide Attempted/Completed Notification to OE/RR Notifications File
N DA,DIK,ORFDA,ORIEN,ORMSG
S DIK="^ORD(100.9,",DA=77 D ^DIK
S ORFDA(1,100.9,"+1,",.01)="SUICIDE ATTEMPTED/COMPLETED"
S ORFDA(1,100.9,"+1,",.02)="OR"
S ORFDA(1,100.9,"+1,",.03)="Suicide Attempted/Completed."
S ORFDA(1,100.9,"+1,",.04)="PKG"
S ORFDA(1,100.9,"+1,",.05)="R"
S ORFDA(1,100.9,"+1,",.06)="INFODEL"
S ORFDA(1,100.9,"+1,",.07)="ORB3FUP2"
S ORFDA(1,100.9,"+1,",1.5)="PXRM"
S ORFDA(1,100.9,"+1,",4)="Triggered by Clinical Reminders when a MH SUICIDE ATTEMPTED or MH SUICIDE COMPLETED health factor has been documented in PCE. Recipients include MHTC and Teams. Deletion occurs for individual recipient."
S ORIEN(1)=77
D UPDATE^DIE("","ORFDA(1)","ORIEN","ORMSG")
I $D(ORMSG)>0 D ERRMSG("ORMSG")
Q
;
ERRMSG(REF) ; Output and display any error messages as a result of new record entry
;Write all the descendants of the array reference.
;REF is the starting array reference, for example A or ^TMP("ORERRMSG",$J).
;copied from GMTSPI98 & PXRMUTIL
N DONE,IND,LEN,LN,PROOT,ROOT,START,TEMP,TEXT
I REF="" Q
S LN=0
S PROOT=$P(REF,")",1)
;Build the root so we can tell when we are done.
S TEMP=$NA(@REF)
S ROOT=$P(TEMP,")",1)
S REF=$Q(@REF)
I REF'[ROOT Q
S DONE=0
F Q:(REF="")!(DONE) D
. S START=$F(REF,ROOT)
. S LEN=$L(REF)
. S IND=$E(REF,START,LEN)
. S LN=LN+1,TEXT(LN)=PROOT_IND_"="_@REF
. S REF=$Q(@REF)
. I REF'[ROOT S DONE=1
D MES^XPDUTL(.TEXT)
Q
;
NOTPARAM ; parameter transport routine
K ^TMP($J,"XPARRSTR")
N ENT,IDX,ROOT,REF,VAL,I
S ROOT=$NAME(^TMP($J,"XPARRSTR")),ROOT=$E(ROOT,1,$L(ROOT)-1)_","
D LOAD
XX2 S IDX=0,ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
F S IDX=$O(^TMP($J,"XPARRSTR",IDX)) Q:'IDX D
. N PAR,INST,ORVAL,ORERR K ORVAL
. S PAR=$P(^TMP($J,"XPARRSTR",IDX,"KEY"),U),INST=$P(^("KEY"),U,2)
. M ORVAL=^TMP($J,"XPARRSTR",IDX,"VAL")
. D EN^XPAR(ENT,PAR,INST,.ORVAL,.ORERR)
K ^TMP($J,"XPARRSTR")
Q
LOAD ; load data into ^TMP (expects ROOT to be defined)
S I=1 F S REF=$T(DATA+I) Q:REF="" S VAL=$T(DATA+I+1) D
. S I=I+2,REF=$P(REF,";",3,999),VAL=$P(VAL,";",3,999)
. S @(ROOT_REF)=VAL
Q
DATA ; parameter data
;;8000,"KEY")
;;ORB ARCHIVE PERIOD^SUICIDE ATTEMPTED/COMPLETED
;;8000,"VAL")
;;30
;;8001,"KEY")
;;ORB DELETE MECHANISM^SUICIDE ATTEMPTED/COMPLETED
;;8001,"VAL")
;;Individual Recipient
;;8002,"KEY")
;;ORB FORWARD BACKUP REVIEWER^SUICIDE ATTEMPTED/COMPLETED
;;8002,"VAL")
;;0
;;8003,"KEY")
;;ORB FORWARD SUPERVISOR^SUICIDE ATTEMPTED/COMPLETED
;;8003,"VAL")
;;0
;;8004,"KEY")
;;ORB FORWARD SURROGATES^SUICIDE ATTEMPTED/COMPLETED
;;8004,"VAL")
;;0
;;8005,"KEY")
;;ORB PROCESSING FLAG^SUICIDE ATTEMPTED/COMPLETED
;;8005,"VAL")
;;Disabled
;;8006,"KEY")
;;ORB PROVIDER RECIPIENTS^SUICIDE ATTEMPTED/COMPLETED
;;8006,"VAL")
;;CM
;;8007,"KEY")
;;ORB URGENCY^SUICIDE ATTEMPTED/COMPLETED
;;8007,"VAL")
;;High
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY348 3306 printed Dec 13, 2024@02:41:25 Page 2
ORY348 ;SLC/TC - Post-install for patch OR*3*348 ;05/07/12 07:35
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**348**;Dec 17, 1997;Build 14
+2 ;
+3 ; ICR #2053 UPDATE^DIE
+4 ; ICR #2263 EN^XPAR
+5 ; ICR #10013 ^DIK
+6 ; ICR #10141 MES^XPDUTL
+7 ;
POST ; Initiate post-init processes
+1 ;
+2 DO ADDNOT
+3 DO NOTPARAM
+4 QUIT
+5 ;
ADDNOT ; Add Suicide Attempted/Completed Notification to OE/RR Notifications File
+1 NEW DA,DIK,ORFDA,ORIEN,ORMSG
+2 SET DIK="^ORD(100.9,"
SET DA=77
DO ^DIK
+3 SET ORFDA(1,100.9,"+1,",.01)="SUICIDE ATTEMPTED/COMPLETED"
+4 SET ORFDA(1,100.9,"+1,",.02)="OR"
+5 SET ORFDA(1,100.9,"+1,",.03)="Suicide Attempted/Completed."
+6 SET ORFDA(1,100.9,"+1,",.04)="PKG"
+7 SET ORFDA(1,100.9,"+1,",.05)="R"
+8 SET ORFDA(1,100.9,"+1,",.06)="INFODEL"
+9 SET ORFDA(1,100.9,"+1,",.07)="ORB3FUP2"
+10 SET ORFDA(1,100.9,"+1,",1.5)="PXRM"
+11 SET ORFDA(1,100.9,"+1,",4)="Triggered by Clinical Reminders when a MH SUICIDE ATTEMPTED or MH SUICIDE COMPLETED health factor has been documented in PCE. Recipients include MHTC and Teams. Deletion occurs for individual recipient."
+12 SET ORIEN(1)=77
+13 DO UPDATE^DIE("","ORFDA(1)","ORIEN","ORMSG")
+14 IF $DATA(ORMSG)>0
DO ERRMSG("ORMSG")
+15 QUIT
+16 ;
ERRMSG(REF) ; Output and display any error messages as a result of new record entry
+1 ;Write all the descendants of the array reference.
+2 ;REF is the starting array reference, for example A or ^TMP("ORERRMSG",$J).
+3 ;copied from GMTSPI98 & PXRMUTIL
+4 NEW DONE,IND,LEN,LN,PROOT,ROOT,START,TEMP,TEXT
+5 IF REF=""
QUIT
+6 SET LN=0
+7 SET PROOT=$PIECE(REF,")",1)
+8 ;Build the root so we can tell when we are done.
+9 SET TEMP=$NAME(@REF)
+10 SET ROOT=$PIECE(TEMP,")",1)
+11 SET REF=$QUERY(@REF)
+12 IF REF'[ROOT
QUIT
+13 SET DONE=0
+14 FOR
if (REF="")!(DONE)
QUIT
Begin DoDot:1
+15 SET START=$FIND(REF,ROOT)
+16 SET LEN=$LENGTH(REF)
+17 SET IND=$EXTRACT(REF,START,LEN)
+18 SET LN=LN+1
SET TEXT(LN)=PROOT_IND_"="_@REF
+19 SET REF=$QUERY(@REF)
+20 IF REF'[ROOT
SET DONE=1
End DoDot:1
+21 DO MES^XPDUTL(.TEXT)
+22 QUIT
+23 ;
NOTPARAM ; parameter transport routine
+1 KILL ^TMP($JOB,"XPARRSTR")
+2 NEW ENT,IDX,ROOT,REF,VAL,I
+3 SET ROOT=$NAME(^TMP($JOB,"XPARRSTR"))
SET ROOT=$EXTRACT(ROOT,1,$LENGTH(ROOT)-1)_","
+4 DO LOAD
XX2 SET IDX=0
SET ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
+1 FOR
SET IDX=$ORDER(^TMP($JOB,"XPARRSTR",IDX))
if 'IDX
QUIT
Begin DoDot:1
+2 NEW PAR,INST,ORVAL,ORERR
KILL ORVAL
+3 SET PAR=$PIECE(^TMP($JOB,"XPARRSTR",IDX,"KEY"),U)
SET INST=$PIECE(^("KEY"),U,2)
+4 MERGE ORVAL=^TMP($JOB,"XPARRSTR",IDX,"VAL")
+5 DO EN^XPAR(ENT,PAR,INST,.ORVAL,.ORERR)
End DoDot:1
+6 KILL ^TMP($JOB,"XPARRSTR")
+7 QUIT
LOAD ; load data into ^TMP (expects ROOT to be defined)
+1 SET I=1
FOR
SET REF=$TEXT(DATA+I)
if REF=""
QUIT
SET VAL=$TEXT(DATA+I+1)
Begin DoDot:1
+2 SET I=I+2
SET REF=$PIECE(REF,";",3,999)
SET VAL=$PIECE(VAL,";",3,999)
+3 SET @(ROOT_REF)=VAL
End DoDot:1
+4 QUIT
DATA ; parameter data
+1 ;;8000,"KEY")
+2 ;;ORB ARCHIVE PERIOD^SUICIDE ATTEMPTED/COMPLETED
+3 ;;8000,"VAL")
+4 ;;30
+5 ;;8001,"KEY")
+6 ;;ORB DELETE MECHANISM^SUICIDE ATTEMPTED/COMPLETED
+7 ;;8001,"VAL")
+8 ;;Individual Recipient
+9 ;;8002,"KEY")
+10 ;;ORB FORWARD BACKUP REVIEWER^SUICIDE ATTEMPTED/COMPLETED
+11 ;;8002,"VAL")
+12 ;;0
+13 ;;8003,"KEY")
+14 ;;ORB FORWARD SUPERVISOR^SUICIDE ATTEMPTED/COMPLETED
+15 ;;8003,"VAL")
+16 ;;0
+17 ;;8004,"KEY")
+18 ;;ORB FORWARD SURROGATES^SUICIDE ATTEMPTED/COMPLETED
+19 ;;8004,"VAL")
+20 ;;0
+21 ;;8005,"KEY")
+22 ;;ORB PROCESSING FLAG^SUICIDE ATTEMPTED/COMPLETED
+23 ;;8005,"VAL")
+24 ;;Disabled
+25 ;;8006,"KEY")
+26 ;;ORB PROVIDER RECIPIENTS^SUICIDE ATTEMPTED/COMPLETED
+27 ;;8006,"VAL")
+28 ;;CM
+29 ;;8007,"KEY")
+30 ;;ORB URGENCY^SUICIDE ATTEMPTED/COMPLETED
+31 ;;8007,"VAL")
+32 ;;High