LRCAPMR2 ; IHS/DIR/AAB - WKLD STATS REPORT - COMMENTS PRINT ; [ 4/9/93 ]
;;5.2;LR;**1006**;SEP 01, 1998
;
;;5.2;LAB SERVICE;**201**;Sep 27, 1994
;
ASKCOM ;lrcm
R !!,"PRINT THE COMMENT PAGES? NO//",LRCM:DTIME
I '$T!(LRCM=U) S LREND=1 Q
I LRCM["?" W !,"Do you want to print comments? YES or NO.",! G ASKCOM
S LRCM=$S($E(LRCM,1)="Y"!($E(LRCM,1)="y"):1,1:0) W !
Q
COMM ;Called from LRCAPMA2,LRCAPML2,LRRP8C
Q:'+$G(LRCM)
N LRDAT,LRCC,LRGCN,LRCCN,LRDCN,LRCONT
D GENCOM Q:LREND
D CAPCOM Q:LREND
D DATCOM
Q
GENCOM ;
N LRHDR,LRHDR3
S LRGCN=0
S LRGCN=$O(^TMP("LR",$J,"GCOM",LRGCN))
Q:'LRGCN ;no general comments
S LRHDR="GENERAL WORKLOAD COMMENTS"
S LRHDR3="[Includes all workload data in date range]"
D HDR^LRCAPU
S LRGCN=0
F S LRGCN=$O(^TMP("LR",$J,"GCOM",LRGCN)) Q:('LRGCN)!(LREND) D
. S LRCOMM=$G(^TMP("LR",$J,"GCOM",LRGCN))
. I $Y+6'<IOSL D NPG^LRCAPU Q:LREND
. W !,LRCOMM,!
D:$E(IOST,1,2)="C-" PAUSE^LRCAPU Q:LREND W @IOF
Q
CAPCOM ;
N LRHDR,LRHDR3
S LRCAPNAM=""
S LRCAPNAM=$O(^TMP("LR",$J,"CCOM",LRCAPNAM))
Q:LRCAPNAM="" ;no wkld code comments
S LRHDR="WORKLOAD COMMENTS by WKLD CODE"
S LRHDR3="[Includes all workload data in date range]"
D HDR^LRCAPU
S LRCAPNAM=""
F S LRCAPNAM=$O(^TMP("LR",$J,"CCOM",LRCAPNAM)) Q:(LRCAPNAM="")!(LREND) D
. S LRCAPNUM=$G(^TMP("LR",$J,"CCOM",LRCAPNAM,0))
. W !!,LRCAPNUM,?15,LRCAPNAM,!
. S LRCCN=0
. F S LRCCN=$O(^TMP("LR",$J,"CCOM",LRCAPNAM,LRCCN)) Q:('LRCCN)!(LREND) D
. . S LRCOMM=$G(^TMP("LR",$J,"CCOM",LRCAPNAM,LRCCN))
. . I $Y+6'<IOSL D
. . . D NPG^LRCAPU
. . . Q:LREND
. . . W !!,LRCAPNUM,?15,LRCAPNAM," (cont.)",!
. . Q:LREND
. . W LRCOMM,!
. W $E(LRDSHS,1,80),!
D:$E(IOST,1,2)="C-" PAUSE^LRCAPU Q:LREND W @IOF
Q
DATCOM ;
N LRDATE,LRHDR,LRHDR3
S LRDAT=0
S LRDAT=$O(^TMP("LR",$J,"DCOM",LRDAT))
Q:'LRDAT ;no date comments
S LRHDR="WORKLOAD COMMENTS by DATE"
S LRHDR3="[Includes all workload data in date range]"
D HDR^LRCAPU
S LRDAT=0
F S LRDAT=$O(^TMP("LR",$J,"DCOM",LRDAT)) Q:('LRDAT)!(LREND) D
. S LRDATE=$$FMTE^XLFDT(LRDAT,"1D")
. W !!,LRDATE,!
. S LRDCN=0
. F S LRDCN=$O(^TMP("LR",$J,"DCOM",LRDAT,LRDCN)) Q:('LRDCN)!(LREND) D
. . S LRCOMM=$G(^TMP("LR",$J,"DCOM",LRDAT,LRDCN))
. . I $Y+6'<IOSL D
. . . D NPG^LRCAPU
. . . Q:LREND
. . . W !!,LRDATE," (cont.)",!
. . Q:LREND
. . W LRCOMM,!
. W $E(LRDSHS,1,80),!
D:$E(IOST,1,2)="C-" PAUSE^LRCAPU Q:LREND W @IOF
Q
LRCAPMR2 ; IHS/DIR/AAB - WKLD STATS REPORT - COMMENTS PRINT ; [ 4/9/93 ]
+1 ;;5.2;LR;**1006**;SEP 01, 1998
+2 ;
+3 ;;5.2;LAB SERVICE;**201**;Sep 27, 1994
+4 ;
ASKCOM ;lrcm
+1 READ !!,"PRINT THE COMMENT PAGES? NO//",LRCM:DTIME
+2 IF '$TEST!(LRCM=U)
SET LREND=1
QUIT
+3 IF LRCM["?"
WRITE !,"Do you want to print comments? YES or NO.",!
GOTO ASKCOM
+4 SET LRCM=$SELECT($EXTRACT(LRCM,1)="Y"!($EXTRACT(LRCM,1)="y"):1,1:0)
WRITE !
+5 QUIT
COMM ;Called from LRCAPMA2,LRCAPML2,LRRP8C
+1 IF '+$GET(LRCM)
QUIT
+2 NEW LRDAT,LRCC,LRGCN,LRCCN,LRDCN,LRCONT
+3 DO GENCOM
IF LREND
QUIT
+4 DO CAPCOM
IF LREND
QUIT
+5 DO DATCOM
+6 QUIT
GENCOM ;
+1 NEW LRHDR,LRHDR3
+2 SET LRGCN=0
+3 SET LRGCN=$ORDER(^TMP("LR",$JOB,"GCOM",LRGCN))
+4 ;no general comments
IF 'LRGCN
QUIT
+5 SET LRHDR="GENERAL WORKLOAD COMMENTS"
+6 SET LRHDR3="[Includes all workload data in date range]"
+7 DO HDR^LRCAPU
+8 SET LRGCN=0
+9 FOR
SET LRGCN=$ORDER(^TMP("LR",$JOB,"GCOM",LRGCN))
IF ('LRGCN)!(LREND)
QUIT
Begin DoDot:1
+10 SET LRCOMM=$GET(^TMP("LR",$JOB,"GCOM",LRGCN))
+11 IF $Y+6'<IOSL
DO NPG^LRCAPU
IF LREND
QUIT
+12 WRITE !,LRCOMM,!
End DoDot:1
+13 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRCAPU
IF LREND
QUIT
WRITE @IOF
+14 QUIT
CAPCOM ;
+1 NEW LRHDR,LRHDR3
+2 SET LRCAPNAM=""
+3 SET LRCAPNAM=$ORDER(^TMP("LR",$JOB,"CCOM",LRCAPNAM))
+4 ;no wkld code comments
IF LRCAPNAM=""
QUIT
+5 SET LRHDR="WORKLOAD COMMENTS by WKLD CODE"
+6 SET LRHDR3="[Includes all workload data in date range]"
+7 DO HDR^LRCAPU
+8 SET LRCAPNAM=""
+9 FOR
SET LRCAPNAM=$ORDER(^TMP("LR",$JOB,"CCOM",LRCAPNAM))
IF (LRCAPNAM="")!(LREND)
QUIT
Begin DoDot:1
+10 SET LRCAPNUM=$GET(^TMP("LR",$JOB,"CCOM",LRCAPNAM,0))
+11 WRITE !!,LRCAPNUM,?15,LRCAPNAM,!
+12 SET LRCCN=0
+13 FOR
SET LRCCN=$ORDER(^TMP("LR",$JOB,"CCOM",LRCAPNAM,LRCCN))
IF ('LRCCN)!(LREND)
QUIT
Begin DoDot:2
+14 SET LRCOMM=$GET(^TMP("LR",$JOB,"CCOM",LRCAPNAM,LRCCN))
+15 IF $Y+6'<IOSL
Begin DoDot:3
+16 DO NPG^LRCAPU
+17 IF LREND
QUIT
+18 WRITE !!,LRCAPNUM,?15,LRCAPNAM," (cont.)",!
End DoDot:3
+19 IF LREND
QUIT
+20 WRITE LRCOMM,!
End DoDot:2
+21 WRITE $EXTRACT(LRDSHS,1,80),!
End DoDot:1
+22 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRCAPU
IF LREND
QUIT
WRITE @IOF
+23 QUIT
DATCOM ;
+1 NEW LRDATE,LRHDR,LRHDR3
+2 SET LRDAT=0
+3 SET LRDAT=$ORDER(^TMP("LR",$JOB,"DCOM",LRDAT))
+4 ;no date comments
IF 'LRDAT
QUIT
+5 SET LRHDR="WORKLOAD COMMENTS by DATE"
+6 SET LRHDR3="[Includes all workload data in date range]"
+7 DO HDR^LRCAPU
+8 SET LRDAT=0
+9 FOR
SET LRDAT=$ORDER(^TMP("LR",$JOB,"DCOM",LRDAT))
IF ('LRDAT)!(LREND)
QUIT
Begin DoDot:1
+10 SET LRDATE=$$FMTE^XLFDT(LRDAT,"1D")
+11 WRITE !!,LRDATE,!
+12 SET LRDCN=0
+13 FOR
SET LRDCN=$ORDER(^TMP("LR",$JOB,"DCOM",LRDAT,LRDCN))
IF ('LRDCN)!(LREND)
QUIT
Begin DoDot:2
+14 SET LRCOMM=$GET(^TMP("LR",$JOB,"DCOM",LRDAT,LRDCN))
+15 IF $Y+6'<IOSL
Begin DoDot:3
+16 DO NPG^LRCAPU
+17 IF LREND
QUIT
+18 WRITE !!,LRDATE," (cont.)",!
End DoDot:3
+19 IF LREND
QUIT
+20 WRITE LRCOMM,!
End DoDot:2
+21 WRITE $EXTRACT(LRDSHS,1,80),!
End DoDot:1
+22 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE^LRCAPU
IF LREND
QUIT
WRITE @IOF
+23 QUIT