source: WorldVistAEHR/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LACD3500.m@ 1582

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1LACD3500 ;SLC/DLG/FHS/PAC- CELL-DYN 1500,1600,2000 AUTOMATED DATA ; 6/2/89 8:57 AM ;
2 ;;5.2;AUTOMATED LAB INSTRUMENTS;**8,15**;Sep 27, 1994;
3 ;CROSS LINK BY ID OR IDE
4LA1 S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)) Q:TSK<1
5 Q:'$D(^LA(TSK,"I",0)) S LAC=","
6 K LATOP D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
7LA2 K TV,Y S TOUT=0 D IN G QUIT:TOUT,LA2:CTRL'="B"
8 D IN G QUIT:TOUT,LA2:$P(IN,LAC)'=""" """ S TOUT=0,A=1 S Y(A)=IN
9LAC I CTRL'="C" D IN G QUIT:TOUT S TOUT=0,A=A+1,Y(A)=IN G LAC
10 ;S V=$P(Y(1),",",2) D NUM S IDE=+V,V=$E($P(Y(1),",",5),2,8) D NUM S (ID,CUP)=+V,TRAY=1,V=$P(Y(1),",",4) D NUM S TYPE=+V ;MODIFIED FOR CD3000 1/10/92 GLD. ;<543/EPH> Changed 4 to 5 & 3 to 4.
11 S IDE=+$$NUM($P(Y(1),LAC,2)),(ID,CUP)=+$$NUM($E($P(Y(1),LAC,5),2,8))
12 S TRAY=1,TYPE=+$$NUM($P(Y(1),LAC,4))
13 F I=0:0 S I=$O(TC(I)) Q:I<1 X TC(I,2) S @TC(I,1)=V ;V COULD BE MODIFIED ON THIS LINE
14LA3 G:'ID LA2 G:TYPE>1 LA2 X LAGEN G LA2:'ISQN ;Can be changed by the cross-link code/ MODIFIED TO ELIMINATE PROCESSING OF ALL BUT PATIENTS AND CONTROLS GLD 1-13-91
15 F I=0:0 S I=$O(TV(I)) Q:I="" S:TV(I,1)'="" ^LAH(LWL,1,ISQN,I)=TV(I,1) ;MODIFIED replaced >0 with '="" TO ALLOW 0 AS AN ACCEPTABLE VALUE GLD 1-17-92
16 G LA2
17QC ;QC TESTING HERE; S BAD=1 IF DONT STORE
18 S Y(A)=IN Q
19NUM(X) N LAX,JJ S LAX="" F JJ=1:1:$L(X) S:$A(X,JJ)>32 LAX=LAX_$E(X,JJ)
20 Q LAX
21IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 5 G IN
22 S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0 I ECHOALL S Z=IN D WRITE
23 S CTRL=$P(IN,"~",2),IN=$P(IN,"~")
24 Q
25OUT S CNT=^LA(TSK,"O")+1,^("O")=CNT,^("O",CNT)=OUT
26 LOCK +^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TSK LOCK -^LA("Q")
27 Q
28WRITE I IO]"" O IO::1 IF $T U IO W:'ECHOALL *7 W !,Z C IO
29 Q
30QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK) I $D(ZTSK) D KILL^%ZTLOAD K ZTSK
31 Q
32TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
Note: See TracBrowser for help on using the repository browser.