1 | LACOLT5 ;SLC/RWF - COULTER S PLUS T660 IV V VI JT JT3 SR ST STKR ;7/20/90 07:54 ;
|
---|
2 | ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
|
---|
3 | ;Format 1, CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID, IDE=patient id
|
---|
4 | LA1 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))
|
---|
6 | S TOUT=0,TP="",LRTOP=$P(^LAB(69.9,1,1),U,1) D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
|
---|
7 | S SS="CH"
|
---|
8 | LA2 K TV,Y S A=0,TOUT=0 D IN G QUIT:TOUT,LA2:IN'["--------"
|
---|
9 | C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:$E(IN,1,8)="--------"
|
---|
10 | C3 S A=A+1,Y(A)=""
|
---|
11 | S X="" F I=1:1:$L(IN) S:$A(IN,I)-32 X=X_$E(IN,I)
|
---|
12 | S F(A)=$P(X,",",1),X=$P(X,",",2),Y(A)=$S(".....-----+++++"[X:"",1:X) G C2
|
---|
13 | SAVE G LOST:'$D(Y(2)) F I=0:0 S I=$O(TC(I)) Q:I<1 X TC(I,2) S @TC(I,1)=V
|
---|
14 | S ID=+Y(2),TRAY=1,CUP=ID,IDE=+Y(4) G LA2:ID'>0 S SPEC=$P(^LAB(69.9,1,1),U,1)
|
---|
15 | LA3 X LAGEN G LA2:ISQN<1
|
---|
16 | F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
|
---|
17 | G LA2
|
---|
18 | LOST S:'$D(^LA("LOST",DT)) ^LA("LOST",DT)=1
|
---|
19 | S AA=^LA("LOST",DT),^LA("LOST",DT,AA)=IN,^LA("LOST",DT)=AA+1
|
---|
20 | G LA2
|
---|
21 | Q
|
---|
22 | IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
|
---|
23 | S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
|
---|
24 | S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
|
---|
25 | Q
|
---|
26 | OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
|
---|
27 | LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
|
---|
28 | Q
|
---|
29 | QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
|
---|
30 | Q
|
---|
31 | TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
|
---|