Diabetes Hospital Encounter Analysis: Medication Usage Trends, Readmission Patterns, and Demographic Insights
This Excel-based data analysis project explores inpatient encounters involving diabetic patients to uncover patterns across three key areas: medication usage trends, readmission rates by age group, and demographic distributions. The objective was to analyze how frequently specific medications were prescribed and whether their dosages were increased, decreased, or maintained; to examine how readmission rates vary across age groups; and to understand the gender distribution within different age categories.
In analyzing medication usage, the focus was on the frequency of each drug being marked as "steady," "up," or "down" across all hospital encounters, rather than by patient. Since multiple medications may be administered during a single encounter, the resulting chart reflects medication usage trends across all encounters, offering a broad view of prescribing behaviors over the 10-year period. These insights aim to support clinical decision-making, reveal demographic disparities, and enhance understanding of treatment patterns within diabetic care.
Source: 10 Years Diabetes Dataset from Kaggle
Filename: diabetes.csv
Description: Contains inpatient data of diabetic patients over a 10-year period (1999β2008) of clinical care at 130 US hospitals.
Microsoft Excel was the only tool used in this project for:
- Data cleaning
- Data transformation
- Pivot table creation
- Slicer setup for interactive filtering
- Data visualization (bar charts, pivot charts)
- Report formatting
I performed the following data preparation steps:
- Data inspection
- Data cleaning and formatting
- Converting the data to an Excel Table for dynamic referencing
- Creating a new summary table that aggregates usage trends for each drug
Note on Rare Medications:
The dataset contains two medications: Examide and Citoglipton, which appear to be placeholders. These drugs were retained in the raw and edited datasets for completeness but were excluded from charts and visual analysis due to their negligible or zero usage. This helps ensure that the visualizations reflect more meaningful and clinically relevant trends.
Some guiding questions for Exploratory Data Analysis included:
- What is the gender distribution of the patients across age groups?
- What are the readmission rates by age group?
- What is the overall distribution of medication usage trends (steady, up, down) for each prescribed medication?
- Which medications were most frequently administered or had changes in dosage across hospital encounters?
1. Gender Distribution by Age Group

2. Readmission Rates by Age Group

3. Medication Usage Trends Across Hospital Encounters

The dataset was analyzed using Excel through pivot tables, formulas, and interactive slicers. Three key visualizations were created to answer core questions. Bar charts were plotted:
- Showing gender distribution across age groups.
- Displaying readmission rates segmented by age group.
- Visualizing how often medications were prescribed with dosages increased, decreased, or maintained across hospital encounters.
Interactive elements like slicers were incorporated to allow dynamic filtering of the medication usage data, enhancing interpretability.
Key Insights Drawn from the Analysis:
-
Gender Distribution by Age Group
Female patients mostly outnumbered male patients across all age groups, with the 70β80 age range showing the highest female representation. Conversely, younger age groups (e.g 0β10, 10β20) had lower representation overall, which may reflect fewer hospital admissions for diabetes among younger population. -
Readmission Rates by Age Group
The 70β80 age group had the highest number of both readmitted and non-readmitted patients, likely due to having the largest total number of encounters.
Meanwhile, younger age groups (e.g 0β10, 10β20) showed lower readmission rates, which may reflect both better health outcomes and a smaller number of total patients in those categories β meaning the lower readmission might not solely indicate better care or outcomes. -
Medication Usage Trends Across Hospital Encounters
Among the tracked prescribed medications, most drugs were maintained ("steady") during hospital encounters. Only a minority showed dosage increases or decreases.
Medications such as Metformin and Insulin were among the most commonly used, while medications such as Acetohexamide, Glimepiride + Pioglitazone, etc., were rarely prescribed. Examide and Citoglipton, which appear to be placeholders, were excluded from visual charts to avoid distorting trends.