Case Study 2: MedClaim Timely Filing and Claim Aging System

Background

Healthcare regulations require insurance claims to be filed within a specific number of days from the date of service. MedClaim processes claims from over 200 payer organizations, each with different timely filing limits ranging from 90 days to 365 days. Untimely claims must be denied with the correct denial reason code, and the aging of all pending claims must be reported daily for financial planning.

The Problem

MedClaim's legacy timely filing logic had three critical issues: 1. It used a 30-day-per-month approximation, causing incorrect determinations near month boundaries 2. It did not account for weekend/holiday filing adjustments that some payers allow 3. The aging report used a different date calculation than the filing validation, producing inconsistent results

James Okafor's team was tasked with unifying all date calculations into a single, intrinsic-function-based module.

Solution

The team built a centralized date utility subprogram (DATEUTIL) called by both the adjudication program and the aging report program:

  1. Days-between function: A single paragraph using INTEGER-OF-DATE subtraction, replacing all hand-coded date math
  2. Timely filing check: Compares elapsed days against a payer-specific limit table loaded from DB2
  3. Aging bucket assignment: Uses the same days-between calculation, ensuring consistency
  4. Date validation: Comprehensive validation before any arithmetic, catching corrupt EDI dates

Key Technical Details

The payer timely filing table:

01  PAYER-TF-TABLE.
    05  PTF-COUNT   PIC 9(3) COMP.
    05  PTF-ENTRY   OCCURS 1 TO 300 TIMES
                    DEPENDING ON PTF-COUNT
                    ASCENDING KEY IS PTF-PAYER-ID
                    INDEXED BY PTF-IDX.
        10  PTF-PAYER-ID     PIC X(10).
        10  PTF-TF-DAYS      PIC 9(3).
        10  PTF-WEEKEND-ADJ  PIC X(1).
            88  PTF-ALLOWS-WEEKEND-ADJ VALUE "Y".

The weekend adjustment feature: if the filing deadline falls on a Saturday or Sunday AND the payer allows weekend adjustment, the deadline is extended to the following Monday.

Results

  • Filing determination accuracy improved from 99.2% to 99.97%
  • The 0.8% error rate had been costing MedClaim approximately $240,000/year in incorrectly denied claims that were overturned on appeal
  • Aging report now matches adjudication logic exactly — no more discrepancies
  • Date validation catches an average of 12 corrupt dates per day that previously caused downstream errors

Lessons Learned

  1. One date calculation module, used everywhere: Duplicate date logic is a guaranteed source of inconsistency
  2. Never approximate dates: The 30-day-month approximation seems harmless but causes real financial impact at scale
  3. Validate before calculate: An invalid date in INTEGER-OF-DATE causes an abend — validate first, always

Discussion Questions

  1. How should the system handle a claim where the service date is before the patient's coverage effective date?
  2. What is the business impact of a 0.8% error rate on timely filing determinations for 800,000 daily claims?
  3. How could the weekend adjustment logic be extended to handle payer-specific holiday calendars?
  4. Should the DATEUTIL subprogram be stateless (pass all dates as parameters) or maintain internal state (e.g., cached "today" date)?