LRCAPV1S ;SLC/FHS-SET WKLD CODE INTO LRO(68 PART 2 ; 12/3/1997
;;5.2;LAB SERVICE;**42,153,201,221,434**;Sep 27, 1994;Build 1
SET ; From LRCAPV1
Q:'$D(^LRO(68,+LRAA,1,LRAD,1,LRAN,0))#2
I '$D(LRTIME) S LRTIME=$$NOW^XLFDT
I '$P(LRTIME,".",2) S LRTIME=$$NOW^XLFDT
I '$D(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0))#2 D
. S LRURGW=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,4,+$G(LRT("P")),0)),U,2) ; urgency from parent test
. I LRURGW'>0,$G(LRALERT) S LRURGW=LRALERT
. S ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0)=LRT_U_(50+$G(LRURGW))_U_U_DUZ_U_LRTIME_"^^^"_LRCDEF_U_$P($G(LRT("P")),U)
. S $P(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,0),U,3)=LRT,$P(^(0),U,4)=1+$P(^(0),U,4),^LRO(68,+LRAA,1,LRAD,1,LRAN,4,"B",LRT,LRT)=""
S:'$P(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0),U,8) $P(^(0),U,8)=$G(LRCDEF)
S:'$D(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,0))#2 ^(0)="^68.14P^" S NODE0=^(0),NODE=LRP_U_"^^^^"_LRTIME_U_DUZ_U_DUZ(2)_U_$S($G(LRCAPMS):LRCAPMS,1:+LRAA)_U
I '$D(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)) S $P(NODE0,U,3)=LRP,$P(NODE0,U,4)=1+$P(NODE0,U,4),^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,0)=NODE0,^(LRP,0)=NODE
S X=^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0) I '$D(LRADD),$P(X,U,2) Q
I $D(LRADD) S:'$P(X,U,3) $P(X,U,2)=LRCNT+$P(X,U,2) S:$P(X,U,3) $P(X,U,2)=LRCNT,$P(X,U,3)=0 S ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)=X
I '$D(LRADD),'$P(X,U,3) S $P(X,U,2)=LRCNT,^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)=X
I $G(LRCSQ),$G(LRCSQQ) D
. S ^XTMP("LRCAP",LRCSQ,DUZ,0)=$$HTFM^XLFDT($H+30,1)_U_DT_U_"Lab Control workload count"_U_$G(DUZ)
. S ^XTMP("LRCAP",LRCSQ,DUZ,LRP)=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRCAPV1S 1572 printed Sep 02, 2024@18:58:49 Page 2
LRCAPV1S ;SLC/FHS-SET WKLD CODE INTO LRO(68 PART 2 ; 12/3/1997
+1 ;;5.2;LAB SERVICE;**42,153,201,221,434**;Sep 27, 1994;Build 1
SET ; From LRCAPV1
+1 if '$DATA(^LRO(68,+LRAA,1,LRAD,1,LRAN,0))#2
QUIT
+2 IF '$DATA(LRTIME)
SET LRTIME=$$NOW^XLFDT
+3 IF '$PIECE(LRTIME,".",2)
SET LRTIME=$$NOW^XLFDT
+4 IF '$DATA(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0))#2
Begin DoDot:1
+5 ; urgency from parent test
SET LRURGW=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,4,+$GET(LRT("P")),0)),U,2)
+6 IF LRURGW'>0
IF $GET(LRALERT)
SET LRURGW=LRALERT
+7 SET ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0)=LRT_U_(50+$GET(LRURGW))_U_U_DUZ_U_LRTIME_"^^^"_LRCDEF_U_$PIECE($GET(LRT("P")),U)
+8 SET $PIECE(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,0),U,3)=LRT
SET $PIECE(^(0),U,4)=1+$PIECE(^(0),U,4)
SET ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,"B",LRT,LRT)=""
End DoDot:1
+9 if '$PIECE(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,0),U,8)
SET $PIECE(^(0),U,8)=$GET(LRCDEF)
+10 if '$DATA(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,0))#2
SET ^(0)="^68.14P^"
SET NODE0=^(0)
SET NODE=LRP_U_"^^^^"_LRTIME_U_DUZ_U_DUZ(2)_U_$SELECT($GET(LRCAPMS):LRCAPMS,1:+LRAA)_U
+11 IF '$DATA(^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0))
SET $PIECE(NODE0,U,3)=LRP
SET $PIECE(NODE0,U,4)=1+$PIECE(NODE0,U,4)
SET ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,0)=NODE0
SET ^(LRP,0)=NODE
+12 SET X=^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)
IF '$DATA(LRADD)
IF $PIECE(X,U,2)
QUIT
+13 IF $DATA(LRADD)
if '$PIECE(X,U,3)
SET $PIECE(X,U,2)=LRCNT+$PIECE(X,U,2)
if $PIECE(X,U,3)
SET $PIECE(X,U,2)=LRCNT
SET $PIECE(X,U,3)=0
SET ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)=X
+14 IF '$DATA(LRADD)
IF '$PIECE(X,U,3)
SET $PIECE(X,U,2)=LRCNT
SET ^LRO(68,+LRAA,1,LRAD,1,LRAN,4,LRT,1,LRP,0)=X
+15 IF $GET(LRCSQ)
IF $GET(LRCSQQ)
Begin DoDot:1
+16 SET ^XTMP("LRCAP",LRCSQ,DUZ,0)=$$HTFM^XLFDT($HOROLOG+30,1)_U_DT_U_"Lab Control workload count"_U_$GET(DUZ)
+17 SET ^XTMP("LRCAP",LRCSQ,DUZ,LRP)=""
End DoDot:1
+18 QUIT