This SQL project was completed by the following members with equal efforts:
This project implements a centralized Healthcare Database System using SQL to manage hospital operations efficiently. It aims to eliminate manual errors and streamline processes like appointments, billing, prescriptions, and medical record management.
PatientsDepartmentsDoctorsAppointmentsMedicalRecordsMedicationsPrescriptionsBilling
Examples:
- SELECT: View patients, doctors, and billing info
- INSERT: Add new patients, doctors, medications, appointments
- UPDATE: Modify contact info, appointment status, or assigned doctors
- DELETE: Remove billing or prescription records
Useful reports:
- Total patients and appointments by status
- Billing summaries by payment status
- Doctors who treated patients (and those who didn't)
- Patients without billing
- Department-wise doctor count
- Appointments scheduled in the next 5 days
- Atomic values only; no lists or sets stored in fields
- Removed partial dependencies using single-column primary keys
- Removed transitive dependencies
- FastAPI and SQLAlchemy
- SQLite (the API creates
api/hospital.dbautomatically) - PowerPoint (for ER Diagram)
- Create and activate a virtual environment (optional but recommended):
python -m venv .venv - Install the API dependencies:
python -m pip install -r requirements.txt - Start the API from the repository root:
python -m uvicorn api.main:app --reload - Open
http://127.0.0.1:8000/docsfor the interactive API documentation.
The REST API uses SQLite only; no Oracle client or python-oracledb connection is required. It includes CRUD endpoints for all eight entities, plus reporting endpoints under /reports.
A visual ER diagram is included in the file:
📄 Healthcare_Database_System.pptx