ORY1007 ;IHS/MSC/MSC - Export Package Level Parameters and install Expert System rule for OR*3*1007 ;05-Nov-2010 14:42;DU
;;3.0;ORDER ENTRY/RESULTS REPORTING;**128**;Dec 17, 1997;Build 3
MAIN ; main (initial) 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,VAL,ERR
. S PAR=$P(^TMP($J,"XPARRSTR",IDX,"KEY"),U),INST=$P(^("KEY"),U,2)
. M VAL=^TMP($J,"XPARRSTR",IDX,"VAL")
. D EN^XPAR(ENT,PAR,INST,.VAL,.ERR)
K ^TMP($J,"XPARRSTR")
;
D S^ORY007ES ; expert system rule post install
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
;;9417,"KEY")
;;ORK CLINICAL DANGER LEVEL^ALLERGIES UNASSESSIBLE
;;9417,"VAL")
;;Moderate
;;9418,"KEY")
;;ORK PROCESSING FLAG^ALLERGIES UNASSESSIBLE
;;9418,"VAL")
;;Disabled
ORY1007 ;IHS/MSC/MSC - Export Package Level Parameters and install Expert System rule for OR*3*1007 ;05-Nov-2010 14:42;DU
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**128**;Dec 17, 1997;Build 3
MAIN ; main (initial) 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,VAL,ERR
+3 SET PAR=$PIECE(^TMP($JOB,"XPARRSTR",IDX,"KEY"),U)
SET INST=$PIECE(^("KEY"),U,2)
+4 MERGE VAL=^TMP($JOB,"XPARRSTR",IDX,"VAL")
+5 DO EN^XPAR(ENT,PAR,INST,.VAL,.ERR)
End DoDot:1
+6 KILL ^TMP($JOB,"XPARRSTR")
+7 ;
+8 ; expert system rule post install
DO S^ORY007ES
+9 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 ;;9417,"KEY")
+2 ;;ORK CLINICAL DANGER LEVEL^ALLERGIES UNASSESSIBLE
+3 ;;9417,"VAL")
+4 ;;Moderate
+5 ;;9418,"KEY")
+6 ;;ORK PROCESSING FLAG^ALLERGIES UNASSESSIBLE
+7 ;;9418,"VAL")
+8 ;;Disabled