BRNRUP2 ; IHS/OIT/LJF - CONTINUED REPORT UTILITY PRINT LOGIC
;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
;IHS/OIT/LJF 10/25/2007 PATCH 1 Added this routine
;
DONE ;EP
I $D(ZTQUEUED),BRNCTYP="F" G DONE1
D TIME
DONE1 ;
K ^XTMP("BRNVL",BRNJOB,BRNBT),^XTMP("BRNFLAT",$J)
D DEL^BRNRU
D EN^XBVK("BRN")
D EN^XBVK("VALM")
Q
;
HEAD ;ENTRY POINT
I 'BRNPG G HEAD1
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BRNQUIT="" Q
;
HEAD1 ;EP
I BRNCTYP="F",$D(ZTQUEUED) Q
W:$D(IOF) @IOF S BRNPG=BRNPG+1
I $G(BRNTITL)="" S BRNTEXT="ROI DISCLOSURE REQUEST LISTING",BRNLENG=$L(BRNTEXT) W !?((BRNTCW-BRNLENG)/2),BRNTEXT,?(BRNTCW-8),"Page ",BRNPG
I $G(BRNTITL)]"" S BRNLENG=$L(BRNTITL) W !?((BRNTCW-BRNLENG)/2),BRNTITL,?(BRNTCW-8),"Page ",BRNPG
S BRNLENG=46 S:BRNTCW<BRNLENG BRNLENG=BRNTCW W !?((BRNTCW-BRNLENG)/2),"Request Dates: ",BRNBDD," and ",BRNEDD,!
I BRNCTYP="S" S BRNLENG=$L(BRNSORV)+23 W !?((BRNTCW-BRNLENG)/2),"ROI SUB-TOTALS BY: ",BRNSORV,!
I $G(BRNSPAG) S BRNLENG=$L(BRNSORV)+$L(BRNSRTR)+2 S:BRNTCW<BRNLENG BRNLENG=BRNTCW W !?((BRNTCW-BRNLENG)/2),BRNSORV,": ",BRNSRTR,!
I BRNHEAD]"" W !,BRNHEAD,!
W BRNDASH,!
I BRNCTYP="S" W !,BRNSORV,":"
Q
;
TIME ;ENTRY POINT - END OF REPORT TIME DISPLAY
I $D(BRNET) S BRNTS=(86400*($P(BRNET,",")-$P(BRNBT,",")))+($P(BRNET,",",2)-$P(BRNBT,",",2)),BRNH=$P(BRNTS/3600,".") S:BRNH="" BRNH=0 D
. S BRNTS=BRNTS-(BRNH*3600),BRNM=$P(BRNTS/60,".") S:BRNM="" BRNM=0 S BRNTS=BRNTS-(BRNM*60),BRNS=BRNTS
. W !!,"RUN TIME (H.M.S): ",BRNH,".",BRNM,".",BRNS
I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of report. HIT RETURN" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
W:$D(IOF) @IOF
K BRNTS,BRNS,BRNH,BRNM,BRNET
Q
BRNRUP2 ; IHS/OIT/LJF - CONTINUED REPORT UTILITY PRINT LOGIC
+1 ;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
+2 ;IHS/OIT/LJF 10/25/2007 PATCH 1 Added this routine
+3 ;
DONE ;EP
+1 IF $DATA(ZTQUEUED)
IF BRNCTYP="F"
GOTO DONE1
+2 DO TIME
DONE1 ;
+1 KILL ^XTMP("BRNVL",BRNJOB,BRNBT),^XTMP("BRNFLAT",$JOB)
+2 DO DEL^BRNRU
+3 DO EN^XBVK("BRN")
+4 DO EN^XBVK("VALM")
+5 QUIT
+6 ;
HEAD ;ENTRY POINT
+1 IF 'BRNPG
GOTO HEAD1
+2 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BRNQUIT=""
QUIT
+3 ;
HEAD1 ;EP
+1 IF BRNCTYP="F"
IF $DATA(ZTQUEUED)
QUIT
+2 IF $DATA(IOF)
WRITE @IOF
SET BRNPG=BRNPG+1
+3 IF $GET(BRNTITL)=""
SET BRNTEXT="ROI DISCLOSURE REQUEST LISTING"
SET BRNLENG=$LENGTH(BRNTEXT)
WRITE !?((BRNTCW-BRNLENG)/2),BRNTEXT,?(BRNTCW-8),"Page ",BRNPG
+4 IF $GET(BRNTITL)]""
SET BRNLENG=$LENGTH(BRNTITL)
WRITE !?((BRNTCW-BRNLENG)/2),BRNTITL,?(BRNTCW-8),"Page ",BRNPG
+5 SET BRNLENG=46
IF BRNTCW<BRNLENG
SET BRNLENG=BRNTCW
WRITE !?((BRNTCW-BRNLENG)/2),"Request Dates: ",BRNBDD," and ",BRNEDD,!
+6 IF BRNCTYP="S"
SET BRNLENG=$LENGTH(BRNSORV)+23
WRITE !?((BRNTCW-BRNLENG)/2),"ROI SUB-TOTALS BY: ",BRNSORV,!
+7 IF $GET(BRNSPAG)
SET BRNLENG=$LENGTH(BRNSORV)+$LENGTH(BRNSRTR)+2
IF BRNTCW<BRNLENG
SET BRNLENG=BRNTCW
WRITE !?((BRNTCW-BRNLENG)/2),BRNSORV,": ",BRNSRTR,!
+8 IF BRNHEAD]""
WRITE !,BRNHEAD,!
+9 WRITE BRNDASH,!
+10 IF BRNCTYP="S"
WRITE !,BRNSORV,":"
+11 QUIT
+12 ;
TIME ;ENTRY POINT - END OF REPORT TIME DISPLAY
+1 IF $DATA(BRNET)
SET BRNTS=(86400*($PIECE(BRNET,",")-$PIECE(BRNBT,",")))+($PIECE(BRNET,",",2)-$PIECE(BRNBT,",",2))
SET BRNH=$PIECE(BRNTS/3600,".")
IF BRNH=""
SET BRNH=0
Begin DoDot:1
+2 SET BRNTS=BRNTS-(BRNH*3600)
SET BRNM=$PIECE(BRNTS/60,".")
IF BRNM=""
SET BRNM=0
SET BRNTS=BRNTS-(BRNM*60)
SET BRNS=BRNTS
+3 WRITE !!,"RUN TIME (H.M.S): ",BRNH,".",BRNM,".",BRNS
End DoDot:1
+4 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
SET DIR(0)="EO"
SET DIR("A")="End of report. HIT RETURN"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+5 IF $DATA(IOF)
WRITE @IOF
+6 KILL BRNTS,BRNS,BRNH,BRNM,BRNET
+7 QUIT