Misan
Data Analyst with 4+ years of commercial experience in data analytics, cloud technologies, and automation, holding a master’s degree in Data Science from Technological University Dublin.
Skilled in Python, SQL, R, Tableau, Power BI, and Advanced Statistical Modeling.
As a healthcare data analyst, the goal of this project is to explore the impact of HbA1c measurements on hospital readmission rates. This analysis is based on the dataset “Diabetes 130-US Hospitals for Years 1999-2008,” provided by Clore et al. (2014), which aggregates clinical records from 130 hospitals across the United States. Patients discharged to home are the focus of this analysis, as they represent the largest discharge group in the dataset, accounting for 60,234 encounters (approximately 59.2% of all cases). This makes them a significant population to analyze for identifying patterns and predicting readmissions. The objective is to:
The dataset, “Diabetes 130-US Hospitals for Years 1999-2008,” was obtained from the UCI Machine Learning Repository. This dataset represents ten years of clinical care data from 130 US hospitals, featuring 101,766 patient records and 47 attributes.
This dataset provides a robust foundation for analyzing diabetes management and its impact on hospital readmissions.
Our analysis of 60,234 patient encounters discharged to home highlights critical insights into HbA1c testing and readmission trends:
Addressing these gaps by expanding HbA1c testing, targeting interventions for high-risk groups, and enhancing post-discharge support will improve outcomes and reduce readmission rates.
What This Means: Understanding how often HbA1c tests are conducted for home-discharged patients can highlight gaps in current testing protocols.
SELECT
COUNT(*) AS total_encounters,
SUM(CASE WHEN A1Cresult != 'None' THEN 1 ELSE 0 END) AS measured_encounters,
ROUND((SUM(CASE WHEN A1Cresult != 'None' THEN 1 ELSE 0 END) * 100.0 / COUNT(*)), 2) AS percent_measured
FROM health
WHERE discharge_disposition_id = 1;
Insight: Among the 60,234 home-discharged encounters, only 10,733 (17.82%) included HbA1c testing, highlighting a significant gap in testing:
This insight reinforces the need for testing protocols to close this gap and improve overall patient outcomes.
What This Means: Correlating HbA1c testing with readmission rates helps determine its effectiveness as a predictive tool for this discharge group.
SELECT
A1Cresult,
COUNT(*) AS total,
SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) AS readmitted_within_30_days,
ROUND((SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) * 100.0 / COUNT(*)), 2) AS readmission_rate
FROM health
WHERE discharge_disposition_id = 1
GROUP BY A1Cresult;
Insight: The analysis reveals distinct readmission patterns:
What This Means for Stakeholders:
The data emphasizes the importance of systematic HbA1c testing. Patients who undergo testing and have normal or elevated results show better managed outcomes compared to those who were not tested.
Actionable Steps: Focus on increasing HbA1c testing for patients discharged to home and providing targeted interventions for those with elevated levels to further reduce readmissions. This underscores the importance of systematic HbA1c monitoring to manage diabetes effectively and reduce hospital returns.
What This Means: This query examines demographic factors like gender, race, and age for patients discharged to home to identify high-risk subgroups.
SELECT
gender,
race,
age,
COUNT(*) AS total_patients,
SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) AS total_readmitted,
ROUND(SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS readmission_rate
from health
JOIN demographics ON health.patient_nbr = demographics.patient_nbr
WHERE discharge_disposition_id = 1
GROUP BY gender, race, age
ORDER BY readmission_rate DESC;
Insight: Key findings include:
These results suggest a need for tailored interventions focusing on elderly and racially diverse populations, particularly African Americans and Hispanics, to reduce readmission risks. These trends suggest a need for targeted interventions, including tailored follow-up care and support.
What This Means: This analysis examines differences in readmission rates between genders for patients discharged to home. The goal is to identify patterns that can guide targeted interventions.
WITH home_discharged AS (
-- Step 1: Filter for patients discharged to home
SELECT
gender,
readmitted
FROM health
JOIN demographics ON health.patient_nbr = demographics.patient_nbr
WHERE discharge_disposition_id = 1
),
readmission_summary AS (
-- Step 2: Summarize readmission rates by gender
SELECT
gender,
COUNT(*) AS total_patients,
SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) AS total_readmissions,
ROUND(SUM(CASE WHEN readmitted = '<30' THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS readmission_rate
FROM home_discharged
GROUP BY gender
)
-- Final Query: Retrieve and order results
SELECT *
FROM readmission_summary
ORDER BY readmission_rate DESC;
Insight: The analysis revealed the following patterns:
These findings suggest that while the difference in readmission rates between genders is marginal, male patients may benefit from additional post-discharge support to address slightly elevated risks.

View the interactive Tableau dashboard here:
Visualizing HbA1c Testing and Readmissions
This dashboard highlights key insights, including testing gaps, demographic risks, and the relationship between HbA1c testing and readmission rates.
Based on the findings:
This analysis emphasizes the importance of HbA1c testing for patients discharged to home, showcasing its potential to reduce readmissions and improve patient outcomes. By focusing on high-risk subgroups, healthcare institutions can enhance care quality and operational efficiency.
Clore, John, et al. “Diabetes 130-US Hospitals for Years 1999-2008.” UCI Machine Learning Repository, 2014, https://doi.org/10.24432/C5230J.