A SQL + Python analysis of CMS hospital readmission and mortality data, identifying which conditions, states, and hospitals carry the highest 30-day readmission risk — and where targeted intervention would have the most impact.
Author: Akansha Singh
Hospital readmissions within 30 days are costly and often preventable. CMS penalizes hospitals with excess readmissions, and health systems need to know:
- Which medical conditions carry the highest readmission risk?
- Is poor performance driven by hospital size/resources, or by care protocols?
- Which states and hospitals need the most urgent intervention?
- Do hospitals that save more lives also avoid readmissions — or are these independent measures of quality?
This project answers these questions using SQL for analysis and Python for visualization and reporting.
Source: CMS Hospital Readmissions & Deaths dataset
- 64,764 records
- 4,239 hospitals
- 54 US states/territories
- Measures: 30-day readmission and mortality rates across conditions including heart failure (HF), heart attack (AMI), pneumonia, COPD, hip/knee replacement, CABG, and stroke
| Metric | Value |
|---|---|
| National HF 30-day readmission rate | 21.96% — roughly 1 in 4.5 patients |
| Best-to-worst hospital gap (HF) | 16.3% – 31.3% (15-point spread) |
| Worst-performing state (HF) | DC — 23.24% |
| Hospital size effect on HF readmission | Negligible — all size groups within 0.13% of each other |
| Top chronic underperformer | Lakeland Regional Medical Center (FL) — worse than national on 7/7 measured conditions |
-
Heart failure carries the highest readmission risk of any condition. A 15-point gap between the best (16.3%) and worst (31.3%) hospitals points to a care-protocol problem, not disease complexity — the same condition is managed very differently across hospitals.
-
Hospital size does not predict performance. Small, medium, large, and very large hospitals all average within 0.13% of each other (21.88%–22.01%) on HF readmissions. Discharge planning and care coordination matter far more than facility size or resources.
-
Prestige doesn't guarantee performance. Methodist Hospital Houston (avg 7.72% across 5+ "better than national" measures) outperforms Mayo Clinic (10.84%) — readmission rates measure care coordination, not surgical excellence.
-
Geographic and chronic hotspots need targeted intervention. DC, NY, PR, AR, and FL lead in HF readmission rates. Lakeland Regional (FL), St Bernards (AR), and Florida Hospital Orlando perform worse than the national average on all 7 measured conditions — priority targets for transitional-care improvement.
-
Mortality and readmission are independent quality dimensions. Hospitals with the lowest readmission rates (Utah, Idaho, Montana — small, lower-acuity rural hospitals) still show mortality rates of 14–17%, so case mix must be controlled for when benchmarking.
- Standardize discharge planning and transitional-care protocols at chronic underperformers (Lakeland Regional, St Bernards, Florida Hospital Orlando) — the common gap is the discharge-to-follow-up handoff.
- Study high-performing, lower-profile hospitals (e.g., Methodist Hospital Houston) to identify transferable best practices independent of size or prestige.
- Prioritize state-level intervention programs in DC, NY, PR, AR, and KY, focused on post-discharge follow-up infrastructure and social determinants of readmission.
├── sql/
│ └── analysis.sql # 7 analysis queries with findings/commentary
├── export_csv.py # Exports query results from MySQL to data/*.csv
├── visualise.py # Generates the chart PNGs from data/*.csv
├── data/ # Query result CSVs used for charts & dashboard
├── charts/ # Matplotlib chart images
├── Healthcare_Analytics_Dashboard.xlsx # Interactive Excel dashboard (KPIs + charts + pivot-ready data)
└── Executive_Summary.pdf # 1-page executive summary
- Healthcare_Analytics_Dashboard.xlsx — Excel dashboard with KPI cards, 4 native charts, and a pivot-ready raw data table (17,950 rows).
- Executive_Summary.pdf — 1-page summary of KPIs, findings, and recommendations.
Readmission risk by condition
Top 10 worst states — HF readmission rate
Hospital size vs readmission rate
Chronic underperformers
- SQL (MySQL) — data aggregation and analysis (
sql/analysis.sql) - Python —
pandas,mysql.connector,matplotlibfor data export and visualization - Excel — interactive dashboard with native charts, KPI cards, and pivot-ready tables
- Load the CMS Hospital Readmissions & Deaths dataset into a MySQL table named
hospital_readmissions. - Run the queries in sql/analysis.sql to explore the analysis.
- Run
python export_csv.pyto export query results todata/. - Run
python visualise.pyto regenerate the charts incharts/.



