21 lines
814 B
Mathematica
21 lines
814 B
Mathematica
MCARASE ;SLC/RWF,SAE-MEDICINE AUTO INSTRUMENT SETUP VAR FOR DATA COLLECTION ;5/2/96 13:52
|
|
;;2.3;Medicine;;09/13/1996
|
|
SETTSK S:$D(ZTQUEUED) ZTREQ="@" K ZTSK ;Clean up
|
|
Q:'$D(TSK) Q:TSK<1 L +^LA("LOCK") I $D(^LA("LOCK",TSK)) S TSK=0 L -^LA("LOCK") Q
|
|
S ^LA("LOCK",TSK)=$J L -^LA("LOCK")
|
|
K ^TMP($J),^TMP("LA",$J)
|
|
S X=^LAB(62.4,TSK,0),U="^" D TRAP:$P(X,U)=MCINST
|
|
Q
|
|
TRAP S TRAP=$P(^%ZOSF("TRAP"),"=")_"=""TRAP^"_LANM_""""
|
|
Q
|
|
NEW S ZTRTN=U_$P(^LAB(62.4,T,0),U,3),ZTDTH=$H,ZTIO=""
|
|
D SET,^%ZTLOAD:$L(ZTRTN)>3
|
|
Q
|
|
RESTART I $D(^LA(T,"I",0)) S ZTRTN=U_$P(^LAB(62.4,T,0),U,3),ZTDTH=$H,ZTIO="" D ^%ZTLOAD:$L(ZTRTN)>3
|
|
Q
|
|
SET S ER=$D(^LA(T,"I"))#2 Q:ER S ^LA(T,"I")=0,^("I",0)=0,^LA(T,"O")=0,^("O",0)=0
|
|
Q
|
|
ERROR S ^TMP($J,1)=LANM,^(2)=TSK I $G(^%ZOSF("ERRTN"))]"" D @^%ZOSF("ERRTN")
|
|
S LANM=^TMP($J,1),TSK=^(2),U="^"
|
|
Q
|