Medical bill reconciliation

From AtlasOmnia/hermes-custom-pack · View interactive version

Medical bill reconciliation is an AI agent skill from the GitHub repository AtlasOmnia/hermes-custom-pack. Use when reconciling medical bills against insurer EOBs.

How to use this skill

Skill file

Medical Bill Reconciliation

Overview

Check provider bills against the insurer's Explanation of Benefits (EOB), track deductible and out-of-pocket totals, and produce a short exceptions list with draft inquiries a human sends.

The work is split into stages that never share access:

  1. Collect. Per-portal collectors download PDFs into an inbox folder. Nothing else.
  2. Extract. scripts/eob_extract.py dumps PDF text and tables; the agent maps them into fixed CSV rows, each keeping its source file and page.
  3. Validate. scripts/reconcile.py validate checks columns, dates, money, and EOB arithmetic.
  4. Reconcile. scripts/reconcile.py run matches bills to EOB lines and writes matches.csv, exceptions.csv, summary.json.
  5. Review. The agent summarizes exceptions by dollar amount and drafts inquiries. A human decides and sends. Output columns and status values are listed in references/exception-codes.md.

The scripts are offline and give the same output for the same inputs and --as-of date. The reconciler is stdlib-only; the extractor needs pdfplumber.

Where data leaves the machine: the scripts never send anything, but the Mapping step puts PDF text in front of the model, and any report delivered through a messaging gateway carries patient labels, providers, claim numbers, and amounts. For local-only processing, use a local model and deliver reports to a local file or the terminal.

When to Use

Don't use for: filing appeals or calling insurers on someone's behalf, paying bills, interpreting coverage or medical necessity, or anything requiring the agent to log in to a main email inbox.

Quick Start

SKILL=~/.hermes/skills/productivity/medical-bill-reconciliation
mkdir -p ~/medical-billing/{inbox/eob,inbox/bills,processed,extracted,data,runs}
cp $SKILL/templates/eob_lines.csv $SKILL/templates/bill_lines.csv $SKILL/templates/providers.csv ~/medical-billing/data/
cd ~/medical-billing

python3 $SKILL/scripts/eob_extract.py inbox/eob/*.pdf inbox/bills/*.pdf --out extracted/
# agent maps extracted/*.json into data/eob_lines.csv and data/bill_lines.csv
python3 $SKILL/scripts/reconcile.py validate --eob data/eob_lines.csv --bills data/bill_lines.csv --aliases data/providers.csv
python3 $SKILL/scripts/reconcile.py run --eob data/eob_lines.csv --bills data/bill_lines.csv \
  --aliases data/providers.csv --deductible 3000 --oop-max 8000 \
  --as-of 2026-04-01 --out runs/2026-04-01

Windows PowerShell differs only in setup and paths:

$SKILL = "$HOME\.hermes\skills\productivity\medical-bill-reconciliation"
"inbox\eob","inbox\bills","processed","extracted","data","runs" | ForEach-Object { New-Item -ItemType Directory -Force -Path "$HOME\medical-billing\$_" | Out-Null }
Copy-Item "$SKILL\templates\*.csv" "$HOME\medical-billing\data\"
Set-Location "$HOME\medical-billing"
python "$SKILL\scripts\eob_extract.py" (Get-ChildItem inbox\eob\*.pdf, inbox\bills\*.pdf) --out extracted

Replace the deductible and out-of-pocket numbers with the plan's actual limits, and set --as-of to the run date so results are repeatable.

Mapping Rules (the agent's part)

Read each extracted/<file>.json and write rows that follow the template headers exactly.

Human Gates

Common Pitfalls

  1. One agent with every login. Keep collectors isolated per portal and keep the reconciler away from portals. A broken login should never touch the data.
  2. Matching on amount alone. Different visits often share a price. Match on claim number, or patient + date + provider, and use amount only to break ties.
  3. Provider name drift. "Bayside Ortho" and "Bayside Orthopedic Specialists PA" are the same practice. Add an alias,canonical row to providers.csv instead of editing source rows.
  4. Counting repeated statements. Monthly statements re-list old charges. Keep bill_id consistent per account so older statements are recognized and skipped.
  5. Treating extraction errors as billing errors. Most EOB_MATH hits are misread columns. Confirm against the page before drafting anything.
  6. Mixing plan years. Accumulators reset each plan year. Run one year at a time.
  7. Trusting summed accumulators over the insurer. Totals cover only the EOBs you loaded. Compare with the insurer's accumulator page before claiming an overpayment.

Verification Checklist

Support Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.