source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBOTR4.m@ 1006

Last change on this file since 1006 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1IBOTR4 ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - OUTPUT (CON'T.) ; 31-DEC-91
2 ;;2.0;INTEGRATED BILLING;**42,100,118,128**;21-MAR-94
3 ;
4 ;MAP TO DGCROTR4
5 ;
6ADDFLD ; - Build descriptive title for BILL/CLAIMS field.
7 S IBAFT=IBAFN_": "
8 I IBAFD D Q
9 .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))
10 I $D(IBAFZ) S IBAFT=IBAFT_$S(IBAFZ="ALL":"ALL VALUES",1:"NULL VALUES ONLY") Q
11 I IBAFF="@" S IBAFT=IBAFT_$S(IBAFL]"":"ALL VALUES THROUGH "_IBAFL_", INCLUDING NULLS",1:"ALL VALUES, INCLUDING NULLS") Q
12 S IBAFT=IBAFT_$S(IBAFF']"":"ALL VALUES THROUGH "_IBAFL,IBAFL']"":"ALL VALUES FOLLOWING "_IBAFF,1:"ALL VALUES BETWEEN "_IBAFF_" AND "_IBAFL)
13 Q
14 ;
15SUBTOT ; - Calculate and write sub-totals for each insurance company.
16 I $Y>(IOSL-7) S IBCALC=7 D PAUSE^IBOTR3 Q:IBQUIT D HDR^IBOTR3,INSADD^IBOTR3
17 I IBPRNT="M" W !?79,"----------- ---------- ----------- ----------- ------"
18 W !,"TOTAL NUMBER OF BILLS",$S(IBPRNT="M":" (AVG # DAYS)",1:""),": "
19 W +IBTI,$S(IBPRNT="M":" ("_$J($S(+IBTI:IBDS/+IBTI,1:0),0,1)_")",1:"")
20 W ?79,$J($P(IBTI,U,2),11,2),?91,$J($P(IBTI,U,3),10,2),$S(IBSORT="P":"*",1:"")
21 W ?102,$J($P(IBTI,U,2)-$P(IBTI,U,3),11,2),$S(IBSORT="O":"*",1:"")
22 W ?114,$J($P(IBTI,U,4),11,2),?126,$J($S('$P(IBTI,U,2):0,1:$P(IBTI,U,3)/$P(IBTI,U,2)*100),6,2)
23 Q
24 ;
25GTOT ; - Calculate and write grand totals for report.
26 I $Y>(IOSL-15) S IBCALC=15 D PAUSE^IBOTR3 Q:IBQUIT D HDR^IBOTR3
27 I IBPRNT'="G" W !
28 W !?40,"GRAND TOTAL NUMBER OF BILLS:",?80,$J(+IBTT,11)
29 W !?40,"GRAND TOTAL AMOUNT BILLED:",?80,$J($P(IBTT,U,2),11,2)
30 W !?40,"GRAND TOTAL AMOUNT BILLED-UNDER 65:",?80,$J($P(IBTT,U,3),11,2)
31 W !?40,"GRAND TOTAL AMOUNT BILLED-65 & OVER:",?80,$J($P(IBTT,U,4),11,2)
32 W !?40,"GRAND TOTAL AMOUNT COLLECTED:",?80,$J($P(IBTT,U,5),11,2)
33 W !?40,"GRAND TOTAL AMOUNT COLLECTED-UNDER 65:",?80,$J($P(IBTT,U,6),11,2)
34 W !?40,"GRAND TOTAL AMOUNT COLLECTED-65 & OVER:",?80,$J($P(IBTT,U,7),11,2)
35 W !?40,"GRAND TOTAL AMOUNT UNPAID:",?80,$J($P(IBTT,U,2)-$P(IBTT,U,5),11,2)
36 W !?40,"GRAND TOTAL AMOUNT PENDING:",?80,$J($P(IBTT,U,8),11,2)
37 W !?40,"PERCENTAGE COLLECTED:",?80,$J($S('$P(IBTT,U,2):0,1:$P(IBTT,U,5)/$P(IBTT,U,2)*100),11,2)
38 I $G(IBCANC) D
39 .W !?40,"GRAND TOTAL NUMBER OF CANCELLED BILLS:",?80,$J($P(IBTT,U,9),11)
40 .W !?40,"GRAND TOTAL AMOUNT OF CANCELLED BILLS:",?80,$J($P(IBTT,U,10),11,2)
41 S IBCALC=3 D PAUSE^IBOTR3
42 Q
Note: See TracBrowser for help on using the repository browser.