Conversational Healthcare Analytics
Ask questions about healthcare data in plain English and get instant answers, charts, and the exact query behind them — no technical skills required.
A web app that lets anyone explore healthcare data just by typing a question — like "How many patients were readmitted last quarter?" — and get back a real answer, a chart, and a transparent view of how that answer was reached. Instead of waiting on an analyst to pull the numbers, a business user gets a trustworthy result in seconds, with the work shown so it can be double-checked. It runs on a realistic dataset of 100,000 patient visits.
Problem
What It Solves
Getting answers out of healthcare data normally means knowing how to write database code and understanding how the data is organized — so everyday business questions get stuck waiting in a queue for a technical analyst. Tools that promise to fix this usually hide their work, handing you a number with no way to tell whether it's actually right. The goal here was to make the data answerable in plain English while keeping every answer transparent and trustworthy.
Solution
What I Built
I built an app that turns plain-English questions into database queries automatically. Familiar questions are answered from a library of pre-approved, hand-reviewed queries; anything new is handled by an AI model that writes the query on the fly. Before any query runs, the app checks it against the real structure of the data and rejects anything that doesn't fit — so you don't get made-up or misleading answers. Every result comes back with a chart, the exact query that produced it, and notes on any data-quality issues, so nothing is a black box.
Architecture
How It Works
- A deterministic generator (seed=42, stdlib only) produces ~640K rows of synthetic healthcare data — 100K encounters across 25K patients over 24 months — with deliberately injected data-quality flaws.
- dbt models the landing files into a star schema: 5 fact and 5 dimension tables, including SCD2 provider and department dimensions built from monthly snapshots.
- GitHub Actions (6 workflows) runs generation, validation, dbt build, and 175 tests, then publishes the DuckDB warehouse and dbt artifacts to Cloudflare R2.
- Questions route through a governed metrics registry of curated SQL first; unmatched questions fall back to an LLM behind a quota-guarded Cloudflare Worker.
- Generated SQL is validated against a schema mirror via EXPLAIN, executed read-only with timeouts, and rendered in Streamlit with charts, the SQL itself, and data-quality flags.
Skills
Skills Demonstrated
Data Modeling
- Star schema design
- SCD2 dimensions
- dbt models + tests
- Data quality engineering
AI / Automation
- Schema-grounded text-to-SQL
- SQL validation guardrails
- LLM cost + abuse controls
- Governed metrics registry
Cloud & CI
- Streamlit Cloud deployment
- Cloudflare Workers + R2
- GitHub Actions CI
- GitHub Pages dbt docs
Analytics App
- Streamlit UI
- DuckDB execution
- Plotly visualization
- 175 pytest tests
Experience
What I Learned
- How to use dbt artifacts as machine-readable schema context for an analytics application.
- How to make LLM-generated SQL safe with schema validation, read-only execution, and timeouts.
- How to package a data project so the warehouse, docs, app, and CI workflow tell one coherent story.
Roadmap