source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACOLT6.m@ 901

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1LACOLT6 ;SLC/RWF - COULTER S PLUS VI, DT WITH DH INTERFACE ;7/20/90 07:55 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;Format 1, CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID, IDE=patient 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 S SS="CH",SPEC=$P(^LAB(69.9,1,1),U,1)
9LA2 K TV,Y S A=0,TOUT=0 D IN G QUIT:TOUT,LA2:IN'["--------"
10C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:$E(IN,1,8)="--------"
11C3 S A=A+1,Y(A)="" I A<5 S Y(A)=IN G C2
12 S V=$E(IN,6,99) D NUM
13 S Y(A)=$S(".....-----+++++"[V:"",1:V) G C2
14SAVE S V=$E(Y(2),5,8) D NUM S ID=+V,TRAY=1,CUP=ID,V=$P(Y(4),"LAB",2) D NUM S IDE=+V G LA2:ID'>0
15 F I=0:0 S I=$O(TC(I)) Q:I<1 X TC(I,2) S @TC(I,1)=V
16LA3 X LAGEN G LA2:ISQN<1
17 F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
18 G LA2
19LOST S:'$D(^LA("LOST",DT)) ^LA("LOST",DT)=1
20 S AA=^LA("LOST",DT),^LA("LOST",DT,AA)=IN,^LA("LOST",DT)=AA+1
21 G LA2
22 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>9 H 9 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
29OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
30 LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
31 Q
32QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
33 Q
34TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
Note: See TracBrowser for help on using the repository browser.