LACOLTSS ;SLC/DLG - COULTER STACK S DATA PROCESSING ;8/16/90 14:0 ;
;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
;CROSS LINK BY ID = SAMPLE #, TRAY=1,CUP=ID
LA1 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)),U="^" Q:TSK<1
Q:'$D(^LA(TSK,"I",0)) S TOUT=0 D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
S TEST("CASS/POS")="",TEST("ID1")="IDE",TEST("ID2")="ID"
F I=0:0 S I=$O(TC(I)) Q:+I<1 S TEST(TC(I,4))=TC(I,1)
LA2 K Y,TV,ID,IDE S A=0,TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,8)'="--------"
;
C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:$E(IN,1,8)="--------"
C3 S V=$P(IN," ",1) D NUM S TEST=V G C2:TEST="",C2:'$D(TEST(TEST))
I TEST="CASS/POS" S V=$P(IN," ",2,99) D NUM S TRAY=+$P(V,"/",1),CUP=+$P(V,"/",2) G C2
I TEST="RDW" S V=$P(IN," ",2,99) D NUM S V=$S($L(V)=6:$E(V,1,2),$L(V)=5:$E(V,1),1:"") D IN,IN S V=V_$E(IN,3,8) D NUM G C4
S V=$P(IN," ",2,99) D NUM
C4 S V=$S("-----.....+++++*"[V:"",1:V) S:V]"" @TEST(TEST)=+V G C2
SAVE I $D(ID)=0,($D(IDE)=0) K Y,TV,ID,IDE G C2
I $D(ID)=0,$D(IDE) S ID=IDE
G:'$D(ID) LA2
G LA2:+ID<1
LA3 X LAGEN G LA2:ISQN<1
F I=0:0 S I=$O(TV(I)) Q:I<1 I $D(TV(I,1)),TV(I,1)]"" S ^LAH(LWL,1,ISQN,I)=TV(I,1)
G LA2
IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
Q
NUM S X="" F I=1:1:$L(V) S:$A(V,I)-32 X=X_$E(V,I)
S V=X Q
QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
Q
TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLACOLTSS 1556 printed Dec 13, 2024@01:42:02 Page 2
LACOLTSS ;SLC/DLG - COULTER STACK S DATA PROCESSING ;8/16/90 14:0 ;
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
+2 ;CROSS LINK BY ID = SAMPLE #, TRAY=1,CUP=ID
LA1 if $DATA(ZTQUEUED)
SET ZTREQ="@"
SET LANM=$TEXT(+0)
SET TSK=$ORDER(^LAB(62.4,"C",LANM,0))
SET U="^"
if TSK<1
QUIT
+1 if '$DATA(^LA(TSK,"I",0))
QUIT
SET TOUT=0
DO ^LASET
if 'TSK
QUIT
SET X="TRAP^"_LANM
SET @^%ZOSF("TRAP")
+2 SET TEST("CASS/POS")=""
SET TEST("ID1")="IDE"
SET TEST("ID2")="ID"
+3 FOR I=0:0
SET I=$ORDER(TC(I))
if +I<1
QUIT
SET TEST(TC(I,4))=TC(I,1)
LA2 KILL Y,TV,ID,IDE
SET A=0
SET TOUT=0
DO IN
if TOUT
GOTO QUIT
if $EXTRACT(IN,1,8)'="--------"
GOTO LA2
+1 ;
C2 SET TOUT=0
DO IN
if TOUT
GOTO QUIT
if $EXTRACT(IN,1,8)="--------"
GOTO SAVE
C3 SET V=$PIECE(IN," ",1)
DO NUM
SET TEST=V
if TEST=""
GOTO C2
if '$DATA(TEST(TEST))
GOTO C2
+1 IF TEST="CASS/POS"
SET V=$PIECE(IN," ",2,99)
DO NUM
SET TRAY=+$PIECE(V,"/",1)
SET CUP=+$PIECE(V,"/",2)
GOTO C2
+2 IF TEST="RDW"
SET V=$PIECE(IN," ",2,99)
DO NUM
SET V=$SELECT($LENGTH(V)=6:$EXTRACT(V,1,2),$LENGTH(V)=5:$EXTRACT(V,1),1:"")
DO IN
DO IN
SET V=V_$EXTRACT(IN,3,8)
DO NUM
GOTO C4
+3 SET V=$PIECE(IN," ",2,99)
DO NUM
C4 SET V=$SELECT("-----.....+++++*"[V:"",1:V)
if V]""
SET @TEST(TEST)=+V
GOTO C2
SAVE IF $DATA(ID)=0
IF ($DATA(IDE)=0)
KILL Y,TV,ID,IDE
GOTO C2
+1 IF $DATA(ID)=0
IF $DATA(IDE)
SET ID=IDE
+2 if '$DATA(ID)
GOTO LA2
+3 if +ID<1
GOTO LA2
LA3 XECUTE LAGEN
if ISQN<1
GOTO LA2
+1 FOR I=0:0
SET I=$ORDER(TV(I))
if I<1
QUIT
IF $DATA(TV(I,1))
IF TV(I,1)]""
SET ^LAH(LWL,1,ISQN,I)=TV(I,1)
+2 GOTO LA2
IN SET CNT=^LA(TSK,"I",0)+1
IF '$DATA(^(CNT))
SET TOUT=TOUT+1
if TOUT>9
QUIT
HANG 9
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
NUM SET X=""
FOR I=1:1:$LENGTH(V)
if $ASCII(V,I)-32
SET X=X_$EXTRACT(V,I)
+1 SET V=X
QUIT
QUIT LOCK ^LA(TSK)
HANG 1
KILL ^LA(TSK),^LA("LOCK",TSK),^TMP($JOB),^TMP("LA",$JOB)
+1 QUIT
TRAP ;ERROR TRAP
DO ^LABERR
SET T=TSK
DO SET^LAB
GOTO @("LA2^"_LANM)