Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBOTR4

IBOTR4.m

Go to the documentation of this file.
IBOTR4 ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - OUTPUT (CON'T.) ; 31-DEC-91
 ;;2.0;INTEGRATED BILLING;**42,100,118,128,752**;21-MAR-94;Build 20
 ;;Per VA Directive 6402, this routine should not be modified.
 ;
 ;MAP TO DGCROTR4
 ;
ADDFLD ; - Build descriptive title for BILL/CLAIMS field.
 S IBAFT=IBAFN_": "
 I IBAFD D  Q
 .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))
 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-7) S IBCALC=7 D PAUSE^IBOTR3 Q:IBQUIT  D HDR^IBOTR3,INSADD^IBOTR3
 I IBPRNT="M" W !?79,"----------- ---------- ----------- ----------- ------"
 W !,"TOTAL NUMBER OF BILLS",$S(IBPRNT="M":" (AVG # DAYS)",1:""),": "
 W +IBTI,$S(IBPRNT="M":" ("_$J($S(+IBTI:IBDS/+IBTI,1:0),0,1)_")",1:"")
 W ?79,$J($P(IBTI,U,2),11,2),?91,$J($P(IBTI,U,3),10,2),$S(IBSORT="P":"*",1:"")
 W ?102,$J($P(IBTI,U,2)-$P(IBTI,U,3),11,2),$S(IBSORT="O":"*",1:"")
 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)
 Q
 ;
GTOT ; - Calculate and write grand totals for report.
 I $Y>(IOSL-15) S IBCALC=15 D PAUSE^IBOTR3 Q:IBQUIT  D HDR^IBOTR3
 I IBPRNT'="G" W !
 W !?40,"GRAND TOTAL NUMBER OF BILLS:",?80,$J(+IBTT,11)
 W !?40,"GRAND TOTAL AMOUNT BILLED:",?80,$J($P(IBTT,U,2),11,2)
 W !?40,"GRAND TOTAL AMOUNT BILLED-UNDER 65:",?80,$J($P(IBTT,U,3),11,2)
 W !?40,"GRAND TOTAL AMOUNT BILLED-65 & OVER:",?80,$J($P(IBTT,U,4),11,2)
 W !?40,"GRAND TOTAL AMOUNT COLLECTED:",?80,$J($P(IBTT,U,5),11,2)
 W !?40,"GRAND TOTAL AMOUNT COLLECTED-UNDER 65:",?80,$J($P(IBTT,U,6),11,2)
 W !?40,"GRAND TOTAL AMOUNT COLLECTED-65 & OVER:",?80,$J($P(IBTT,U,7),11,2)
 W !?40,"GRAND TOTAL AMOUNT UNPAID:",?80,$J($P(IBTT,U,2)-$P(IBTT,U,5),11,2)
 W !?40,"GRAND TOTAL AMOUNT PENDING:",?80,$J($P(IBTT,U,8),11,2)
 W !?40,"PERCENTAGE COLLECTED:",?80,$J($S('$P(IBTT,U,2):0,1:$P(IBTT,U,5)/$P(IBTT,U,2)*100),11,2)
 I $G(IBCANC) D
 .W !?40,"GRAND TOTAL NUMBER OF CANCELLED BILLS:",?80,$J($P(IBTT,U,9),11)
 .W !?40,"GRAND TOTAL AMOUNT OF CANCELLED BILLS:",?80,$J($P(IBTT,U,10),11,2)
 ;IB*752/DTG - remove the extra pause
 ;S IBCALC=3 D PAUSE^IBOTR3
 S IBCALC=3
 Q