source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACOLTSS.m@ 1582

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1LACOLTSS ;SLC/DLG - COULTER STACK S DATA PROCESSING ;8/16/90 14:0 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;CROSS LINK BY ID = SAMPLE #, TRAY=1,CUP=ID
4LA1 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)),U="^" Q:TSK<1
5 Q:'$D(^LA(TSK,"I",0)) S TOUT=0 D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
6 S TEST("CASS/POS")="",TEST("ID1")="IDE",TEST("ID2")="ID"
7 F I=0:0 S I=$O(TC(I)) Q:+I<1 S TEST(TC(I,4))=TC(I,1)
8LA2 K Y,TV,ID,IDE S A=0,TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,8)'="--------"
9 ;
10C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:$E(IN,1,8)="--------"
11C3 S V=$P(IN," ",1) D NUM S TEST=V G C2:TEST="",C2:'$D(TEST(TEST))
12 I TEST="CASS/POS" S V=$P(IN," ",2,99) D NUM S TRAY=+$P(V,"/",1),CUP=+$P(V,"/",2) G C2
13 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
14 S V=$P(IN," ",2,99) D NUM
15C4 S V=$S("-----.....+++++*"[V:"",1:V) S:V]"" @TEST(TEST)=+V G C2
16SAVE I $D(ID)=0,($D(IDE)=0) K Y,TV,ID,IDE G C2
17 I $D(ID)=0,$D(IDE) S ID=IDE
18 G:'$D(ID) LA2
19 G LA2:+ID<1
20LA3 X LAGEN G LA2:ISQN<1
21 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)
22 G LA2
23IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
24 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
25 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
26 Q
27NUM S X="" F I=1:1:$L(V) S:$A(V,I)-32 X=X_$E(V,I)
28 S V=X Q
29QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
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.