SQL analysis of disease burden and patient flow in a Kenya County Hospital ; querying 84,958 patient records to identify leading conditions, department workload, average length of stay, and clinical outcomes using DB Browser.
This project uses SQL to analyse patient records from a Kenya County Hospital,
exploring disease burden, patient flow, department workload, and clinical outcomes
between 2021 and 2023. The queries were written in DB Browser for SQLite and are
designed to answer real questions a hospital administrator or health data analyst
would ask on a daily basis.
This project complements my Python-based hospital analysis and demonstrates the
ability to extract meaningful insights directly from a relational database using
structured queries , without needing a programming language.
Dataset
Source: Simulated dataset inspired by Kenya Ministry of Health disease
surveillance reports and real clinical workflows observed during health records
attachments at Kiambu County Referral Hospital and Ruiru Sub-County Hospital
Period: January 2021 — December 2023
Rows: 84,958 patient records
Columns used in analysis:
ColumnDescriptionPatient_IDUnique identifier per patient visitYear / MonthTime period of the visitDiseaseDiagnosed conditionICD10_CodeInternational Classification of Diseases codeDepartmentHospital ward or clinicAge_GroupPatient age bracketGenderMale or FemaleVisit_TypeOutpatient or InpatientLength_of_Stay_DaysNumber of days spent at the facilityOutcomeTreated & Discharged, Referred, Admitted, DAMA, Deceased
Tools Used
DB Browser for SQLite
Dataset imported from CSV
Project Structure
kenya-hospital-sql/
kenya_hospital_data.csv # Dataset used for analysis
hospital_analysis.sql # All SQL queries with comments and findings
README.md # Project documentation
SQL Concepts Used
ConceptPurposeSELECTChoose which columns to displayCOUNTCount total rows or casesAVGCalculate average valuesROUNDClean up decimal placesGROUP BYGroup rows before aggregatingORDER BYSort results ascending or descendingWHEREFilter rows by a specific conditionANDCombine multiple filter conditions
Queries & Key Findings
Query 1 -Top Diseases by Total Cases
Mala …