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

LACEL8E.m

Go to the documentation of this file.
LACEL8E ;SLC/DLG - CELLECT 8E ;8/16/90  14:07 ;
 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
 ; CROSS LINK ID = SEQ # ,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,TP="",LRTOP=$P(^LAB(69.9,1,1),U,1) D ^LASET Q:'TSK  S X="TRAP^"_LANM,@^%ZOSF("TRAP")
 F I=1:1:10 S ZZ(I)=$P("WBC^RBC^HB^HCT^MCV^MCH^MCHC^RDW^PLT^MPV",U,I),ZZ("B",ZZ(I),I)=""
LA2 K TV,Y S A=0,TOUT=0 D IN G QUIT:TOUT D NUM G LA2:$E(IN,1,2)'=",," D QC
 S TOUT=0 F I=0:0 D IN Q:TOUT  Q:IN=""  D NUM,QC
 G QUIT:TOUT S TRAY=1,(ID,IDE,CUP)=$P(Y(1),",",3) G LA2:ID'>0
 S SPEC=$P(^LAB(69.9,1,1),U,1)
 F J=2:1:A S Z=$P(Y(J),",") I Z]"" S I=$O(ZZ("B",Z,0)) I I>0 S V=$P(Y(J),",",2) S @TC(I,1)=+V
LA3 X LAGEN G LA2:ISQN<1
 F I=0:0 S I=$O(TV(I)) Q:I<1  S:TV(I,1)]"" ^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
QC S A=A+1,Y(A)=IN Q
NUM S X="" F I=1:1:$L(IN) S:$A(IN,I)-32 X=X_$E(IN,I)
 S IN=X Q
OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
 LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
 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