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

LATDX.m

Go to the documentation of this file.
LATDX ; IHS/DIR/FJE - ABBOTT TDX,PACKARD TDX 7/20/90 10:16 ;
 ;;5.2;LA;;NOV 01, 1997
 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
 ;CROSS LINK BY CUP
LA1 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
 Q:'$D(^LA(TSK))
 D ^LASET Q:'TSK  S X="TRAP^"_LANM,@^%ZOSF("TRAP")
LA2 S TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,5)'="ASSAY" S TEST=$E(IN,8,23)
 F I=0:0 S I=$O(TC(I)) Q:I<1  S X1=TC(I,4) Q:X1=TEST
 G LA2:'$D(X1)!(X1'=TEST) S TESTX=I
LA2A D IN I $E(IN,1,8)="CAROUSEL" S V=$E(IN,11,12) D NUM S TRAY=+V
 G LA2A:$E(IN,1,3)'="LOC"
 S TOUT=0 S:'$D(TRAY) TRAY=1 F A=1:1:20 D IN S V=$E(IN,1,2) D NUM Q:+V>20!(+V<1)  S CUP=+V,V=$E(IN,5,13) D NUM S:+V'=0 @TC(TESTX,1)=V D LA3
 K TV G LA2:IN'["CALCULATION" F A=1:1:2 S TOUT=0 D IN G QUIT:TOUT
 S V=$E(IN,24,36) D NUM S TEST=V F I=0:0 S I=$O(TC(I)) Q:I<1  S X1=TC(I,4) Q:X1=TEST
 G LA2:'$D(X1)!(X1'=TEST) S TESTX=I
 S TOUT=0 F A=1:1:20 D IN S V=$E(IN,1,2) D NUM Q:+V>20!(+V<1)  S CUP=+V,V=$E(IN,24,35) D NUM S:+V @TC(TESTX,1)=V D LA3
 K TV G LA2
LA3 X LAGEN
 F I=0:0 S I=$O(TV(I)) Q:I<1  S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
 Q
QC ;QC TESTING HERE; S BAD=1 IF DONT STORE
 S Y(A)=IN 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>300  H 5 G IN
 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
 Q
QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK)
 Q
TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP