LRTP ;SLC/RWF - HANDLE TASKED PROCESSING ;2/7/91 08:54 ;
;;5.2;LAB SERVICE;**153**;Sep 27, 1994
DQ ;
I $D(ZTQUEUED) S ZTREQ="@"
S LRLLOC=$S($D(LRLLOC):LRLLOC,1:""),LRSS=$S($D(LRSS):LRSS,1:0)
D STAT:LRLLOC]""
K ZTSK,LRCUT,LRURG
Q
STAT N LRION
S DA=$O(^LAB(64.6,"AS",LRLLOC,0)) G KILL:DA<1 S LRION=^LAB(64.6,DA,0),LRCUT=$P(LRION,"^",5),LRION=$P(LRION,"^",4) G KILL:LRION']"" I LRCUT'="" D URG G KILL:LRURG>LRCUT
D KILL
I LRSS="MI" S ZTRTN="DQ^LRMIPSZ1"
E S ZTRTN="DQ^LRRP2"
S ZTIO=LRION,ZTSAVE("LR*")=""
D ^%ZTLOAD
Q
KILL S:$D(ZTQUEUED) ZTREQ="@" Q
URG S LRURG=9999,J=0 F S J=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,J)) Q:J<1 S X=^(J,0) I $P(X,"^",2)<LRURG S LRURG=$P(X,"^",2)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRTP 706 printed Sep 02, 2024@19:06:24 Page 2
LRTP ;SLC/RWF - HANDLE TASKED PROCESSING ;2/7/91 08:54 ;
+1 ;;5.2;LAB SERVICE;**153**;Sep 27, 1994
DQ ;
+1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+2 SET LRLLOC=$SELECT($DATA(LRLLOC):LRLLOC,1:"")
SET LRSS=$SELECT($DATA(LRSS):LRSS,1:0)
+3 if LRLLOC]""
DO STAT
+4 KILL ZTSK,LRCUT,LRURG
+5 QUIT
STAT NEW LRION
+1 SET DA=$ORDER(^LAB(64.6,"AS",LRLLOC,0))
if DA<1
GOTO KILL
SET LRION=^LAB(64.6,DA,0)
SET LRCUT=$PIECE(LRION,"^",5)
SET LRION=$PIECE(LRION,"^",4)
if LRION']""
GOTO KILL
IF LRCUT'=""
DO URG
if LRURG>LRCUT
GOTO KILL
+2 DO KILL
+3 IF LRSS="MI"
SET ZTRTN="DQ^LRMIPSZ1"
+4 IF '$TEST
SET ZTRTN="DQ^LRRP2"
+5 SET ZTIO=LRION
SET ZTSAVE("LR*")=""
+6 DO ^%ZTLOAD
+7 QUIT
KILL if $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
URG SET LRURG=9999
SET J=0
FOR
SET J=$ORDER(^LRO(68,LRAA,1,LRAD,1,LRAN,4,J))
if J<1
QUIT
SET X=^(J,0)
IF $PIECE(X,"^",2)<LRURG
SET LRURG=$PIECE(X,"^",2)
+1 QUIT