HARSH KAWATRA

DOSSIER 04 · GDG TOP 10

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

recommend, never actPHC telemetrystock levels · bed occupancy · staffForecasting enginedepletion curves, per facilityGemini 2.5 Flashfunction-calling decision agentOfficer approval gateno auto-executionCitizen portalnearest-PHC routing · first aidDistrict dashboardrisk-coded spatial map
PLATE 04 — District telemetry feeds a forecasting layer that projects depletion curves; a Gemini 2.5 Flash agent turns projected shortfalls into a redistribution recommendation, which only ships after a district officer approves it. Citizens read the same live map through a separate, read-only portal.

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

MeasureValueSource
RecognitionTop 10 — Google GDG Build With AI Hackathoncompetition result
Architectureserverless FastAPI + Firestore, asia-south1Cloud Run deployment
Governancehuman-approval gate on every redistributionagent function-calling contract
Surfacesadmin dashboard + citizen emergency portaldual-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

Live demo ↗

API docs ↗

Repository ↗