source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACOLT2.m

Last change on this file was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1LACOLT2 ;SLC/RWF - COULTER S PLUS II DATA PROCESSING ;7/20/90 07:53 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID, IDE=0
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))
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 F I=1:1:15 S ZZ(I)=$P("DATE^TEST^WBC^RBC^HGB^HCT^MCV^MCH^MCHC^RDW^PLT^MPV^LY%^LY#",U,I)
9LA2 K Y S A=0,TOUT=0 D IN G QUIT:TOUT,C3:IN["DATE",LA2:IN'["-------"
10 ;
11C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:IN["-------",C2:IN'[","
12C3 ;S A=A+1,Y(A)=""
13 S X="" F I=1:1:$L(IN) S:$A(IN,I)-32 X=X_$E(IN,I)
14 S NM=$P(X,",",1),NM=$S(NM?1P.A:$E(NM,2,9),1:NM) F A=1:1:15 Q:ZZ(A)=NM
15 G C2:A>14 S Y(A)=$P(X,",",2),F(A)=$E(IN,1)
16 ;IF NM'[$P(ZZ,U,A) G LOST:$P(ZZ,U,A)'="DATE" G C2
17 S X=Y(A),Y(A)=$S(X=".....":"",1:+X)_$S(A>2&(F(A)]" "):F(A),1:"") G C2
18SAVE 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
19 S ID=+Y(2),TRAY=1,CUP=ID,IDE=0 G LA2:ID'>0 S SPEC=$P(^LAB(69.9,1,1),U,1)
20LA3 X LAGEN G LA2:ISQN<1
21 F I=0:0 S I=$O(TV(I)) Q:I<1 D LA4
22 G LA2
23LA4 I $D(TV(I,1)),TV(I,1)]"" S ^LAH(LWL,1,ISQN,I)=TV(I,1) Q
24 Q
25LOST S:'$D(^LA("LOST",DT)) ^LA("LOST",DT)=1
26 S AA=^LA("LOST",DT),^LA("LOST",DT,AA)=IN,^LA("LOST",DT)=AA+1
27 G LA2
28 Q
29IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
30 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
31 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
32 Q
33OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
34 LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
35 Q
36QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
37 Q
38TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
39TEST S ^LA(5,"I",0)=0 G LACOLT2
Note: See TracBrowser for help on using the repository browser.