Inspiration

MediAudit AI helps U.S. patients and caregivers turn an itemized hospital bill into a reviewable set of explanations and questions. For CSC Winter Sparkathon, the contribution being highlighted is the October 31 reliability work that makes its monetary summary more consistent before someone uses the packet to support another person. The application already existed; this entry does not claim that the entire product was built during the event.

Supporting someone through a confusing bill can mean sitting beside them, reading unfamiliar terms and helping them decide what to ask. A statement can contain CPT or HCPCS codes, repeated-looking items, supplies and charges that are difficult to interpret without context. A caregiver may want to help without being able to tell whether an AI explanation is grounded in the actual statement.

The design question is therefore specific: can the patient and helper work from the same understandable reference, see the evidence behind a proposed question and recognize the remaining uncertainty? That is the connection to mutual support. MediAudit organizes the preparation for a conversation with a billing office or insurer. Its current sharing mechanism is the print/save packet, which people can review together; it is not a synchronized online collaboration service.

This is a prototype for U.S. itemized billing, not an Indian billing-policy tool. I have not conducted patient interviews or clinical validation, and I am not claiming demonstrated savings. The provided oncology example is fictional so judges can explore the workflow without supplying a real person's medical records.

What it does

A user uploads bill photographs or a PDF, or pastes itemized text. They choose a U.S. state or region, English or Spanish output and a reading level. The application turns that input into a structured advocacy packet that a patient and caregiver can inspect before contacting the appropriate institution.

The packet includes:

  • A decoded ledger pairing original billing strings with plain-language explanations and charged amounts.
  • Candidate questions about duplicate billing, upcoding and unbundled supply patterns.
  • Evidence quoted from the supplied statement, so readers can locate the item rather than relying on an unsupported summary.
  • Illustrative benchmark ranges, model-generated confidence and labels distinguishing reference-supported estimates from other model estimates.
  • A second AI-review verdict and critique when that review succeeds.
  • A prioritized checklist, a phone script and print/save support.
  • Optional financial-assistance estimates when household information is provided, with links to external resources.

A useful walkthrough is to open the hosted application and choose Try an oncology bill. Review the decoded lines, find a quoted item, inspect the benchmark and AI-review critique, and then read the proposed question. A helper can follow the same sequence with the patient rather than treating the headline estimate as a settled conclusion.

The simpler reading mode and two output languages are intended to make the information easier to approach. Translation correctness and accessibility have not been established through a formal audit. The packet assists understanding; it does not establish that a provider made an error.

How we built it

The application uses Next.js, React and TypeScript, with server routes separating document extraction from the audit. Gemini reads uploaded documents into a structured transcription. Pasted text can bypass extraction. The audit request combines that transcript with the repository's illustrative billing anchors and coding rules. This is a small, explicit reference layer rather than a live Medicare connection, hospital pricing feed or vector-search system.

The first analysis returns structured JSON containing decoded lines, candidate discrepancies, explanations and next steps. A second Gemini request examines the flags against the same statement transcript. The server merges its verdicts and confidence adjustments into the result. Both passes are AI; a second pass is not independent professional verification. If review fails, the first-pass flags may still appear without a review badge.

The October 31 contribution adds deterministic finalization after that review. It rebuilds monetary estimates from the returned flags and benchmarks, derives counts from actual arrays and replaces unsupported verification wording with a server-controlled notice. The separation is deliberate: language models interpret messy documents, while ordinary code enforces arithmetic consistency. English and Spanish labels also make clear that the additional review is an AI review.

Development disclosure: the upload flow, model extraction, initial audit, second AI pass, existing interface and advocacy-packet features predate CSC Winter Sparkathon. The October 31 patch and its regression tests fall within the published October 29–November 29 event period. The public pull request and commit history identify the contribution; I am not presenting earlier code or earlier awards as work created here. The organizers determine whether this disclosed contribution satisfies their substantial-development requirement.

