Skip to content

Repository files navigation

🏥 Healthcare Database System

👨‍💻 Project Members

This SQL project was completed by the following members with equal efforts:


📖 Overview

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.


🗂️ Database Schema

Entities (Tables):

  • Patients
  • Departments
  • Doctors
  • Appointments
  • MedicalRecords
  • Medications
  • Prescriptions
  • Billing

🔄 CRUD Operations

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

📊 Analytical Queries

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

🧹 Normalization

✅ First Normal Form (1NF):

  • Atomic values only; no lists or sets stored in fields

✅ Second Normal Form (2NF):

  • Removed partial dependencies using single-column primary keys

✅ Third Normal Form (3NF):

  • Removed transitive dependencies

🛠 Development Tools

  • FastAPI and SQLAlchemy
  • SQLite (the API creates api/hospital.db automatically)
  • PowerPoint (for ER Diagram)

▶️ How to Use

  1. Create and activate a virtual environment (optional but recommended): python -m venv .venv
  2. Install the API dependencies: python -m pip install -r requirements.txt
  3. Start the API from the repository root: python -m uvicorn api.main:app --reload
  4. Open http://127.0.0.1:8000/docs for 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.


🧬 ER Diagram

A visual ER diagram is included in the file:
📄 Healthcare_Database_System.pptx


About

This project implements a centralized Healthcare Database System using SQL to manage hospital operations efficiently.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages