source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACOLTSE.m@ 1000

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1LACOLTSE ;SLC/DLG/FHS - COULTER STACK S VER. 1E SOFTWARE DATA PROCESSING ;8/16/90 14:0 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;CROSS LINK BY ID = SAMPLE #,IDE=BAR CODED NUMBER
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)) D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
6 S TEST("CASS/POS")="",TEST("ID1")="IDE",TEST("ID2")="ID",I=0
7 F S I=$O(TC(I)) Q:I<1 S TEST(TC(I,4))=TC(I,1)
8LA2 K Y,TV,ID,IDE S (A,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="ID1"!(TEST="ID2") S V=$E(IN,4,15) D NUM S @TEST(TEST)=+V G C2
13 I TEST="CASS/POS" S V=$E(IN,10,16) D NUM S TRAY=+$P(V,"/",1),CUP=+$P(V,"/",2) G C2
14 I TEST="HGB" D IN,IN S V=$E(IN,3,9) D NUM G C4
15 S V=$E(IN,5,12) D NUM
16C4 S V=$S("-----:::::?????.....+++++*"[V:"",1:V) S:V]"" @TEST(TEST)=+V G C2
17SAVE I $D(IDE),IDE>0 S ID=IDE
18 G LA2:'$D(ID),LA2:+ID<1
19LA3 X LAGEN G LA2:ISQN<1
20 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)
21 G LA2
22 Q
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.