BRNRUS ; IHS/OIT/LJF - SHOW LOGIC SO FAR
;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
;IHS/OIT/LJF 10/25/2007 PATCH 1 Added routine
;
SHOWP ;EP - display print item selections
NEW BRNI
I '$D(BRNDONE) W:$D(IOF) @IOF
W !!?6,"REPORT/OUTPUT Type:"
I BRNCTYP="S" W !,?12,"Report includes sub-totals by ",$G(BRNSORV)," and total count." Q
I BRNCTYP="T" W !,?12,"Report will include total only." Q
Q:'$D(^BRNRPT(BRNRPT,12))
W !?12,"PRINT Items Selected:"
S (BRNI,BRNTCW)=0 F S BRNI=$O(^BRNRPT(BRNRPT,12,BRNI)) Q:BRNI'=+BRNI S BRNCRIT=$P(^BRNRPT(BRNRPT,12,BRNI,0),U) D
. W !?12,$P(^BRNSORT(BRNCRIT,0),U)," - column width ",$P(^BRNRPT(BRNRPT,12,BRNI,0),U,2)
. S BRNTCW=BRNTCW+$P(^BRNRPT(BRNRPT,12,BRNI,0),U,2)+2
. I $Y>(IOSL-5) D PAUSE^BRNU W:$D(IOF) @IOF
W !?12,"Total Report width (including column margins - 2 spaces): ",BRNTCW
Q
;
SHOW ;EP - display selection criteria so far
NEW X,BRNI,BRNC,BRNQ,BRNY,BRNC
W:$D(IOF) @IOF
I $D(BRNDONE) S X="REPORT SUMMARY" W ?((80-$L(X))/2),X,!
W !!?6,"Disclosure Request Selection Criteria:"
W !?12,"Request Date range: ",BRNBDD," to ",BRNEDD
Q:'$D(^BRNRPT(BRNRPT,11))
;
S BRNI=0 F S BRNI=$O(^BRNRPT(BRNRPT,11,BRNI)) Q:BRNI'=+BRNI D
. I $Y>(IOSL-5) D PAUSE^BRNU W @IOF
. W !?12,$P(^BRNSORT(BRNI,0),U),": "
. S BRNY="",BRNC=0
. F S BRNY=$O(^BRNRPT(BRNRPT,11,BRNI,11,"B",BRNY)) S BRNC=BRNC+1 Q:BRNY=""!($D(BRNQ)) D
. . W:BRNC'=1 " ; " S X=BRNY X:$D(^BRNSORT(BRNI,2)) ^(2) W X
Q
;
SHOWR ;EP - display sorting criteria
I '$D(BRNDONE) W:$D(IOF) @IOF
W !!?6,"SORTING Item:"
I BRNCTYP="T" W !?12,"Total only will be displayed, no sorting done.",! Q
I BRNCTYP="C" W !?12,"Search Template being created, no sorting done.",! Q
Q:'$G(BRNSORT)
W !?12,"Disclosure requests will be sorted by: ",$P(^BRNSORT(BRNSORT,0),U),!
Q
BRNRUS ; IHS/OIT/LJF - SHOW LOGIC SO FAR
+1 ;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
+2 ;IHS/OIT/LJF 10/25/2007 PATCH 1 Added routine
+3 ;
SHOWP ;EP - display print item selections
+1 NEW BRNI
+2 IF '$DATA(BRNDONE)
IF $DATA(IOF)
WRITE @IOF
+3 WRITE !!?6,"REPORT/OUTPUT Type:"
+4 IF BRNCTYP="S"
WRITE !,?12,"Report includes sub-totals by ",$GET(BRNSORV)," and total count."
QUIT
+5 IF BRNCTYP="T"
WRITE !,?12,"Report will include total only."
QUIT
+6 IF '$DATA(^BRNRPT(BRNRPT,12))
QUIT
+7 WRITE !?12,"PRINT Items Selected:"
+8 SET (BRNI,BRNTCW)=0
FOR
SET BRNI=$ORDER(^BRNRPT(BRNRPT,12,BRNI))
IF BRNI'=+BRNI
QUIT
SET BRNCRIT=$PIECE(^BRNRPT(BRNRPT,12,BRNI,0),U)
Begin DoDot:1
+9 WRITE !?12,$PIECE(^BRNSORT(BRNCRIT,0),U)," - column width ",$PIECE(^BRNRPT(BRNRPT,12,BRNI,0),U,2)
+10 SET BRNTCW=BRNTCW+$PIECE(^BRNRPT(BRNRPT,12,BRNI,0),U,2)+2
+11 IF $Y>(IOSL-5)
DO PAUSE^BRNU
IF $DATA(IOF)
WRITE @IOF
End DoDot:1
+12 WRITE !?12,"Total Report width (including column margins - 2 spaces): ",BRNTCW
+13 QUIT
+14 ;
SHOW ;EP - display selection criteria so far
+1 NEW X,BRNI,BRNC,BRNQ,BRNY,BRNC
+2 IF $DATA(IOF)
WRITE @IOF
+3 IF $DATA(BRNDONE)
SET X="REPORT SUMMARY"
WRITE ?((80-$LENGTH(X))/2),X,!
+4 WRITE !!?6,"Disclosure Request Selection Criteria:"
+5 WRITE !?12,"Request Date range: ",BRNBDD," to ",BRNEDD
+6 IF '$DATA(^BRNRPT(BRNRPT,11))
QUIT
+7 ;
+8 SET BRNI=0
FOR
SET BRNI=$ORDER(^BRNRPT(BRNRPT,11,BRNI))
IF BRNI'=+BRNI
QUIT
Begin DoDot:1
+9 IF $Y>(IOSL-5)
DO PAUSE^BRNU
WRITE @IOF
+10 WRITE !?12,$PIECE(^BRNSORT(BRNI,0),U),": "
+11 SET BRNY=""
SET BRNC=0
+12 FOR
SET BRNY=$ORDER(^BRNRPT(BRNRPT,11,BRNI,11,"B",BRNY))
SET BRNC=BRNC+1
IF BRNY=""!($DATA(BRNQ))
QUIT
Begin DoDot:2
+13 IF BRNC'=1
WRITE " ; "
SET X=BRNY
IF $DATA(^BRNSORT(BRNI,2))
XECUTE ^(2)
WRITE X
End DoDot:2
End DoDot:1
+14 QUIT
+15 ;
SHOWR ;EP - display sorting criteria
+1 IF '$DATA(BRNDONE)
IF $DATA(IOF)
WRITE @IOF
+2 WRITE !!?6,"SORTING Item:"
+3 IF BRNCTYP="T"
WRITE !?12,"Total only will be displayed, no sorting done.",!
QUIT
+4 IF BRNCTYP="C"
WRITE !?12,"Search Template being created, no sorting done.",!
QUIT
+5 IF '$GET(BRNSORT)
QUIT
+6 WRITE !?12,"Disclosure requests will be sorted by: ",$PIECE(^BRNSORT(BRNSORT,0),U),!
+7 QUIT