← INDEX/WORK/REVPROOF

№ 08 — MEDICAL BILLING AI

RevProof

Audit-ready E/M, therapy and hospice coding, cited to the chart, decided by a rules engine, sealed by Authyr. The model never picks a code.

TYPEVenture · Health-tech
YEAR2026
ROLEFounder · Architect · Engineer
STATUSPrototype live on synthetic data · Houston design-partner practice · Hospice engine added Oct 2026
SCOPEClinical NLP · Deterministic coding engines · Sealed records · HIPAA-shaped architecture
LIVELive demo (synthetic data) ↗

Why this exists

Small and mid-size practices on older EHRs undercode out of audit fear, get downcoded by payers, and cannot prove what happened. The design partner is a Houston multi-specialty practice: eleven clinicians, about 3,300 visits a month, billing through a remote-desktop window into a 2000s-era EHR. One 99213 that the note supports as a 99214 is about $55 at the practice’s rates; the working model puts its yearly leak at $180k–257k. Every other tool suggests the code. RevProof defends it: each code carries its quotes, the rule that produced it, who approved it, and a seal that shows nothing changed afterward.

The architecture is the compliance posture. An LLM (Claude) extracts evidence only: problems, data, risk and time as verbatim quotes with character offsets, each validated against the note text, with anything unverifiable dropped before it is shown. A deterministic TypeScript engine applies the AMA 2021 decision-making grid, the CMS 8-minute rule and payer therapy profiles, and prices the gap on current-year Medicare values pulled from the CMS files. A person approves every change. Prompts for a missing sentence appear only when the note shows the work was done, never to add work. Pricing is flat per provider, never a share of recovery, because a percentage pays the vendor to code higher. First live eval: 95% level agreement on 40 notes with both misses upward, then a prompt revision to 140 of 140.

The seal makes the record checkable without trusting the practice or the vendor. The note’s fingerprint at signing, each therapy session’s tap in and tap out, and every approval land on append-only witness records held by Authyr, my other venture, kept strictly as a neutral third party: the UI says “sealed by Authyr” and nothing more, hashes only, never the note. In October 2026, with a hospice owner at the table, the product grew a second engine. Office E/M disputes interpretation; hospice disputes fact, so there the sealed record is the product and the engine is the assistant.

What I engineered

CITE

Evidence, never codes

Claude pulls problems, data, risk and time from the note as quotes with offsets. A validator checks every quote against the note and drops what fails. With no API key the app runs in demo mode: the synthetic seed’s labelled evidence flows through the same validator. An eval harness scores extraction against ground truth, sequentially, note by note.

CHECK · E/M

The AMA 2021 grid in pure TypeScript

Two of three elements or time, with independent interpretation, outside-records review and prescription management encoded as rules, each with its source and a test. The ledger prices the gap on CY2026 Medicare RVUs times the conversion factor from the CMS relative-value files; a test fails the build if the rate year goes stale.

CHECK · THERAPY

Timed units, both ways

CMS aggregate 8-minute rule and per-payer profiles (the UHC cap, the BCBS of Texas aggregate). A 27-minute session at two units passes; a 20-minute session at two units is flagged as exposure, not upside. A phone page at the treatment-room stand taps the session in and out, and both taps are sealed.

CHECK · HOSPICE

The second engine

Benefit-period calendar, notice-of-election and certification timeliness, the face-to-face window, LCD prognosis baselines, levels of care, the service-intensity add-on cap, and amendment-after-records-request rules, every one citing its CFR or manual section. FY2027 per-diem rates on the hospice fiscal year. A census board shows what stands between each chart and its claim.

DENIALS

835s read, appeals packed

A minimal X12 835 parser with the CARC dictionary detects payer downcodes and unit reductions. The appeal packet carries the quotes and a verify link, and sending it seals it. An in-browser downcode scanner lets a practice check its own remittances without any data leaving the browser.

SEAL

Authyr witness records

Authyr’s witness envelope and signers, copied in with source notes, plus RevProof’s per-patient chain layer. The public verify page shows what was sealed, when, the hashes, the chain position and three checks, and nothing clinical. A dev-only tamper endpoint proves the failure mode: “This record does not verify.”

FLOOR

Nurse intake mirrors the note

A rule from a retired physician advising the build: the note must document at least the work that was done, and under-documentation is the loss. The nurse intake records the visit in the claim’s structure and is compared with the physician’s note in both directions, because consistency between the two is what an auditor checks.

GUARDRAILS AS CODE

The rules that cannot be unwritten

Build gates: no PHI in the seeds, every rule has a test, every rate cites its source. A brand test forbids the words “authenticate”, “maximize” and “% of”. Practice-scoped RLS with an isolation test on PGlite locally and the Supabase stack in CI. Synthetic data only until a BAA covers every vendor in the path.

PRODUCT

Ledger to verify page

Next.js 16 / React 19 app: ledger, queue, encounter review with quotes lit in the note, therapy, room stand, denials, providers with a ramp target (a quarter of the gap a month, never all at once), verify, settings. A marketing site with a leakage calculator on the same ledger package, Git-connected on Netlify. Icons from one vector system; no AI-slop aesthetics.

In the wild

RevProof encounter flow — the LLM cites evidence as quotes, a deterministic engine checks the rules, a person approves, Authyr seals the record; guardrails and the three engines below
CITE → CHECK → APPROVE → SEAL — THE MODEL NEVER PICKS A CODE; GUARDRAILS AS CODE; THREE ENGINES ON ONE SPINE
0CODES PICKED BY THE MODEL
95%LEVEL AGREEMENT, FIRST LIVE EVAL (N=40)
150+RULE AND ENGINE TESTS
3ENGINES: E/M · THERAPY · HOSPICE
Claude Sonnet 5 (Anthropic) · extraction onlyNext.js 16 · React 19TypeScriptTailwind 4 · shadcn · lucideSupabase Postgres · RLSPGlitezod · vitest · PlaywrightX12 835Authyr witness sealsNetlifypnpm workspacesClaude Code

Regulated-domain AI done the defensible way: the model is confined to quoting, a tested rules engine decides, a human approves, and a neutral seal makes the record checkable by the party who pays. Scoped, built and demoed in days, then extended to a second clinical domain in one.