BARPG ; IHS/SD/LSL - page formatting subroutines called by Synchronization] ;
;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
;
;
PG ;EP **page controller
; This utility uses variables BARHDR,BAR("DT"),BAR("LINE"),BAR("PG")
; kill variables by D EBARPG
;
Q:($Y<(IOSL-6))!($G(DOUT)!$G(DFOUT))
S:'$D(BAR("PG")) BAR("PG")=0
S BAR("PG")=BAR("PG")+1
I $E(IOST)="C",IOT["TRM" D EOP^BARUTL(0) Q:($G(DIROUT)!$G(DUOUT)!$G(DTOUT)!$G(DROUT))
;
Q ;
Q:($G(DIROUT)!$G(DUOUT)!$G(DTOUT)!$G(DROUT))
;
HDR ;
; Write the Report Header
W:$Y @IOF
W !
Q:'$D(BARHDR)
S:'$D(BAR("LINE")) $P(BAR("LINE"),"-",IOM-2)=""
S:'$D(BAR("PG")) BAR("PG")=1
I '$D(BAR("DT")) D
. S %H=$H
. D YX^%DTC
. S BAR("DT")=Y
U IO
W ?(IOM-$L(BARHDR)/2),BARHDR
W !?(IOM-75),BAR("DT"),?(IOM-15),"PAGE: ",BAR("PG")
W !,BAR("LINE")
Q:'$D(BARDET)
;
COLUMNS ; EP
; Write column header / message
W !?4,"Bill",?13,"Date of",?23,"Patient",?37,"A/R",?45,"3P"
W ?50,$J("Amount",10),?63,$J("A/R Current",10),!
W ?4,"Number",?13,"Service",?23,"Name",?37,"IEN"
W ?45,"IEN",?50,$J("Billed",10),?63,$J("Balance",10)
I ($G(DIROUT)!$G(DUOUT)!$G(DTOUT)!$G(DROUT)) S BARQUIT=1
Q
; *********************************************************************
;
EBARPG ;
K BAR("LINE"),BAR("PG"),BARHDR,BAR("DT")
Q
; *********************************************************************
;
DOTS ; displaying of dots
S BARDISP=BARDISP+1
W:'(BARDISP#200) ".."
Q
BARPG ; IHS/SD/LSL - page formatting subroutines called by Synchronization] ;
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
+2 ;
+3 ;
PG ;EP **page controller
+1 ; This utility uses variables BARHDR,BAR("DT"),BAR("LINE"),BAR("PG")
+2 ; kill variables by D EBARPG
+3 ;
+4 IF ($Y<(IOSL-6))!($GET(DOUT)!$GET(DFOUT))
QUIT
+5 IF '$DATA(BAR("PG"))
SET BAR("PG")=0
+6 SET BAR("PG")=BAR("PG")+1
+7 IF $EXTRACT(IOST)="C"
IF IOT["TRM"
DO EOP^BARUTL(0)
IF ($GET(DIROUT)!$GET(DUOUT)!$GET(DTOUT)!$GET(DROUT))
QUIT
+8 ;
Q ;
+1 IF ($GET(DIROUT)!$GET(DUOUT)!$GET(DTOUT)!$GET(DROUT))
QUIT
+2 ;
HDR ;
+1 ; Write the Report Header
+2 IF $Y
WRITE @IOF
+3 WRITE !
+4 IF '$DATA(BARHDR)
QUIT
+5 IF '$DATA(BAR("LINE"))
SET $PIECE(BAR("LINE"),"-",IOM-2)=""
+6 IF '$DATA(BAR("PG"))
SET BAR("PG")=1
+7 IF '$DATA(BAR("DT"))
Begin DoDot:1
+8 SET %H=$HOROLOG
+9 DO YX^%DTC
+10 SET BAR("DT")=Y
End DoDot:1
+11 USE IO
+12 WRITE ?(IOM-$LENGTH(BARHDR)/2),BARHDR
+13 WRITE !?(IOM-75),BAR("DT"),?(IOM-15),"PAGE: ",BAR("PG")
+14 WRITE !,BAR("LINE")
+15 IF '$DATA(BARDET)
QUIT
+16 ;
COLUMNS ; EP
+1 ; Write column header / message
+2 WRITE !?4,"Bill",?13,"Date of",?23,"Patient",?37,"A/R",?45,"3P"
+3 WRITE ?50,$JUSTIFY("Amount",10),?63,$JUSTIFY("A/R Current",10),!
+4 WRITE ?4,"Number",?13,"Service",?23,"Name",?37,"IEN"
+5 WRITE ?45,"IEN",?50,$JUSTIFY("Billed",10),?63,$JUSTIFY("Balance",10)
+6 IF ($GET(DIROUT)!$GET(DUOUT)!$GET(DTOUT)!$GET(DROUT))
SET BARQUIT=1
+7 QUIT
+8 ; *********************************************************************
+9 ;
EBARPG ;
+1 KILL BAR("LINE"),BAR("PG"),BARHDR,BAR("DT")
+2 QUIT
+3 ; *********************************************************************
+4 ;
DOTS ; displaying of dots
+1 SET BARDISP=BARDISP+1
+2 IF '(BARDISP#200)
WRITE ".."
+3 QUIT