LACOARA4 ; IHS/DIR/FJE - ORGANON RA4 INTERFACE 07:00 ; [ 09/12/94 ]
;;5.2;LA;;NOV 01, 1997
;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
;This routine has been modified by RAF/SLC for Miles City, it is
;to be considered class III software until Dallas releases it as
;part of the verified LAB package.
;SET PARAM 3:=1,TEST:=PT
;SET PARAM 3:=0,TEST:=PTT
;
LA1 S:$D(ZTQUEUED) ZTREQ="@"
S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
Q:'$D(^LA(TSK,"I",0))
D ^LASET Q:'TSK S X="TRAP"_LANM,@^%ZOSF("TRAP")
F S I=$O(TC(I)) Q:'I S TEST(TC(I,4))=TC(I,1),FIX(TC(I,4))=TC(I,2)
LA2 K TV S TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,4)'="DATE" D IN,IN
LA21 D IN G LA2:IN=255 S V=$E(IN,1,3) D NUM S CUP=+V,(IDE,ID)=+$E(IN,5,10),TRAY=1
S V=$E(IN,13,14) D NUM S TEST=+V,V=$E(IN,19,24) D NUM
I $D(TEST(TEST)) X:$L($G(FIX(TEST))) FIX(TEST) S @TEST(TEST)=V
LA3 X LAGEN Q:'ISQN ;CAN BE CHANGED BY CROSS-LINK CODE
F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
K TV G LA21
Q
NUM S X="" F JJ=1:1:$L(V) S:$A(V,JJ)>32 X=X_$E(V,JJ)
S V=X Q
IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 20 G IN
S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
Q
QUIT L ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK) D
.K CNT,CTRL,CUP,FIX,I,ID,IDE,IN,ISQN,JJ,LAGEN,LANM,LWL,T,TC,TEST,TOUT
.K TRAY,TSK,TV,U,V,X
Q
TRAP K ^LA("LOCK",TSK) S T=TSK D SET^LAB,ERROR^LASET Q:'$D(^LA(TSK,"I",0))
G @("LA2^"_LANM) ;ERROR TRAP
Q
LACOARA4 ; IHS/DIR/FJE - ORGANON RA4 INTERFACE 07:00 ; [ 09/12/94 ]
+1 ;;5.2;LA;;NOV 01, 1997
+2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
+3 ;This routine has been modified by RAF/SLC for Miles City, it is
+4 ;to be considered class III software until Dallas releases it as
+5 ;part of the verified LAB package.
+6 ;SET PARAM 3:=1,TEST:=PT
+7 ;SET PARAM 3:=0,TEST:=PTT
+8 ;
LA1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+1 SET LANM=$TEXT(+0)
SET TSK=$ORDER(^LAB(62.4,"C",LANM,0))
IF TSK<1
QUIT
+2 IF '$DATA(^LA(TSK,"I",0))
QUIT
+3 DO ^LASET
IF 'TSK
QUIT
SET X="TRAP"_LANM
SET @^%ZOSF("TRAP")
+4 FOR
SET I=$ORDER(TC(I))
IF 'I
QUIT
SET TEST(TC(I,4))=TC(I,1)
SET FIX(TC(I,4))=TC(I,2)
LA2 KILL TV
SET TOUT=0
DO IN
IF TOUT
GOTO QUIT
IF $EXTRACT(IN,1,4)'="DATE"
GOTO LA2
DO IN
DO IN
LA21 DO IN
IF IN=255
GOTO LA2
SET V=$EXTRACT(IN,1,3)
DO NUM
SET CUP=+V
SET (IDE,ID)=+$EXTRACT(IN,5,10)
SET TRAY=1
+1 SET V=$EXTRACT(IN,13,14)
DO NUM
SET TEST=+V
SET V=$EXTRACT(IN,19,24)
DO NUM
+2 IF $DATA(TEST(TEST))
IF $LENGTH($GET(FIX(TEST)))
XECUTE FIX(TEST)
SET @TEST(TEST)=V
LA3 ;CAN BE CHANGED BY CROSS-LINK CODE
XECUTE LAGEN
IF 'ISQN
QUIT
+1 FOR I=0:0
SET I=$ORDER(TV(I))
IF I<1
QUIT
IF TV(I,1)]""
SET ^LAH(LWL,1,ISQN,I)=TV(I,1)
+2 KILL TV
GOTO LA21
+3 QUIT
NUM SET X=""
FOR JJ=1:1:$LENGTH(V)
IF $ASCII(V,JJ)>32
SET X=X_$EXTRACT(V,JJ)
+1 SET V=X
QUIT
IN SET CNT=^LA(TSK,"I",0)+1
IF '$DATA(^(CNT))
SET TOUT=TOUT+1
IF TOUT>9
QUIT
HANG 20
GOTO IN
+1 SET ^LA(TSK,"I",0)=CNT
SET IN=^(CNT)
SET TOUT=0
+2 IF IN["~"
SET CTRL=$PIECE(IN,"~",2)
SET IN=$PIECE(IN,"~",1)
+3 QUIT
QUIT LOCK ^LA(TSK)
HANG 1
KILL ^LA(TSK),^LA("LOCK",TSK)
Begin DoDot:1
+1 KILL CNT,CTRL,CUP,FIX,I,ID,IDE,IN,ISQN,JJ,LAGEN,LANM,LWL,T,TC,TEST,TOUT
+2 KILL TRAY,TSK,TV,U,V,X
End DoDot:1
+3 QUIT
TRAP KILL ^LA("LOCK",TSK)
SET T=TSK
DO SET^LAB
DO ERROR^LASET
IF '$DATA(^LA(TSK,"I",0))
QUIT
+1 ;ERROR TRAP
GOTO @("LA2^"_LANM)
+2 QUIT