Inspiration
Every nonprofit hospital must publish a financial assistance policy (IRC 501(r)) that can make care free or deeply discounted. But that help is buried in long PDFs most patients never read. Price tools ignore it, and charity-care tools show no prices. The rules vary so much that one household can get free care at one hospital and a full bill at the next.
For "let's dig deep," we dug those policies out. We focused on Wisconsin: it has no state charity-care law, so policies vary the most.
What it does
Unearth Health answers: "What would I actually pay?"
- Find care: enter household size, income, insurance, city and a service ("knee MRI"). We rank nearby hospitals by price after each hospital's own assistance policy, with the quoted policy sentence behind every number.
- Scan a bill: snap a photo of a bill and see what you were charged vs. what you should pay.
- Apply: start the hospital's real assistance application, pre-filled.
How we built it
All on Databricks:
- Ingest: Trilliant price files, CMS, Census and HHS poverty data go into Unity Catalog with plain SQL.
- Extract: 51 policy sets covering 123 hospitals are parsed and read by two independent models (Claude Opus 5.5 and GPT-OSS-120B) via
ai_query. - Verify: every field gets four checks (quote is in the PDF, value is in the quote, both models agree, IRS 990 / Lown data agree), which set a trust level. Unverified fields are never used in a price.
- Price: a SQL table function, with no AI at query time:
$$ \text{FPL percent} = \frac{\text{income}}{15960 + 5680 (n - 1)} \times 100 $$
$$ \text{cost} = \min(\text{tier charge}, \text{AGB cap}, \text{self-pay price}) $$
- Ship: FastAPI + React as a Databricks App, deployed with one Asset Bundle command.
Challenges we ran into
- PDF tables: sliding scales laid out as columns, and one PDF holding two regional scales.
- Our checker got fooled: fuzzy matching accepted a quote where the model had changed "250%" to "300%".
- Wrong prices on the wrong hospital: sister campuses publish separate price files, so we built a hand-reviewed crosswalk.
- Messy data: CMS blocks scripts, IRS files are 500 MB zips (we used HTTP range requests), and Python and Spark round money differently.
Accomplishments that we're proud of
- A checked, reusable dataset of assistance rules for 123 Wisconsin hospitals, with the source quote and page for every value.
- An adversarial suite of 55 realistic wrong values that the checker now catches (26 slipped through before).
- Bill scanning that runs entirely inside Databricks, with no external API key.
- An end-to-end pipeline, from raw PDFs to a live app, that deploys with one command.
What we learned
- AI is great at reading, but trust has to come from deterministic checks.
- Show uncertainty, don't hide it. "Partly verified" beats a confident wrong number.
- Databricks AI Functions make the AI step just another cached, versioned table.
What's next for Unearth Health
- More states and more services
- Insurance-aware estimates
- Hand-checked accuracy reports across more hospitals
- Submitting assistance applications directly, not just pre-filling them
Estimates only; each hospital decides eligibility. Price data: Trilliant Health.
Built With
- ai-parse-document
- ai-query
- anthropic-api
- apache-spark
- claude-opus-5.5
- databricks
- databricks-apps
- databricks-asset-bundles
- databricks-sql
- fastapi
- gpt-oss-120b
- leaflet.js
- llama-4-maverick
- pdf.js
- pdfplumber
- pypdf
- pytest
- python
- react
- tailwindcss
- tanstack-query
- typescript
- unity-catalog
- vite