Case Study · Healthcare Transparency

Turning Medical Bill Confusion Into Refunds, Line By Line

How we helped BillDecoder turn a physician founder’s vision into an AI that reads any medical bill, flags the errors, and writes the dispute letter. Shipped across web, iOS, and Android in four months.
HIPAA-Compliant
Web & Mobile
AI / ML
iOS & Android
4 mo
Discovery to launch across web, iOS, and Android
3
Platforms shipped: web, iOS, Android
5-star
Clutch review rating
~80%
Of U.S. medical bills contain errors (Healthline)
From the Founder

Dr. Peter Valenzuela on What He Wanted Built and Why

Dr. Peter Valenzuela on the gap he saw in healthcare, the product he set out to build, and the partnership that got it shipped.
The Client

A Physician-Led Startup That Needed a Build Team to Match Its Ambition

BillDecoder is a physician-led startup. Dr. Peter Valenzuela, a healthcare executive with two decades running multi-specialty medical groups, founded the company alongside a CTO with deep cybersecurity and regulated SaaS experience.
Peter had watched the same scene for years: patients staring at line items they couldn’t read, on bills that statistically were wrong almost as often as they were right. He wanted a tool that could spot the errors line by line and draft a dispute letter ready to send, working from a phone before the user even created an account.

Diagnostic AI for Messy Real Bills

Medical bills don’t arrive as clean PDFs. They run across many pages of densely coded line items the AI has to read in context.

HIPAA Without the Friction Wall

Patients upload bills before creating an account. That means handling PHI from second one, with no authenticated session to lean on.

A Dispute Letter the Patient Could Send

Flagging the error is half the job. The product had to generate a defensible letter citing the right codes and regulations, ready for the patient to sign.

Three Platforms, One MVP Timeline

Web, iOS, and Android from a single codebase, on a budget that didn’t allow for parallel native teams.
The Solution

From Bill Upload to Ready-to-Send Dispute, in Under Two Minutes

We designed and built a HIPAA-compliant web and mobile app that turns a phone snapshot of a medical bill into a confidence-scored audit and a draft dispute letter, with the analysis kicking off before a user creates an account.
01
AI Bill Analysis Engine
The engine runs each bill through Hathr.ai on Claude Sonnet 4.5, catching duplicates, upcoding, and math errors. Every flag gets a confidence score.
02
Multi-Page Document Processing
Real bills arrive as photos, PDFs, or scans, often across many pages. AWS Textract stitches them into one document the AI reads end to end.
03
Auto-Generated Dispute Letters
Once errors are flagged, the app drafts a ready-to-sign letter citing the right billing codes and regulations. The patient downloads, signs, and sends.
04
Confidence Scoring on Every Flag
Each flag gets a High, Medium, or Low confidence rating tied to the evidence, so patients know which errors are worth fighting first.
05
Flexible Payment Flow
A no-account upload lets patients try before they pay. Stripe handles web checkout, RevenueCat handles in-app purchases. A free tier covers the first bill.
06
Admin Console
A back-office panel gives the BillDecoder team a window into user accounts, group management, and individual bill analyses for review and quality checks.

1. Document Intake

Every uploaded bill is merged and run through AWS Textract’s async OCR, producing one normalized text stream the AI can read end to end.

2. Deterministic Preprocessing

A preprocessor handles arithmetic and structural parsing before the AI sees the bill, taking the error-prone math off the model’s shoulders.

3. Direct-to-Claude AI Pass

Cleaned text moves to Claude Sonnet 4.5 through Hathr.ai’s HIPAA-compliant transport, with the RAG layer bypassed. Refined prompts catch bundling, upcoding, and duplicates.

4. Confidence-Scored Output

Each flagged line gets a High, Medium, or Low confidence rating tied to the evidence, feeding both the review screen and the dispute letter.
AI Architecture

Why We Bypassed the RAG Layer for the Audit

The first build routed bills through Hathr.ai’s standard API, which wraps Claude in a RAG layer. That layer worked for general queries but added noise to the line-item math a bill audit depends on.
The team bypassed it while keeping Hathr.ai’s HIPAA-compliant transport intact. Extracted text moves through the same secure channel directly to Claude, with a preprocessor handling the math.
What an experienced auditor would catch, the engine now catches in seconds, on a phone.
Technology

A Modern Healthcare Stack Built Around HIPAA-Compliant AI

Every tool was chosen to hit two requirements at once: HIPAA-grade handling of patient data and shipping a testable product across all three platforms on a tight startup timeline.
Next.js
Web App
📱
Capacitor
iOS & Android
🗄️
Convex
HIPAA-Compliant DB
🧠
Hathr.ai
AI Engine
📄
AWS Textract
Document OCR
💳
Stripe + RevenueCat
Payments
What I gained from that partnership wasn’t just code. It was confidence. I knew the product was in good hands, which freed me up to focus on everything else a founder has to juggle.
Dr. Peter Valenzuela
Founder & CEO, BillDecoder
User Outcomes

Savings Identified By Users

See how BillDecoder has helped users understand their bills and flag issues.
“After uploading my hospital bill, BillDecoder highlighted potential duplicate charges totaling about $1,650. Using the appeal letter, I contacted my insurance company, and the issue was resolved within 30 days.”
★★★★★
Sarah from Austin
Identified $1,650 in errors
“BillDecoder helped me catch something I never would have noticed. Even without an itemized bill, it flagged identical charges from two different specialists and guided me to request more detail before paying. That alone was worth it.”
★★★★★
Sammy from California
Identified $367 in errors
“BillDecoder identified an improper unbundling of colonoscopy procedure codes and helped me generate a clear, evidence-based appeal letter to dispute the $1,599 charge.”
★★★★★
Michael from California
Identified $1,599 in errors
User Outcomes

Building a Healthcare AI That Has to Clear HIPAA on Day One?

We build HIPAA-compliant AI products for healthcare founders, from kickoff to app store inside a single quarter or two.