- LACOLT6 ;SLC/RWF - COULTER S PLUS VI, DT WITH DH INTERFACE ;7/20/90 07:55 ;
- ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
- ;Format 1, CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID, IDE=patient id
- LA1 S:$D(ZTQUEUED) ZTREQ="@"
- S LANM=$T(+0),TSK=$O(^LAB(62.4,"C",LANM,0)),U="^" Q:TSK<1
- Q:'$D(^LA(TSK,"I",0))
- S TOUT=0,TP="",LRTOP=$P(^LAB(69.9,1,1),U,1) D ^LASET Q:'TSK S X="TRAP^"_LANM,@^%ZOSF("TRAP")
- S SS="CH",SPEC=$P(^LAB(69.9,1,1),U,1)
- LA2 K TV,Y S A=0,TOUT=0 D IN G QUIT:TOUT,LA2:IN'["--------"
- C2 S TOUT=0 D IN G QUIT:TOUT,SAVE:$E(IN,1,8)="--------"
- C3 S A=A+1,Y(A)="" I A<5 S Y(A)=IN G C2
- S V=$E(IN,6,99) D NUM
- S Y(A)=$S(".....-----+++++"[V:"",1:V) G C2
- SAVE S V=$E(Y(2),5,8) D NUM S ID=+V,TRAY=1,CUP=ID,V=$P(Y(4),"LAB",2) D NUM S IDE=+V G LA2:ID'>0
- F I=0:0 S I=$O(TC(I)) Q:I<1 X TC(I,2) S @TC(I,1)=V
- LA3 X LAGEN G LA2:ISQN<1
- F I=0:0 S I=$O(TV(I)) Q:I<1 S:TV(I,1)]"" ^LAH(LWL,1,ISQN,I)=TV(I,1)
- G LA2
- LOST S:'$D(^LA("LOST",DT)) ^LA("LOST",DT)=1
- S AA=^LA("LOST",DT),^LA("LOST",DT,AA)=IN,^LA("LOST",DT)=AA+1
- G LA2
- Q
- NUM S X="" F JJ=1:1:$L(V) S:$A(V,JJ)>32 X=X_$E(V,JJ)
- S V=X Q
- IN S CNT=^LA(TSK,"I",0)+1 IF '$D(^(CNT)) S TOUT=TOUT+1 Q:TOUT>9 H 9 G IN
- S ^LA(TSK,"I",0)=CNT,IN=^(CNT),TOUT=0
- S:IN["~" CTRL=$P(IN,"~",2),IN=$P(IN,"~",1)
- Q
- OUT S CNT=^LA(TQ,"O")+1,^("O")=CNT,^("O",CNT)=OUT
- LOCK ^LA("Q") S Q=^LA("Q")+1,^("Q")=Q,^("Q",Q)=TQ LOCK
- Q
- QUIT LOCK ^LA(TSK) H 1 K ^LA(TSK),^LA("LOCK",TSK),^TMP($J),^TMP("LA",$J)
- Q
- TRAP D ^LABERR S T=TSK D SET^LAB G @("LA2^"_LANM) ;ERROR TRAP
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLACOLT6 1530 printed Mar 13, 2025@20:46:40 Page 2
- LACOLT6 ;SLC/RWF - COULTER S PLUS VI, DT WITH DH INTERFACE ;7/20/90 07:55 ;
- +1 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
- +2 ;Format 1, CROSS LINK ID = SEQ # ,TRAY=1, CUP = ID, IDE=patient id
- LA1 if $DATA(ZTQUEUED)
- SET ZTREQ="@"
- +1 SET LANM=$TEXT(+0)
- SET TSK=$ORDER(^LAB(62.4,"C",LANM,0))
- SET U="^"
- if TSK<1
- QUIT
- +2 if '$DATA(^LA(TSK,"I",0))
- QUIT
- +3 SET TOUT=0
- SET TP=""
- SET LRTOP=$PIECE(^LAB(69.9,1,1),U,1)
- DO ^LASET
- if 'TSK
- QUIT
- SET X="TRAP^"_LANM
- SET @^%ZOSF("TRAP")
- +4 SET SS="CH"
- SET SPEC=$PIECE(^LAB(69.9,1,1),U,1)
- LA2 KILL TV,Y
- SET A=0
- SET TOUT=0
- DO IN
- if TOUT
- GOTO QUIT
- if IN'["--------"
- GOTO LA2
- C2 SET TOUT=0
- DO IN
- if TOUT
- GOTO QUIT
- if $EXTRACT(IN,1,8)="--------"
- GOTO SAVE
- C3 SET A=A+1
- SET Y(A)=""
- IF A<5
- SET Y(A)=IN
- GOTO C2
- +1 SET V=$EXTRACT(IN,6,99)
- DO NUM
- +2 SET Y(A)=$SELECT(".....-----+++++"[V:"",1:V)
- GOTO C2
- SAVE SET V=$EXTRACT(Y(2),5,8)
- DO NUM
- SET ID=+V
- SET TRAY=1
- SET CUP=ID
- SET V=$PIECE(Y(4),"LAB",2)
- DO NUM
- SET IDE=+V
- if ID'>0
- GOTO LA2
- +1 FOR I=0:0
- SET I=$ORDER(TC(I))
- if I<1
- QUIT
- XECUTE TC(I,2)
- SET @TC(I,1)=V
- LA3 XECUTE LAGEN
- if ISQN<1
- GOTO LA2
- +1 FOR I=0:0
- SET I=$ORDER(TV(I))
- if I<1
- QUIT
- if TV(I,1)]""
- SET ^LAH(LWL,1,ISQN,I)=TV(I,1)
- +2 GOTO LA2
- LOST if '$DATA(^LA("LOST",DT))
- SET ^LA("LOST",DT)=1
- +1 SET AA=^LA("LOST",DT)
- SET ^LA("LOST",DT,AA)=IN
- SET ^LA("LOST",DT)=AA+1
- +2 GOTO LA2
- +3 QUIT
- NUM SET X=""
- FOR JJ=1:1:$LENGTH(V)
- if $ASCII(V,JJ)>32
- SET X=X_$EXTRACT(V,JJ)
- +1 SET V=X
- QUIT
- IN SET CNT=^LA(TSK,"I",0)+1
- IF '$DATA(^(CNT))
- SET TOUT=TOUT+1
- if TOUT>9
- QUIT
- HANG 9
- GOTO IN
- +1 SET ^LA(TSK,"I",0)=CNT
- SET IN=^(CNT)
- SET TOUT=0
- +2 if IN["~"
- SET CTRL=$PIECE(IN,"~",2)
- SET IN=$PIECE(IN,"~",1)
- +3 QUIT
- OUT SET CNT=^LA(TQ,"O")+1
- SET ^("O")=CNT
- SET ^("O",CNT)=OUT
- +1 LOCK ^LA("Q")
- SET Q=^LA("Q")+1
- SET ^("Q")=Q
- SET ^("Q",Q)=TQ
- LOCK
- +2 QUIT
- QUIT LOCK ^LA(TSK)
- HANG 1
- KILL ^LA(TSK),^LA("LOCK",TSK),^TMP($JOB),^TMP("LA",$JOB)
- +1 QUIT
- TRAP ;ERROR TRAP
- DO ^LABERR
- SET T=TSK
- DO SET^LAB
- GOTO @("LA2^"_LANM)