Inspiration

I spent 4 months as a Patient Service Associate at Singapore General Hospital's Radiology department. I watched elderly patients — confused, just discharged, bill in hand — walk past the Medical Social Worker's office without knowing it existed. They had no idea that Pioneer Generation benefits, MediFund Silver, CHAS Blue, and MAF were all available to them. They just paid what the bill said.

Singapore has 12+ government healthcare schemes. They're scattered across MOH, CPF, AIC, MSF, and SupportGoWhere — 14 different portals, no single answer. Medical Social Workers are chronically overworked. Most patients discharge before speaking to one.

Then April 2026 happened. MOH restructured Integrated Shield Plan riders — new riders can no longer cover minimum deductibles, and the co-payment cap doubled from $3,000 to $6,000. Thousands of Singaporeans are now paying significantly more with no explanation.

Uncle Tan, 68, Pioneer Generation, just discharged from SGH with a $16,790 hip replacement bill. He has no idea that five schemes are available to him. He just pays what the bill says. BillSG exists to fix that.

What We Built

BillSG is an multi lingual AI-powered Singapore hospital bill navigator with two paths:

Path A — Eligibility Check (no bill needed) Complete a 5-question profile → instantly see every government scheme you qualify for. Acts as a first-line resource when Social Workers aren't available.

Path B — Full Bill Analysis Upload your hospital bill → Claude reads every line item and explains it in plain English → discover unclaimed schemes → get exact action plans: where to go, what to bring, what to say.

BillSG automatically detects April 2026 IP rider restructuring impact on your specific bill and explains exactly what changed.

Note: The bill parser is currently tuned to structured mock bills generated for this demo — real Singapore hospital bills are confidential and were not accessible during development. In production, the parser would be calibrated to each hospital's actual bill format.

Disclaimer: All outputs are for guidance only — always confirm with a Medical Social Worker before taking action.

How We Built It

We built BillSG entirely spec-first — the way Kiro was designed to be used.

Before writing a single line of application code, we wrote 8 detailed spec files in .kiro/specs/:

Spec File Purpose
eligibility-matrix/ All 13 schemes with IF/THEN acceptance criteria, verified from live MOH/CPF/AIC/MSF sources
bill-parser/ Claude API vision pipeline, JSON schema, ward class detection
scheme-matcher/ Agent workflow, 10 edge cases, 20 acceptance criteria
bill-explainer/ LLM prompt rules, April 2026 IP rider flag logic
scraper/ 14 verified government URLs, exact data points per scheme
action-plan/ Exact what-to-say phrases for every unclaimed scheme
onboarding/ All 5 profile fields, validation rules, edge cases
ui-flow/ Every page, state, loading state, and error state

Kiro features used:

  • Steering rules (.kiro/steering/) — AI never guarantees eligibility, always cites live MOH sources, always recommends a Medical Social Worker
  • Custom MCP server — exposes Singapore 2026 healthcare policy data; a Cheerio-based scraper automatically keeps it current from official government sources
  • Scheme Matching Agent (.kiro/agents/) — queries MCP server, runs deterministic eligibility logic, cross-references bill for missing subsidies, generates action plans
  • Pre-generation validation hook (.kiro/hooks/) — validates all inputs before any LLM call

Tech stack: Next.js 16 + TypeScript + Tailwind, AWS S3, Claude API (vision + text), Custom MCP Server, Cheerio scraper, Pure TypeScript rules engine

Challenges We Faced

1. MCP Server ESM compatibility The @modelcontextprotocol/sdk is ESM-only but our project runs on CommonJS. Spent significant time resolving module resolution errors before switching to .mts extension with tsx runtime and an import.meta.url polyfill for __dirname.

2. Bill parser accuracy Singapore hospital bills from different hospitals have vastly different formats. Real bills are also confidential — we couldn't access them during development. We built a structured mock bill format and tuned the parser to it. The solution: Claude API vision extracts raw text, our parser picks the last dollar amount on each line (the total column), and a keyword reordering fix ensures deduction categories are matched correctly before ward keywords.

3. Verifying 13 scheme thresholds Every eligibility number had to be manually verified from live government sources. Several numbers we initially had were wrong — CHAS Blue threshold, Merdeka Generation citizenship cutoff, ComCare income threshold. We caught most during Day 2 spec verification.

4. Scope discipline Singapore has hundreds of government schemes. Keeping scope to the 13 schemes relevant to acute inpatient public hospital bills was a constant challenge. Every feature idea was evaluated against: "Does this help Uncle Tan right now?"

What We Learned

  • Spec-first development works. Kiro's output quality was dramatically higher when working from detailed specs with testable acceptance criteria. Writing specs before code is not overhead — it's the fastest path to correct code.
  • Custom MCP servers are the single most powerful Kiro feature. Giving the agent domain-specific, current, verified data instead of training memory is what makes BillSG trustworthy in a healthcare context.
  • Singapore healthcare policy changes fast. CHAS thresholds changed in January 2025. MediSave limits changed in October 2025. IP rider rules changed in April 2026. Hardcoded data goes stale fast — the scraper architecture is essential, not optional.
  • The Medical Social Worker bottleneck is a real systemic problem. There is genuine, unmet demand for a tool like BillSG.

What's Next for BillSG

Short term

  • Calibrate bill parser to real hospital bill formats through hospital partnerships
  • Mobile app optimised for elderly users

Medium term

  • Expand to outpatient, specialist outpatient clinic, and community hospital bills
  • Cover additional schemes: CareShield Life, Healthier SG chronic disease subsidies, dialysis subsidies
  • HealthHub integration for automatic bill import

Long term

  • Regional expansion: Malaysia, Thailand, Indonesia — same concept, different schemes
  • B2G partnerships with MOH, AIC, hospital groups
  • Become the single source of truth for Singapore healthcare entitlements

Every Singaporean with a hospital bill is our user. Uncle Tan walks back into SGH knowing exactly what to fight for.

Built With

Share this project:

Updates

Submission history