source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACOARA4.m@ 1650

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1LACOARA4 ;SLC/RAF - ORGANON RA4 INTERFACE ;09/12/94 07:00
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
3 ;This routine has been modified by RAF/SLC for Miles City, it is
4 ;to be considered class III software until Dallas releases it as
5 ;part of the verified LAB package.
6 ;SET PARAM 3:=1,TEST:=PT
7 ;SET PARAM 3:=0,TEST:=PTT
8 ;
9LA1 S:$D(ZTQUEUED) ZTREQ="@"
10 S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
11 Q:'$D(^LA(TSK,"I",0))
12 D ^LASET Q:'TSK S X="TRAP"_LANM,@^%ZOSF("TRAP")
13 F S I=$O(TC(I)) Q:'I S TEST(TC(I,4))=TC(I,1),FIX(TC(I,4))=TC(I,2)
14LA2 K TV S TOUT=0 D IN G QUIT:TOUT,LA2:$E(IN,1,4)'="DATE" D IN,IN
15LA21 D IN G LA2:IN=255 S V=$E(IN,1,3) D NUM S CUP=+V,(IDE,ID)=+$E(IN,5,10),TRAY=1
16 S V=$E(IN,13,14) D NUM S TEST=+V,V=$E(IN,19,24) D NUM
17 I $D(TEST(TEST)) X:$L($G(FIX(TEST))) FIX(TEST) S @TEST(TEST)=V
18LA3 X LAGEN Q:'ISQN ;CAN BE CHANGED BY CROSS-LINK CODE
19 F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
20 K TV G LA21
21 Q
22NUM S X="" F JJ=1:1:$L(V) S:$A(V,JJ)>32 X=X_$E(V,JJ)
23 S V=X Q
24IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 20 G IN
25 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
26 S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
27 Q
28QUIT L ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK) D
29 .K CNT,CTRL,CUP,FIX,I,ID,IDE,IN,ISQN,JJ,LAGEN,LANM,LWL,T,TC,TEST,TOUT
30 .K TRAY,TSK,TV,U,V,X
31 Q
32TRAP K ^LA("LOCK",TSK) S T=TSK D SET^LAB,ERROR^LASET Q:'$D(^LA(TSK,"I",0))
33 G @("LA2^"_LANM) ;ERROR TRAP
34 Q
Note: See TracBrowser for help on using the repository browser.