Arham Begani is the solo entrant. AI assistance was used extensively for implementation, debugging, tests and submission preparation. Gemini provides runtime extraction and analysis. Open-source dependencies are identified in the repository. The cover is a promotional illustration. The gallery screenshot is an actual run using the fictional sample. The linked video demonstrates the earlier general workflow and does not show the October 31 patch.

Challenges we ran into

A concrete failure appeared in the fictional oncology sample: two flagged charges totaled $166, yet the overview reported $166–$256 in estimated overbilling. The first model's aggregate was being accepted even after the separate review. That inconsistency could mislead a person helping someone else prepare a billing question. Adding another AI opinion had not made the arithmetic dependable.

The fix had to handle more than this single example. Model output can include reversed benchmark bounds, disputed flags, invalid monetary values and decimal amounts. A summary can also disagree with the number of items actually returned. Finalization therefore operates on the reviewed data and calculates its own totals and counts.

Another challenge was wording. The earlier result could imply verification against current price-transparency mandates that the system had not actually performed. The patch removes that claim. A confident explanation must not borrow authority from a legal or pricing check that never happened.

Privacy also needs an accurate explanation. Uploaded bill images reach the model service before identifiers are masked in the extracted output. Output masking is not pre-upload anonymization. Judges should use the fictional sample; real records require appropriate permission and an understanding of the service's handling of those records.

Accomplishments that we're proud of

The reliability layer makes its arithmetic inspectable. For each included flag, the lower difference is the charge minus the higher benchmark, floored at zero. The upper difference is the charge minus the lower benchmark, also floored at zero. Calculations use integer cents. Reversed bounds are ordered, invalid amounts are rejected and flags disputed by the second review are excluded from the estimate. Counts are derived from returned arrays rather than trusted model summaries.

For the fixed regression fixture, the two charges are $74 and $92, with a $0–$10 benchmark for each. The correct aggregate range is $146–$166. This proves a defined arithmetic property; it does not prove those benchmark prices are medically appropriate. A later hosted run returned different AI-generated bounds and displayed $141–$166, which is the particular run documented in the screenshot.

Seven regression tests cover the oncology inconsistency, disputed flags, empty results, cent arithmetic and reversed bounds, invalid amounts, range invariants and replacement of unsupported verification claims. The production build and TypeScript checks passed for the patch. The hosted fictional-sample workflow was also inspected. These are engineering checks, not clinical evaluation or proof that every AI finding is correct.

A judge can reproduce the deterministic checks by cloning the public repository, installing dependencies with npm ci and running npm test. Those tests do not need an AI key. New AI analyses require the server-side Gemini configuration described by the example environment file; hosted availability depends on service quotas and uptime. The linked pull request makes the before-and-after contribution reviewable alongside the full application.

What we learned

A second model pass can improve critique without keeping downstream summaries consistent. Review must happen before deterministic aggregation, and the interface must describe exactly which checks ran. Reliability is a pipeline property rather than a badge added to generated text.

We also learned to separate three kinds of evidence: a reproducible arithmetic fixture, a live model-generated example and a claim about patient outcomes. The first can be tested directly; the second varies; the third needs real evaluation that we have not performed. Keeping those distinctions visible is important when one person uses the output to support another.

The tool does not determine medical necessity, verify doses, guarantee coverage or identify an illegal charge. It does not submit disputes or contact providers. Its useful role is helping people prepare specific, reviewable questions for qualified people and institutions.

What's next for MediAudit AI

The next priority is permission-based usability work with patients, caregivers and qualified billing reviewers using synthetic cases. I would measure whether two readers can locate the same charge, distinguish an estimate from a verified fact and formulate a useful question. False positives and confusing outputs should be recorded alongside successes.

A future caregiver handoff could add explicit review notes and consent-aware sharing, but those features are not implemented in this submission. The present deliverable is a working prototype, an inspectable packet and a documented reliability improvement that makes its monetary claims easier to check before people act on them.

Built With

Share this project:

Updates

Submission history