Document AI · revenue operations
Reading the treatment plan so billing doesn't have to
Every plan arrives as a different PDF. Humans re-type them. Revenue leaks in the gaps between what was proposed and what was billed.
§01The problem
A treatment plan is where a clinic's revenue is actually decided: procedures, codes, fees, insurance portions, patient portions. And in most practices it exists as a PDF — a different PDF per practice-management system, per template, per office. Billing teams re-type them into spreadsheets and downstream tools, at night, by hand.
Re-typing isn't just slow; it's lossy. A missed procedure line or a transposed amount doesn't announce itself — it just becomes unbilled work or a patient dispute weeks later. The error hides until it costs money or goodwill.
§02The thinking
The tempting frame is 'OCR problem'. The correct frame is 'trust problem with an OCR component'. A billing person will not stake a patient conversation on a number a machine read — unless the system shows its work and makes verification faster than re-typing ever was.
That reframing drove everything: extraction had to be field-by-field inspectable, uncertain reads had to declare themselves, and the interface had to be a verification surface — human eyes exactly where the model is least sure — not a black box that emits a spreadsheet.
Blank and malformed values got special attention: a blank that means 'zero' and a blank that means 'failed to read' are different facts, and conflating them is how quiet revenue leaks start.
+ Confidence-aware extraction with a review lane
− straight-through automation
# one silently wrong amount destroys more trust than fifty flagged uncertainties. The review lane is where adoption was won.
+ Template-agnostic parsing tuned per family of layouts
− per-office custom templates
# offices change templates without telling anyone; a brittle per-template system decays from day one.
+ Treating 'blank' as a first-class value with provenance
− coercing blanks to zero
# a blank procedure amount displayed as $0 is a lie with a currency symbol. Showing 'unread — check source' kept the numbers honest.
§03What shipped
The pipeline ingests the PDF, segments the plan into procedure lines, extracts codes and amounts with per-field confidence, and presents a verification view: extracted values on one side, the source crop on the other, uncertain fields highlighted first. Confirmed plans flow onward as structured data.
The demo below is a faithful miniature with fictional procedures — drag the slider between what the machine read and what the human sees.
§04Outcomes
Minutes → moments
per plan, with review focused only where confidence is low
Zero silent zeros
unreadable values surface as questions, not as fabricated amounts
Fewer disputes
when the proposed and the billed match, the awkward patient conversation never happens
§05Reflection
This project sharpened my respect for boring correctness. No demo moment here — just the slow accumulation of trust as the system kept being right, and kept admitting when it wasn't sure. That's what enterprise-grade AI mostly is.
$ cat takeaways.txt
- ✓ Frame extraction products as trust products; accuracy is necessary, inspectability is decisive.
- ✓ Uncertainty shown early is cheaper than errors found late.
- ✓ A blank is data. Never let a model invent a zero.