IBOTR4 ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - OUTPUT (CON'T.) ; 31-DEC-91
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;
;MAP TO DGCROTR4
;
ADDFLD ; Build descriptive title for BILL/CLAIMS field.
S IBAFT=IBAFN_": "
I IBAFD S IBAFT=IBAFT_$S(IBAFF=0&(IBAFL=9999999):"ALL DATES",IBAFF=0:"ALL DATES THROUGH "_$$DATE^IBOTR3(IBAFL),IBAFL=9999999:"ALL DATES ON AND AFTER "_$$DATE^IBOTR3(IBAFL),1:$$DATE^IBOTR3(IBAFF)_" THROUGH "_$$DATE^IBOTR3(IBAFL)) Q
I $D(IBAFZ) S IBAFT=IBAFT_$S(IBAFZ="ALL":"ALL VALUES",1:"NULL VALUES ONLY") Q
I IBAFF="@" S IBAFT=IBAFT_$S(IBAFL]"":"ALL VALUES THROUGH "_IBAFL_", INCLUDING NULLS",1:"ALL VALUES, INCLUDING NULLS") Q
S IBAFT=IBAFT_$S(IBAFF']"":"ALL VALUES THROUGH "_IBAFL,IBAFL']"":"ALL VALUES FOLLOWING "_IBAFF,1:"ALL VALUES BETWEEN "_IBAFF_" AND "_IBAFL)
Q
;
SUBTOT ; Calculate and write sub-totals for each Insurance Company.
I $Y>(IOSL-5) S IBCALC=5 D PAUSE^IBOTR3 Q:IBQUIT D HDR^IBOTR3,INSADD^IBOTR3
W !?80,"---------",?90,"---------",?101,"---------",?111,"---------",?122,"---------"
W !,"TOTAL NUMBER OF BILLS: ",$P(IBTI,"^"),?80,$J($P(IBTI,"^",2),9,2)
W ?90,$J($P(IBTI,"^",3),9,2),?101,$J($P(IBTI,"^",2)-$P(IBTI,"^",3),9,2),?111,$J($P(IBTI,"^",4),9,2)
W ?123,$J($S('$P(IBTI,"^",2):0,1:$P(IBTI,"^",3)/$P(IBTI,"^",2)*100),6,2)
Q
;
GTOT ; Calculate and write grand totals for report.
I $Y>(IOSL-11) S IBCALC=11 D PAUSE^IBOTR3 Q:IBQUIT D HDR^IBOTR3
W !!!,?6,"GRAND TOTAL NUMBER OF BILLS:",?44,$J($P(IBTT,"^"),4)
W !?6,"GRAND TOTAL AMOUNT BILLED:",?38,$J($P(IBTT,"^",2),10,2)
W !?6,"GRAND TOTAL AMOUNT COLLECTED:",?38,$J($P(IBTT,"^",3),10,2)
W !?6,"GRAND TOTAL AMOUNT UNPAID:",?38,$J($P(IBTT,"^",2)-$P(IBTT,"^",3),10,2)
W !?6,"GRAND TOTAL AMOUNT PENDING:",?38,$J($P(IBTT,"^",4),10,2)
W !?6,"PERCENTAGE COLLECTED:"
W ?42,$J($S('$P(IBTT,"^",2):0,1:$P(IBTT,"^",3)/$P(IBTT,"^",2)*100),6,2)
S IBCALC=3 D PAUSE^IBOTR3
Q
IBOTR4 ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - OUTPUT (CON'T.) ; 31-DEC-91
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;
+3 ;MAP TO DGCROTR4
+4 ;
ADDFLD ; Build descriptive title for BILL/CLAIMS field.
+1 SET IBAFT=IBAFN_": "
+2 IF IBAFD
SET IBAFT=IBAFT_$SELECT(IBAFF=0&(IBAFL=9999999):"ALL DATES",IBAFF=0:"ALL DATES THROUGH "_$$DATE^IBOTR3(IBAFL),IBAFL=9999999:"ALL DATES ON AND AFTER "_$$DATE^IBOTR3(IBAFL),1:$$DATE^IBOTR3(IBAFF)_" THROUGH "_$$DATE^IBOTR3(IBAFL))
QUIT
+3 IF $DATA(IBAFZ)
SET IBAFT=IBAFT_$SELECT(IBAFZ="ALL":"ALL VALUES",1:"NULL VALUES ONLY")
QUIT
+4 IF IBAFF="@"
SET IBAFT=IBAFT_$SELECT(IBAFL]"":"ALL VALUES THROUGH "_IBAFL_", INCLUDING NULLS",1:"ALL VALUES, INCLUDING NULLS")
QUIT
+5 SET IBAFT=IBAFT_$SELECT(IBAFF']"":"ALL VALUES THROUGH "_IBAFL,IBAFL']"":"ALL VALUES FOLLOWING "_IBAFF,1:"ALL VALUES BETWEEN "_IBAFF_" AND "_IBAFL)
+6 QUIT
+7 ;
SUBTOT ; Calculate and write sub-totals for each Insurance Company.
+1 IF $Y>(IOSL-5)
SET IBCALC=5
DO PAUSE^IBOTR3
IF IBQUIT
QUIT
DO HDR^IBOTR3
DO INSADD^IBOTR3
+2 WRITE !?80,"---------",?90,"---------",?101,"---------",?111,"---------",?122,"---------"
+3 WRITE !,"TOTAL NUMBER OF BILLS: ",$PIECE(IBTI,"^"),?80,$JUSTIFY($PIECE(IBTI,"^",2),9,2)
+4 WRITE ?90,$JUSTIFY($PIECE(IBTI,"^",3),9,2),?101,$JUSTIFY($PIECE(IBTI,"^",2)-$PIECE(IBTI,"^",3),9,2),?111,$JUSTIFY($PIECE(IBTI,"^",4),9,2)
+5 WRITE ?123,$JUSTIFY($SELECT('$PIECE(IBTI,"^",2):0,1:$PIECE(IBTI,"^",3)/$PIECE(IBTI,"^",2)*100),6,2)
+6 QUIT
+7 ;
GTOT ; Calculate and write grand totals for report.
+1 IF $Y>(IOSL-11)
SET IBCALC=11
DO PAUSE^IBOTR3
IF IBQUIT
QUIT
DO HDR^IBOTR3
+2 WRITE !!!,?6,"GRAND TOTAL NUMBER OF BILLS:",?44,$JUSTIFY($PIECE(IBTT,"^"),4)
+3 WRITE !?6,"GRAND TOTAL AMOUNT BILLED:",?38,$JUSTIFY($PIECE(IBTT,"^",2),10,2)
+4 WRITE !?6,"GRAND TOTAL AMOUNT COLLECTED:",?38,$JUSTIFY($PIECE(IBTT,"^",3),10,2)
+5 WRITE !?6,"GRAND TOTAL AMOUNT UNPAID:",?38,$JUSTIFY($PIECE(IBTT,"^",2)-$PIECE(IBTT,"^",3),10,2)
+6 WRITE !?6,"GRAND TOTAL AMOUNT PENDING:",?38,$JUSTIFY($PIECE(IBTT,"^",4),10,2)
+7 WRITE !?6,"PERCENTAGE COLLECTED:"
+8 WRITE ?42,$JUSTIFY($SELECT('$PIECE(IBTT,"^",2):0,1:$PIECE(IBTT,"^",3)/$PIECE(IBTT,"^",2)*100),6,2)
+9 SET IBCALC=3
DO PAUSE^IBOTR3
+10 QUIT