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

LACOLTSE.m

Go to the documentation of this file.
LACOLTSE ;SLC/DLG/FHS - COULTER STACK S VER. 1E SOFTWARE DATA PROCESSING ;8/16/90  14:0 ;
 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
 ;CROSS LINK BY ID = SAMPLE #,IDE=BAR CODED NUMBER
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))  D ^LASET Q:'TSK  S X="TRAP^"_LANM,@^%ZOSF("TRAP")
 S TEST("CASS/POS")="",TEST("ID1")="IDE",TEST("ID2")="ID",I=0
 F  S I=$O(TC(I)) Q:I<1  S TEST(TC(I,4))=TC(I,1)
LA2 K Y,TV,ID,IDE S (A,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="ID1"!(TEST="ID2") S V=$E(IN,4,15) D NUM S @TEST(TEST)=+V G C2
 I TEST="CASS/POS" S V=$E(IN,10,16) D NUM S TRAY=+$P(V,"/",1),CUP=+$P(V,"/",2) G C2
 I TEST="HGB" D IN,IN S V=$E(IN,3,9) D NUM G C4
 S V=$E(IN,5,12) D NUM
C4 S V=$S("-----:::::?????.....+++++*"[V:"",1:V) S:V]"" @TEST(TEST)=+V G C2
SAVE I $D(IDE),IDE>0 S ID=IDE
 G LA2:'$D(ID),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
 Q
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