source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACEL8E.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1LACEL8E ;SLC/DLG - CELLECT 8E ;8/16/90 14:07 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ; CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID
4LA1 S:$D(ZTQUEUED) ZTREQ="@"
5 S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)),U="^" Q:TSK<1
6 Q:'$D(^LA(TSK,"I",0))
7 S TOUT=0,TP="",LRTOP=$P(^LAB(69.9,1,1),U,1) D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
8 F I=1:1:10 S ZZ(I)=$P("WBC^RBC^HB^HCT^MCV^MCH^MCHC^RDW^PLT^MPV",U,I),ZZ("B",ZZ(I),I)=""
9LA2 K TV,Y S A=0,TOUT=0 D IN G QUIT:TOUT D NUM G LA2:$E(IN,1,2)'=",," D QC
10 S TOUT=0 F I=0:0 D IN Q:TOUT Q:IN="" D NUM,QC
11 G QUIT:TOUT S TRAY=1,(ID,IDE,CUP)=$P(Y(1),",",3) G LA2:ID'>0
12 S SPEC=$P(^LAB(69.9,1,1),U,1)
13 F J=2:1:A S Z=$P(Y(J),",") I Z]"" S I=$O(ZZ("B",Z,0)) I I>0 S V=$P(Y(J),",",2) S @TC(I,1)=+V
14LA3 X LAGEN G LA2:ISQN<1
15 F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
16 G LA2
17IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
18 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
19 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
20 Q
21QC S A=A+1,Y(A)=IN Q
22NUM S X="" F I=1:1:$L(IN) S:$A(IN,I)-32 X=X_$E(IN,I)
23 S IN=X Q
24OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
25 LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
26 Q
27QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
28 Q
29TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
Note: See TracBrowser for help on using the repository browser.