Google Maps for district healthcare
A district health-operations platform for India’s Primary Health Centres: a forecasting engine anticipates medicine stock-outs and bed shortages before they happen, and a Gemini-powered decision agent recommends redistribution — gated behind a human officer who must approve it.
Python 3.12 · FastAPI · Gemini 2.5 Flash · Google Cloud Run · Firebase Firestore · Next.js 15 · TypeScript · Maps Places API
The setup
A Primary Health Centre runs out of a medicine or a bed days before anyone with authority notices — the data existed, but nobody was watching the depletion curve. Dashboards report what already happened; almost none forecast what is about to.
SwasthyaGrid treats a district as a live system: it forecasts stock-outs and occupancy gaps ahead of time, and lets an agent draft a redistribution plan — but the plan is a recommendation an officer approves, never an action the system takes on its own.
A recommendation is not a decision. The officer signs off, or nothing moves.
The machine
The hard parts
On the record
The forecasting layer is the part that has to be right before the agent layer is worth trusting: it projects medicine depletion and bed-occupancy trends per facility from reported stock and admission data, surfaced as a risk-coded map rather than a spreadsheet.
Gemini 2.5 Flash sits downstream of the forecast, not upstream of it — it reasons over already-computed shortfalls and drafts a specific redistribution recommendation (move X units of Y from facility A to facility B). That recommendation is inert until a district officer approves it; the dual-agent split — an admin decision-support surface and a separate citizen-facing portal for emergency guidance and nearest-PHC routing — keeps the human-in-the-loop boundary structural rather than a UI convention.
Built in a live hackathon sprint for Google’s GDG Build With AI, it placed in the top 10 nationally and remains deployed end-to-end on Google Cloud.
The numbers
| Measure | Value | Source |
|---|---|---|
| Recognition | Top 10 — Google GDG Build With AI Hackathon | competition result |
| Architecture | serverless FastAPI + Firestore, asia-south1 | Cloud Run deployment |
| Governance | human-approval gate on every redistribution | agent function-calling contract |
| Surfaces | admin dashboard + citizen emergency portal | dual-agent architecture |
Errata & Failures
Forecasts are only as good as reported data
The depletion curves assume PHCs report stock and occupancy on schedule; a facility that under-reports looks falsely healthy on the map. The system surfaces staleness rather than papering over it, but it cannot forecast what it was never told.
■ References