Inspiration
This sounds like a crazy stat but in the USl, up to 80% of medical bills contain errors — duplicate charges, inflated procedure codes, illegal unbundling — and most patients have no idea. Medical bills have no standard format and are typically very messy and confusing to interpret. Hiring a medical billing advocate costs hundreds of dollars. I wanted to build a tool that gives every patient the same fighting power, for free.
What it does
Apollo analyzes any medical bill (photo, scan, or PDF) and:
- Extracts every line item using Gemini Vision, inferring CPT codes even when they're not printed
- Benchmarks each charge against the CMS Medicare Physician Fee Schedule (real government pricing data)
- Detects billing errors: duplicates, upcoding, and unbundling violations using CMS Correct Coding Initiative rules
- Looks up state-specific and federal billing protection laws (No Surprises Act, balance billing statutes)
- Generates a ready-to-send, citation-backed dispute letter personalized to the patient's state
The result: a plain-English breakdown of what you were overcharged, and a letter to fight it — in seconds.
How we built it
- Frontend: React + Vite + Tailwind CSS with a drag-and-drop upload flow and a results dashboard
- Backend: FastAPI (Python) orchestrating a multi-step AI pipeline
- AI: Google Gemini API — multimodal vision for bill parsing, reasoning for error detection, and text generation for the dispute letter
- Data: CMS Medicare Physician Fee Schedule (10,000+ CPT codes) and CMS Correct Coding Initiative edits loaded into SQLite for instant lookups
- State Law Engine: A hand-curated database of billing protection laws for all 50 states, cited directly in the generated dispute letter
Challenges we ran into
- Medical bills have no standard format — Gemini Vision needed careful prompt engineering to reliably extract line items and infer CPT codes across wildly different bill layouts
- Mapping unstructured bill descriptions to specific CPT codes required building confidence thresholds and fallback logic
- The CMS fee schedule CSV has quirks in column naming across annual releases, requiring a flexible seed script
- Generating dispute letters that are legally precise while still being readable by a non-expert patient was a difficult balancing act
Accomplishments that we're proud of
- A fully functional end-to-end pipeline: upload a real bill → get a real dollar savings number → download a ready-to-send letter
- Gemini Vision correctly inferring CPT codes from bill descriptions even when they aren't printed on the bill
- The state law engine surfacing relevant, citation-accurate statutes per patient, woven naturally into the dispute letter
- Clean, intuitive UI that requires zero medical knowledge to use
What we learned
- Gemini's multimodal reasoning is genuinely well-suited for unstructured document understanding — it handled bill formats we never anticipated during testing
- Grounding AI outputs in real government datasets (CMS data) is the difference between a tool people can trust and one they can't act on
- Prompt engineering for structured JSON extraction at scale is its own discipline — small prompt changes had large effects on output consistency
What's next for Apollo
- Hospital price transparency data: Cross-reference charges against hospital-published price files (now federally required) for even tighter benchmarking
- Insurance EOB parsing: Extend to Explanation of Benefits documents to catch underpayments, not just overcharges
- Negotiation assistant: AI-guided scripts for calling the billing department, tailored to the specific errors found
- Mobile app: Native camera capture for instant bill scanning from a phone
Log in or sign up for Devpost to join the conversation.