source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LAE4A.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1LAE4A ;SLC/RWF - BECKMAN E4A ELECROTLYTE ANALYZER ;8/16/90 14:15 ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;CROSS LINK ID=TRAY_CUP
4 S:$D(ZTQUEUED) ZTREQ="@" S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:'$D(^LA(TSK,"I",0))
5 S SS="CH",IDT=0 D ^LASET Q:TSK<1 S X="TRAP^"_LANM,@^%ZOSF("TRAP")
6 F I=1:1:TC S LA(TC(I,4))=TC(I,1)
7 S TOUT=0,ID=0,ERR=0,SAM="S"
8LA2 D IN G QUIT:TOUT,LA9:IN'?1"[".ANP1"]".AN
9 S TAG=+$E(IN,2,3) G NEW:TAG=1,DATA:TAG=2,ET:TAG=99,DATA:TAG=3,LA2
10DATA D CS S ERR=ERR+ER,TEST=$E(IN,5,7) IF '$D(LA(TEST)) G LA2
11 S X=$E(IN,9,14) D PACK S @LA(TEST)=X G LA2
12CALC G DATA ;PROCESS SAME AS DATA
13NEW S CUP=+$E(IN,17,18),TRAY=+$E(IN,20,21),ERR=0,ID=TRAY_CUP
14 F I=1:1:TC S @TC(I,1)=""
15 S TYPE=$E(IN,23,24),SAM=$E(IN,26)
16IDQC D CS S ERR=ERR+ER
17 G LA9:TYPE="CA",LA2
18ET IF ERR>1!('ID) G LA9
19 S SPEC=$S(SAM="S":$P(^LAB(69.9,1,1),U,3),SAM="U":$P(^LAB(69.9,1,1),U,2),1:0)
20 X LAGEN
21 F I=0:0 S I=$O(TV(I)) Q:I<1 D LA4
22LA9 S REC="",IDE=0,ID=0 G LA2
23LA4 S R=$S($D(TV(I,1)):TV(I,1),1:"")
24 S:R]"" ^LAH(LWL,1,ISQN,I)=R Q
25 Q
26CS S CS=0,Y=$L(IN)-1 F I=1:1:Y-1 S CS=$A(IN,I)+CS
27 S X=$A(IN,Y)-48 S:X>9 X=X-7 S ER=X*16,X=$A(IN,Y+1)-48 S:X>9 X=X-7 S X=X+ER
28 S ER=CS+X#256
29 Q
30PACK S Y=X,X="" F I=1:1:$L(Y) S:$A(Y,I)-32 X=X_$E(Y,I)
31 Q:X="" S:X'?.P1N.NP X="*" Q
32IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) Q:TOUT>9 S TOUT=TOUT+1 H 9 G IN
33 S IN=^(CNT),^(0)=CNT,TOUT=0
34 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
35 Q
36QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
37 Q
38Z ;01A^4^01B^5^02A^7^03A^3^04A^6^05A^2^06A^1^10A^10^
39TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
Note: See TracBrowser for help on using the repository browser.