Normalized relational database with advanced SQL analytics demonstrating database design, complex queries, and healthcare data management
This project showcases database design and SQL query optimization for healthcare data management. Built with SQLite, it includes patient management, appointment scheduling, billing systems, and treatment tracking with proper normalization and referential integrity.
| Table | Records | Description |
|---|---|---|
| departments | 7 | Hospital organizational structure (Cardiology, Emergency, Pediatrics, etc.) |
| doctors | 15 | Physician information, including specialty and contact details |
| docinfo | 15 | Extended doctor credentials, licenses, and education history |
| salary | 38 | Compensation records with historical tracking |
| patients | 45 | Patient demographics, insurance, and health status |
| appointments | 43 | Scheduling with status tracking (Completed, Cancelled, No-Show) |
| treatments | 15 | Medical procedures (ECG, MRI, Surgery, etc.) |
| prescriptions | 10 | Medication records with dosage and frequency |
| billing | 39 | Financial transactions (Paid: 75%, Pending: 15%, Overdue: 10%) |
| rooms | 10 | Facility management and bed assignments |
Complete database structure showing all tables and columns
Which doctors have the highest patient loads and revenue generation for capacity planning?
Dr. Williams (Orthopedics) generates the highest revenue ($41,200) with surgical procedures, while Dr. Johnson (Pediatrics) maintains the highest patient volume with lower per-visit costs, revealing different specialization models.
What's the distribution of patient health statuses and their appointment completion rates?
Critical patients show 100% appointment completion, while Stable patients and Recovering Patients have 94.12% and 93.75% completion rates, respectively, suggesting higher engagement when health stakes are perceived as higher.
Which departments should receive investment based on revenue performance and collection efficiency?
Orthopedics leads with $12,600 revenue and a 100% collection rate, while Oncology shows $20,600 revenue but only a 66.5% collection rate, indicating a need for improved billing processes.
Who are the highest-spending patients and what treatments drive their costs?
The Top patient in Oncology spent $19,400 over 4 appointments with chemotherapy, while an Orthopedic patient spent $12,050 on surgical procedures, revealing different care models and financial planning needs.
This database supports critical healthcare operations including:
Track demographics, medical history, and care continuity across multiple visits and providers
Optimize doctor availability, reduce no-shows, and improve patient flow
Monitor revenue, track receivables, and analyze profitability by department
Identify capacity constraints, workload imbalances, and hiring needs
Analyze appointment completion rates and patient engagement patterns
Guide department investment and expansion decisions based on data
This SQL database project complements my healthcare analytics work: