Inspiration
I recently received an Explanation of Benefits (EOB) that looked more like a ransom note than a receipt. It listed vague codes, massive "Chargemaster" prices, and a confusing "Patient Responsibility" amount. When I tried to Google the codes, I ended up on dense medical coding sites that didn't tell me what I actually wanted to know: "Is this price fair?"
That's when I realized that American healthcare billing is designed to be opaque. Hospitals charge 5x, 10x, or even 20x the Medicare rate because they bank on patients being too confused to push back. I wanted to build a tool that levels the playing field—a "fintech for health" dashboard that treats medical bills with the same analytical rigor as a credit card statement.
ER Bill Explainer was born from the idea that if you can structure the data, you can negotiate the debt.
What it does
ER Bill Explainer is an upload-first platform that demystifies emergency room bills.
Instant Analysis: Users upload a PDF or image of their bill. OCR & Logic: The system extracts CPT codes and charges using Google Gemini's multimodal capabilities (planned integration). Benchmarking: It compares every single line item against federal CMS Medicare rates to calculate the "Markup Multiplier." Actionable Insights: Negotiation Score: A 1-100 score rating how much leverage you have. Fair Price Calculation: Shows exactly what Medicare would pay for the same service. Aggressiveness Meter: Visualizes hospital pricing buckets (e.g., "75% of your bill is charged at Extreme (15x+) rates"). Insurance Simulator: Slider-based modeling to see how deductibles and coinsurance impact what you owe.
How we built it
We prioritized a production-grade, trust-building UI over a generic dashboard template.
Frontend: Built with Vanilla HTML/CSS/JavaScript. We avoided heavy frameworks to keep the site lightweight and to force a deep understanding of the DOM. The UI features a custom "glassmorphism" aesthetic, CSS grid layouts for complex analytics, and smooth, physics-based animations to make the data feel "alive." Backend: Python (Flask) handles the server-side logic. We built a robust mapping engine that links CPT codes (Current Procedural Terminology) to a simplified CMS fee schedule database. AI Integration: We leveraged Google Gemini for the "Bill Explainer" feature. By feeding the raw line items into Gemini with a specific prompt context ("You are a medical billing advocate..."), we generate plain-English explanations for complex procedures like "Comprehensive Metabolic Panel" or "CT Scan Head/Brain." Data Visualization: We custom-built D3-style charts using native SVG and CSS capabilities (Donut charts with stroke-dasharray animations, stacked bar charts) to ensure they perfectly matched our design system.
Challenges we ran into
The "Uncanny Valley" of Trust: Early versions looked too much like a student project. When dealing with medical finance, trust is currency. We spent days refining the typography (Inter), spacing, and color semantics (using a specific "Fintech Green" and "Warning Orange") to make it feel like a tool you’d trust with your sensitive data. Data Normalization: Medical codes are messy. "CPT 99285" might be listed as "ER VISIT LEVEL 5", "EMERG DEPT VISIT", or "EMERGENCY ROOM." Building a fuzzy matching logic to reliably identify these codes was a significant hurdle. Visualizing "Markup": Showing a user they are being overcharged is tricky it can make them feel helpless. We had to iterate on the "Markup Distribution" chart several times to ensure it felt empowering ("Look at this ammo for negotiation") rather than defeating ("Look how much money you lost"). Accomplishments that we're proud of The "Upload-First" Flow: We successfully gated the dashboard behind a high-friction "Upload" action but made the payoff worth it. The transition animation simulating the AI "reading" the bill adds a crucial psychological layer of value. The "What This Means For You" Section: Instead of just dumping data, we built a dynamic insight engine that turns data into a story (e.g., "Facility and Imaging charges make up 82% of your total bill"). Automated Action Plan: We went beyond analysis to action. The tool now generates a custom negotiation letter PDF citing the exact CPT codes and Medicare rates from the user's bill, ready to be mailed.
What we learned
Design is Function: In fintech/healthtech, the UI is the product. If users don't understand the graph, they can't negotiate the bill. Prompt Engineering for Empathy: Getting an AI to explain a bill without sounding robotic require significant tuning of the system prompts. The Power of CMS Data: Public government data is incredibly powerful but often inaccessible. Unlocking it for the average consumer creates immediate value.
What's next for ER Bill Explainer
Real-time PDF Parsing: Fully implementing the backend pipeline to parse messy scanned PDFs using Python's pdfplumber combined with Gemini Vision. State-Specific Mandates: Adding a "Know Your Rights" module that flags if a bill violates specific state laws (like California's surprise billing protections). Direct Hospital Integration: Connecting to patient portals via FHIR APIs to pull billing data automatically.
Built With
- ai
- cms-data
- css3
- fee
- for
- generative
- google-gemini
- grid
- html5
- javascript
- python
Log in or sign up for Devpost to join the conversation.