Martina Castellucci · Lab

Lab · Healthcare data

Hospital KPIs

A year of admissions in a simulated hospital, with the SQL behind each indicator.

Admissions
Mean stay (days)
Bed occupancy
30-day readmissions

Admissions by month

Mean stay by ward

Red: occupancy above 90% or readmissions above 10%.

Method and data

The data are generated by a reproducible random model; no real patient, hospital or client is involved. Occupancy = inpatient days / (beds × 365). Readmission = a new inpatient stay within 30 days of discharge. The SQL refers to a simple star schema with one fact table (fact_admission) and one ward dimension (dim_ward).