Database Management System Course Project
A comprehensive hospital management platform demonstrating relational database design, CRUD operations, and modern full-stack web development.
This is a college group project for the Database Management Systems (DBMS) course. The HDIMS application provides a complete inventory and patient management system for a hospital, showcasing practical implementation of database design principles including normalization, relationships, and data integrity.
Objective: Design and implement a relational database schema for hospital operations, then build an interactive management platform to demonstrate full CRUD functionality across multiple entities.
- ✅ Patient Management - Register, search, edit, delete patient records
- ✅ Appointment System - Schedule consultations, track status
- ✅ Room & Bed Management - Monitor availability, track admissions/discharges
- ✅ Doctor & Staff Directory - Employee records with department assignment
- ✅ Medicine Inventory - Stock tracking, expiry monitoring, low-stock alerts
- ✅ Billing System - Invoice generation, payment status tracking
- ✅ Supplier Management - Vendor records, purchase order tracking
- ✅ Prescription Records - Clinical documentation with medicine linkage
- ✅ Department Structure - Hospital organizational hierarchy
- Search - Full-text search across columns
- Sorting - Click headers for ascending/descending sort
- CRUD Operations:
- Create - Add new records via form
- Read - Display and search existing records
- Update - Edit record data in-place
- Delete - Remove records with confirmation
- Pagination - Configurable rows per page (5, 10, 20)
- Dashboard - Real-time KPI cards and operational metrics
DEPARTMENT
├─ dept_id (PK)
└─ dept_name
PATIENT
├─ patient_id (PK)
├─ first_name, last_name
├─ phone, email, address
└─ blood_group
ROOM
├─ room_id (PK)
├─ room_type
├─ capacity
└─ occupied_count
ROOM_ALLOCATION
├─ allocation_id (PK)
├─ patient_id (FK → PATIENT)
├─ room_id (FK → ROOM)
├─ admission_date
└─ discharge_date
EMPLOYEE
├─ emp_id (PK)
├─ name, role
├─ joining_date, salary
└─ dept_id (FK → DEPARTMENT)
DOCTOR
├─ doctor_id (FK → EMPLOYEE)
├─ specialization
└─ consultation_fee
APPOINTMENT
├─ appointment_id (PK)
├─ patient_id (FK → PATIENT)
├─ doctor_id (FK → DOCTOR)
├─ appointment_date, appointment_time
└─ status
MEDICINE
├─ medicine_id (PK)
├─ medicine_name, manufacturer
├─ price
├─ stock_quantity
└─ expiry_date
SUPPLIER
├─ supplier_id (PK)
├─ supplier_name
├─ phone
└─ address
MEDICINE_PURCHASE
├─ purchase_id (PK)
├─ supplier_id (FK → SUPPLIER)
├─ medicine_id (FK → MEDICINE)
├─ quantity
└─ purchase_date
BILL
├─ bill_id (PK)
├─ patient_id (FK → PATIENT)
├─ doctor_id (FK → DOCTOR)
├─ amount, bill_date
└─ payment_status
PRESCRIPTION
├─ prescription_id (PK)
├─ patient_id (FK → PATIENT)
├─ doctor_id (FK → DOCTOR)
├─ medicine_id (FK → MEDICINE)
├─ dosage, duration
└─ prescription_date
- One-to-Many: Department → Employee, Patient → Appointment, Room → Room_Allocation
- Many-to-Many: Medicine ↔ Purchase (via Medicine_Purchase), Patient ↔ Doctor (via Appointment)
- Foreign Keys: Enforce referential integrity across all child tables
- Normalization: 3NF applied to eliminate redundancy and anomalies
| Layer | Technology |
|---|---|
| Frontend | Next.js 14+, React, TypeScript |
| Styling | Tailwind CSS, Shadcn UI Components |
| Icons | Phosphor Icons |
| State Management | React Hooks (Client-side) |
| Build Tool | Node.js + npm |
hdims/
├── app/
│ ├── dashboard/ # KPI overview & insights
│ ├── patients/ # Patient CRUD
│ ├── appointments/ # Appointment scheduling
│ ├── rooms/ # Room & bed management
│ ├── doctors-staff/ # Employee directory
│ ├── departments/ # Department list
│ ├── medicine-inventory/ # Stock management
│ ├── suppliers-purchases/# Vendor & PO tracking
│ ├── billing/ # Invoice management
│ ├── reports/ # Prescription records
│ ├── search-records/ # Cross-entity search
│ └── layout.tsx
├── components/
│ ├── page-shell.tsx # Reusable page layout
│ ├── records-table.tsx # CRUD-enabled table component
│ ├── app-sidebar.tsx # Navigation
│ └── ui/ # Shadcn UI library
├── lib/
│ ├── hdims-dummy-data.ts # Sample dataset (10+ records per table)
│ └── utils.ts
└── public/
- Node.js 18.17 or higher
- npm or yarn
-
Clone/Extract Project
cd hdims -
Install Dependencies
npm install
-
Run Development Server
npm run dev
-
Open in Browser
- Navigate to
http://localhost:3000 - Automatically redirects to
/dashboard
- Navigate to
- Sidebar: Click any module (Patients, Appointments, etc.) to view/manage that entity
- Dashboard: High-level overview with 4 KPI cards and today's appointment queue
Create Record:
- Click "Add Record" button
- Fill form fields (required fields marked)
- ID auto-generated for tables
- Click "Save"
Read Records:
- View all records with key attributes
- Default: 10 rows per page
Update Record:
- Click "Edit" on any row
- Modify fields in side panel
- Click "Save"
Delete Record:
- Click "Delete" button
- Confirm deletion prompt
- Record removed from list
Search & Sort:
- Search Bar: Type to filter across all columns (real-time)
- Column Headers: Click to sort ascending/descending/off
Pagination:
- Change rows per page (5, 10, 20)
- Use Prev/Next buttons
- View current page number
Pre-loaded dummy data includes:
- 5 Patients with contact & medical details
- 4 Rooms with capacity tracking
- 5 Employees (doctors & nurses) with departments
- 4 Medicines with stock & expiry dates
- 3 Suppliers with contact info
- 12 Appointments with status flow
- 3 Bills with payment tracking
- Plus complete relationships for Prescriptions, Purchases, Room Allocations