The objective of this project was to analyze hospital admission data using SQL & generate insights related to patient demographics, department workload, emergency admissions & length of stay.
The dataset contains patient information including:
- Patient ID
- Age
- Gender
- Department
- Admission Type
- Diagnosis
- Admission Date
- Discharge Date
Patient-Admissions-Analysis-Using-SQL/
│
├── README.md
├── patient_admissions.csv
├── hospital.db
└── analysis.sql
SQLite was used to store and query the data.
| Metric | Value |
|---|---|
| Total Patients | 100 |
The hospital recorded 100 patient admissions during the study period.
| Department | Patients |
|---|---|
| Cardiology | 19 |
| Neurology | 11 |
| Oncology | 11 |
| Orthopedics | 11 |
| General Surgery | 10 |
| Dermatology | 9 |
| Endocrinology | 9 |
| Pulmonology | 9 |
| Pediatrics | 8 |
| Gynecology | 3 |
Cardiology handled the largest number of admissions (19), making it the busiest department.
Gynecology had the lowest number of admissions.
| Diagnosis | Cases |
|---|---|
| Diabetes | 5 |
| Thyroid Disorder | 4 |
| Stroke | 4 |
| Infection | 4 |
| Hypertension | 4 |
| Heart Failure | 4 |
| Heart Disease | 4 |
| Flu | 4 |
| Arrhythmia | 4 |
| Appendicitis | 4 |
Chronic diseases such as diabetes, hypertension, heart disease & thyroid disorders appear frequently, suggesting a substantial burden of long-term health conditions.
| Metric | Value |
|---|---|
| Emergency Admissions | 41 |
41 of all admissions were emergencies.
This indicates that a significant portion of hospital resources must remain available for urgent patient care.
| Metric | Value |
|---|---|
| Average Age | 47.4 years |
21 patients were over 60 years old.
A notable proportion of admissions involved older adults, particularly within Cardiology, Neurology & Oncology.
This suggests increased demand for chronic disease management and specialized care services.
| Metric | Value |
|---|---|
| Average Stay | 4.63 days |
The average patient remained hospitalized for approximately 5 days.
| Department | Average Stay (Days) |
|---|---|
| Oncology | 8.36 |
| Neurology | 6.27 |
| Cardiology | 6.00 |
| Pulmonology | 4.22 |
| General Surgery | 4.20 |
| Endocrinology | 3.78 |
| Orthopedics | 3.55 |
| Pediatrics | 2.50 |
| Dermatology | 1.33 |
| Gynecology | 1.00 |
Oncology patients had the longest average hospital stays.
This is expected because cancer treatment often requires intensive monitoring and extended care.
Neurology and Cardiology also showed relatively long hospital stays, reflecting the complexity of conditions such as stroke, seizures & heart disease.
| Diagnosis | Average Stay |
|---|---|
| Leukemia | 9.0 |
| Cancer | 9.0 |
| Lung Cancer | 8.5 |
| Breast Cancer | 8.0 |
| Stroke | 7.75 |
| Heart Attack | 7.67 |
| Tumor | 7.67 |
Cancer-related diagnoses were associated with the longest hospital stays.
Stroke and heart attack patients also required extended hospitalization, indicating greater resource utilization and patient care needs.
-
Cardiology is the busiest department, handling nearly one-fifth of all admissions.
-
Emergency admissions account for 41% of hospital activity, highlighting the importance of emergency preparedness.
-
Older adults represent a significant patient population, especially in cardiovascular and neurological departments.
-
Oncology consumes the greatest inpatient resources due to prolonged lengths of stay.
-
Cancer, stroke, and heart attack cases require the longest hospitalization periods, making them important targets for capacity planning.
- SQLite
- SQL
- VS Code
- SQLite Viewer Extension
- Database creation
- Data import from CSV
- SQL filtering
- Aggregation functions
- GROUP BY analysis
- ORDER BY ranking
- Healthcare data analysis
- Length-of-stay calculations
- Insight generation and reporting
The analysis from this project was further developed into an interactive Excel dashboard.
➡️ Explore the Excel dashboard version here: Patient Admissions Analysis Using Excel