Skip to content

About

Analysis of Hospital Admission Data Using SQL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Patient Admissions Analysis Using SQL

Project Overview

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.


Dataset Summary

Total Admissions

Metric Value
Total Patients 100

The hospital recorded 100 patient admissions during the study period.


Department Workload Analysis

Admissions by Department

Department Patients
Cardiology 19
Neurology 11
Oncology 11
Orthopedics 11
General Surgery 10
Dermatology 9
Endocrinology 9
Pulmonology 9
Pediatrics 8
Gynecology 3

Key Finding

Cardiology handled the largest number of admissions (19), making it the busiest department.

Gynecology had the lowest number of admissions.


Diagnosis Analysis

Most Common Diagnosis

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

Key Finding

Chronic diseases such as diabetes, hypertension, heart disease & thyroid disorders appear frequently, suggesting a substantial burden of long-term health conditions.


Emergency Admission Analysis

Metric Value
Emergency Admissions 41

Key Finding

41 of all admissions were emergencies.

This indicates that a significant portion of hospital resources must remain available for urgent patient care.


Patient Demographics

Average Age

Metric Value
Average Age 47.4 years

Elderly Patients

21 patients were over 60 years old.

Key Finding

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.


Length of Stay Analysis

Average Length of Stay

Metric Value
Average Stay 4.63 days

Key Finding

The average patient remained hospitalized for approximately 5 days.


Departments with Longest Average Stay

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

Key Finding

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.


Diagnoses with Longest Average Stay

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

Key Finding

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.


Business / Healthcare Insights

  1. Cardiology is the busiest department, handling nearly one-fifth of all admissions.

  2. Emergency admissions account for 41% of hospital activity, highlighting the importance of emergency preparedness.

  3. Older adults represent a significant patient population, especially in cardiovascular and neurological departments.

  4. Oncology consumes the greatest inpatient resources due to prolonged lengths of stay.

  5. Cancer, stroke, and heart attack cases require the longest hospitalization periods, making them important targets for capacity planning.


Tools Used

  • SQLite
  • SQL
  • VS Code
  • SQLite Viewer Extension

Skills

  • 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

Related Project

The analysis from this project was further developed into an interactive Excel dashboard.

➡️ Explore the Excel dashboard version here: Patient Admissions Analysis Using Excel

About

Analysis of Hospital Admission Data Using SQL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors