DEV Community

Val Morgan
Val Morgan

Posted on

Turning 835 Remittance Files into a Denial Dashboard

Revenue cycle teams usually get their denial reports from the billing system, and those reports are often a month old and grouped in ways nobody chose. The raw data is better and already arrives every week: the 835 electronic remittance advice (ERA) files payers send with each payment. If you can parse them, you can build a denial view that is fresher and more honest than most built-in reports.

Here is the approach I use. It is not a full X12 parser, just enough to get useful numbers.

What is inside an 835

An 835 file is a long string of segments, usually separated by ~, with elements separated by *. The segments that matter for denials:

  • CLP: one per claim. Includes your patient control number (CLP01), the claim status (CLP02), billed amount (CLP03), paid amount (CLP04), patient responsibility (CLP05) and the payer's claim number (CLP07).
  • CAS: adjustments. A group code (CO, PR, OA, PI, CR) followed by one or more sets of reason code, amount and quantity.
  • SVC: one per service line, with procedure code, billed and paid amounts. CAS segments after an SVC apply to that line.
  • LQ: remark codes (RARCs) that add detail to the reason codes.

The reason codes in CAS are the standard Claim Adjustment Reason Codes (CARCs). For example, 16 means the claim lacks information, 27 means coverage ended, 29 means the filing limit passed, 50 means not medically necessary and 197 means a required authorization was missing.

A minimal parser

def parse_835(text):
    seg_sep = text[105] if text.startswith("ISA") else "~"
    rows, claim, line = [], None, None
    for raw in text.split(seg_sep):
        el = raw.strip().split("*")
        tag = el[0]
        if tag == "CLP":
            claim = {"pcn": el[1], "status": el[2],
                     "billed": float(el[3]), "paid": float(el[4] or 0)}
            line = None
        elif tag == "SVC" and claim:
            line = el[1].split(":")[1] if ":" in el[1] else el[1]
        elif tag == "CAS" and claim:
            group = el[1]
            for i in range(2, len(el), 3):
                if el[i]:
                    rows.append({**claim, "proc": line, "group": group,
                                 "carc": el[i], "amount": float(el[i + 1])})
    return rows
Enter fullscreen mode Exit fullscreen mode

The ISA header is fixed width, so the character at position 105 is the segment terminator. Real files have more edge cases, such as multiple payments per file and reversals, but this is enough to start.

Separate denials from normal adjustments

Most CAS rows are not denials. A CO-45 adjustment (charge exceeds the fee schedule) on almost every claim is just the contract working as expected. If you count it as a denial, the dashboard becomes noise.

I keep a small mapping table that I own and review with the billing team:

CATEGORY = {
    "27": "registration", "31": "registration",
    "197": "authorization", "15": "authorization",
    "16": "documentation", "50": "medical necessity",
    "29": "timely filing", "18": "duplicate",
}
EXPECTED = {("CO", "45"), ("PR", "1"), ("PR", "2"), ("PR", "3")}
Enter fullscreen mode Exit fullscreen mode

Rows in EXPECTED are contractual write-offs or deductible, coinsurance and copay. Everything else gets a category, and unknown codes go into an "unmapped" bucket that someone reviews every week.

The views that help

Once rows are categorized, three views answer most questions:

  1. Denied dollars by category and payer, by week. Shows where to focus.
  2. Denials by procedure code. Often reveals one service with a missing authorization rule.
  3. Claim status 4 (denied) versus partial denials. Full denials and line-level denials need different follow-up.

Join the patient control number back to your scheduling or registration data and you can also see which location or workflow produced the denial.

Build or buy

This works well for analysis and for checking what your vendor reports. For day-to-day work queues, appeals and payer rules, most teams are better served by a dedicated product. This rundown of claims software that handles scrubbing, tracking and denials is a reasonable list to compare against what you build yourself.

Either way, owning the raw 835 data means you can check the numbers instead of taking them on trust.

Top comments (0)