LRRP6B2 ; IHS/DIR/FJE - WORKLOAD CODE SUMMARY REPORT-CONDENSED ;
;;5.2;LR;**1013**;JUL 15, 2002
;
;;5.2;LAB SERVICE;;Sep 27, 1994
EN ;
COND ;
D WKLD Q:LREND
D TEST Q:LREND
D VENI
Q
WKLD ;
S LRSUBH="Workload Code Summary"
D HDR
W !!,LRSUBH,!,$E(LRDASH,1,IOM)
S LRCAPNAM=""
F S LRCAPNAM=$O(^TMP("LR",$J,"WKLD",LRCAPNAM)) Q:(LREND)!(LRCAPNAM="") D
. I $Y+6>IOSL D
. . D:$E(IOST,1,2)="C-" PAUSE Q:LREND
. . W @IOF D HDR W !!,LRSUBH_" ** cont. **",!,$E(LRDASH,1,IOM)
. Q:LREND
. W !,$E(LRCAPNAM,1,50),?55,$J(LRCC(LRCAPNAM),12,4)
. W ?70,$J(^TMP("LR",$J,"WKLD",LRCAPNAM),5)
Q:LREND
I '$D(^TMP("LR",$J,"WKLD")) S LRTIC=" Workload " D NODATA QUIT
W !,$E(LRDASH,1,IOM),!,"TOTAL",?70,$J(^TMP("LR",$J,"WKLD"),5)
D:$E(IOST,1,2)="C-" PAUSE Q:LREND W @IOF
Q
NODATA ;
W !!,"No",LRTIC,"data for this date range.",!!!
D PAUSE
Q
TEST ;
S LRSUBH="Lab Test Summary"
D HDR
W !!,LRSUBH,!,$E(LRDASH,1,IOM)
S LRTNAM=""
F S LRTNAM=$O(^TMP("LR",$J,"TST",LRTNAM)) Q:(LREND)!(LRTNAM="") D
. I $Y+6>IOSL D
. . D:$E(IOST,1,2)="C-" PAUSE Q:LREND
. . W @IOF D HDR W !!,LRSUBH_" ** cont. **",!,$E(LRDASH,1,IOM)
. Q:LREND
. W !,LRTNAM,?74,$J(^TMP("LR",$J,"TST",LRTNAM),5)
Q:LREND
I '$D(^TMP("LR",$J,"TST")) S LRTIC=" Test " D NODATA S LREND=1 QUIT
W !,$E(LRDASH,1,IOM),!,"TOTAL",?74,$J(^TMP("LR",$J,"TST"),5)
D:$E(IOST,1,2)="C-" PAUSE Q:LREND W @IOF
Q
VENI ;
S LRSUBH="Venipuncture Summary"
D HDR
W !!,LRSUBH,!,$E(LRDASH,1,IOM)
I $D(^TMP("LR",$J,"VENI")) D
. F S LRCAPNAM=$O(^TMP("LR",$J,"VENI",LRCAPNAM)) Q:(LREND)!(LRCAPNAM="") D
. . W !,$E(LRCAPNAM,1,50),?60,$J(LRCC(LRCAPNAM),12,4)
. . W ?74,$J(^TMP("LR",$J,"VENI",LRCAPNAM),5)
. W !,$E(LRDASH,1,IOM),!,"TOTAL",?74,$J(^TMP("LR",$J,"VENI"),5)
E W !,"NO VENIPUNCTURE DATA"
Q
HDR ;
W @IOF
S LRPAG=LRPAG+1
W !,"Detailed Workload Report (by WKLD Code) for ",LRDATRNG
W ?(72),"PAGE ",$J(LRPAG,3)
S LRDAT1="(Print date: "_LRDAT_")"
W !?IOM-(IOM-$L(LRDAT1)),LRDAT1 K LRDAT1
W !!,$E(LRSTAR,1,34)," CONDENSED ",$E(LRSTAR,1,33)
Q
PAUSE ;
K DIR S DIR(0)="E" D ^DIR
S:($D(DTOUT)#2)!($D(DUOUT)#2)!($D(DIRUT)#2) LREND=1
Q
LRRP6B2 ; IHS/DIR/FJE - WORKLOAD CODE SUMMARY REPORT-CONDENSED ;
+1 ;;5.2;LR;**1013**;JUL 15, 2002
+2 ;
+3 ;;5.2;LAB SERVICE;;Sep 27, 1994
EN ;
COND ;
+1 DO WKLD
IF LREND
QUIT
+2 DO TEST
IF LREND
QUIT
+3 DO VENI
+4 QUIT
WKLD ;
+1 SET LRSUBH="Workload Code Summary"
+2 DO HDR
+3 WRITE !!,LRSUBH,!,$EXTRACT(LRDASH,1,IOM)
+4 SET LRCAPNAM=""
+5 FOR
SET LRCAPNAM=$ORDER(^TMP("LR",$JOB,"WKLD",LRCAPNAM))
IF (LREND)!(LRCAPNAM="")
QUIT
Begin DoDot:1
+6 IF $Y+6>IOSL
Begin DoDot:2
+7 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE
IF LREND
QUIT
+8 WRITE @IOF
DO HDR
WRITE !!,LRSUBH_" ** cont. **",!,$EXTRACT(LRDASH,1,IOM)
End DoDot:2
+9 IF LREND
QUIT
+10 WRITE !,$EXTRACT(LRCAPNAM,1,50),?55,$JUSTIFY(LRCC(LRCAPNAM),12,4)
+11 WRITE ?70,$JUSTIFY(^TMP("LR",$JOB,"WKLD",LRCAPNAM),5)
End DoDot:1
+12 IF LREND
QUIT
+13 IF '$DATA(^TMP("LR",$JOB,"WKLD"))
SET LRTIC=" Workload "
DO NODATA
QUIT
+14 WRITE !,$EXTRACT(LRDASH,1,IOM),!,"TOTAL",?70,$JUSTIFY(^TMP("LR",$JOB,"WKLD"),5)
+15 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE
IF LREND
QUIT
WRITE @IOF
+16 QUIT
NODATA ;
+1 WRITE !!,"No",LRTIC,"data for this date range.",!!!
+2 DO PAUSE
+3 QUIT
TEST ;
+1 SET LRSUBH="Lab Test Summary"
+2 DO HDR
+3 WRITE !!,LRSUBH,!,$EXTRACT(LRDASH,1,IOM)
+4 SET LRTNAM=""
+5 FOR
SET LRTNAM=$ORDER(^TMP("LR",$JOB,"TST",LRTNAM))
IF (LREND)!(LRTNAM="")
QUIT
Begin DoDot:1
+6 IF $Y+6>IOSL
Begin DoDot:2
+7 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE
IF LREND
QUIT
+8 WRITE @IOF
DO HDR
WRITE !!,LRSUBH_" ** cont. **",!,$EXTRACT(LRDASH,1,IOM)
End DoDot:2
+9 IF LREND
QUIT
+10 WRITE !,LRTNAM,?74,$JUSTIFY(^TMP("LR",$JOB,"TST",LRTNAM),5)
End DoDot:1
+11 IF LREND
QUIT
+12 IF '$DATA(^TMP("LR",$JOB,"TST"))
SET LRTIC=" Test "
DO NODATA
SET LREND=1
QUIT
+13 WRITE !,$EXTRACT(LRDASH,1,IOM),!,"TOTAL",?74,$JUSTIFY(^TMP("LR",$JOB,"TST"),5)
+14 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE
IF LREND
QUIT
WRITE @IOF
+15 QUIT
VENI ;
+1 SET LRSUBH="Venipuncture Summary"
+2 DO HDR
+3 WRITE !!,LRSUBH,!,$EXTRACT(LRDASH,1,IOM)
+4 IF $DATA(^TMP("LR",$JOB,"VENI"))
Begin DoDot:1
+5 FOR
SET LRCAPNAM=$ORDER(^TMP("LR",$JOB,"VENI",LRCAPNAM))
IF (LREND)!(LRCAPNAM="")
QUIT
Begin DoDot:2
+6 WRITE !,$EXTRACT(LRCAPNAM,1,50),?60,$JUSTIFY(LRCC(LRCAPNAM),12,4)
+7 WRITE ?74,$JUSTIFY(^TMP("LR",$JOB,"VENI",LRCAPNAM),5)
End DoDot:2
+8 WRITE !,$EXTRACT(LRDASH,1,IOM),!,"TOTAL",?74,$JUSTIFY(^TMP("LR",$JOB,"VENI"),5)
End DoDot:1
+9 IF '$TEST
WRITE !,"NO VENIPUNCTURE DATA"
+10 QUIT
HDR ;
+1 WRITE @IOF
+2 SET LRPAG=LRPAG+1
+3 WRITE !,"Detailed Workload Report (by WKLD Code) for ",LRDATRNG
+4 WRITE ?(72),"PAGE ",$JUSTIFY(LRPAG,3)
+5 SET LRDAT1="(Print date: "_LRDAT_")"
+6 WRITE !?IOM-(IOM-$LENGTH(LRDAT1)),LRDAT1
KILL LRDAT1
+7 WRITE !!,$EXTRACT(LRSTAR,1,34)," CONDENSED ",$EXTRACT(LRSTAR,1,33)
+8 QUIT
PAUSE ;
+1 KILL DIR
SET DIR(0)="E"
DO ^DIR
+2 IF ($DATA(DTOUT)#2)!($DATA(DUOUT)#2)!($DATA(DIRUT)#2)
SET LREND=1
+3 QUIT