source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LATDX.m@ 1683

Last change on this file since 1683 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1LATDX ;SLC/RWF - ABBOTT TDX,PACKARD TDX ;7/20/90 10:16 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;CROSS LINK BY CUP
4LA1 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
5 Q:'$D(^LA(TSK))
6 D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
7LA2 S TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,5)'="ASSAY" S TEST=$E(IN,8,23)
8 F I=0:0 S I=$O(TC(I)) Q:I<1 S X1=TC(I,4) Q:X1=TEST
9 G LA2:'$D(X1)!(X1'=TEST) S TESTX=I
10LA2A D IN I $E(IN,1,8)="CAROUSEL" S V=$E(IN,11,12) D NUM S TRAY=+V
11 G LA2A:$E(IN,1,3)'="LOC"
12 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
13 K TV G LA2:IN'["CALCULATION" F A=1:1:2 S TOUT=0 D IN G QUIT:TOUT
14 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
15 G LA2:'$D(X1)!(X1'=TEST) S TESTX=I
16 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
17 K TV G LA2
18LA3 X LAGEN
19 F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
20 Q
21QC ;QC TESTING HERE; S BAD=1 IF DONT STORE
22 S Y(A)=IN Q
23NUM S X="" F JJ=1:1:$L(V) S:$A(V,JJ)>32 X=X_$E(V,JJ)
24 S V=X Q
25IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>300 H 5 G IN
26 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
27 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
28 Q
29QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK)
30 Q
31TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
Note: See TracBrowser for help on using the repository browser.