Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LACOLTSS

LACOLTSS.m

Go to the documentation of this file.
LACOLTSS ; IHS/DIR/FJE - COULTER STACK S DATA PROCESSING 8/16/90 14:0 ;
 ;;5.2;LA;;NOV 01, 1997
 ;;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