Hms Rdbms Project Reportprint
Hms Rdbms Project Reportprint
BACHELOR OF TECHNOLOGY
In Computers Science and Engineering
2023-2027
By
Kushagra Gupta
(23FE10CSE00614)
And
Shashank Shekhar
(23FE10CSE00825)
In a hospital, managing data is an integral part of ensuring the smooth operation of various processes.
From maintaining accurate patient records to scheduling doctor appointments, prescribing treatments,
and handling billing, every aspect of hospital management relies heavily on well-organized
information. However, the sheer volume of data in a healthcare facility makes manual or fragmented
systems prone to errors, inefficiencies, and operational bottlenecks.
A hospital typically deals with large-scale data management challenges, such as:
• Keeping track of thousands of patients and their personal and medical details.
• Managing the schedules of multiple doctors while preventing overlapping appointments.
• Recording prescriptions and medical history for each patient.
• Handling billing processes for various services while ensuring accuracy.
To address these problems, the Hospital Management System (HMS) database was designed. It
provides a structured and centralized solution for managing large volumes of hospital data. The HMS
database leverages relational database principles to establish clear relationships between entities like
patients, doctors, appointments, prescriptions, and billing. Using constraints, triggers, and integrity
checks, the system ensures:
• Accurate and consistent data storage.
• Prevention of scheduling conflicts for doctors and appointments.
• Streamlined processes for handling prescriptions and billing.
While designing the database, certain challenges were encountered, including the enforcement of
business logic (e.g., ensuring no doctor has overlapping appointments), handling the scalability of
large hospital datasets, and maintaining relationships across multiple interconnected tables. These
challenges were addressed by applying advanced database concepts like foreign key constraints,
composite keys, and automated triggers to enforce rules and ensure data integrity.
This report provides an in-depth exploration of the HMS database, detailing its design,
implementation, and testing. It highlights how the system simplifies hospital management, ensuring
efficiency, accuracy, and better patient care, even in large-scale healthcare environments
Motivation
Managing healthcare data efficiently is critical for hospitals to provide quality services while
minimizing errors and delays. However, traditional methods, such as manual record-keeping or poorly
integrated systems, often result in:
• Data mismanagement: Errors in patient records, lost information, and difficulty in retrieving
data.
• Scheduling conflicts: Overlapping appointments or inefficiencies in doctor and patient
scheduling.
• Lack of integration: Disconnected records for billing, medical history, and prescriptions
hinder smooth operations.
• Inefficient processes: Time-consuming manual workflows that increase administrative
workload.
The motivation to create the Hospital Management System (HMS) database stems from the need to
address these challenges. The HMS database was designed to:
By providing a robust solution, the HMS database simplifies hospital management and supports better
decision-making for healthcare professionals.
Project Objectives
The Hospital Management System (HMS) database project focuses on addressing the practical
challenges faced by hospitals in managing large amounts of data. The key objectives are:
1. Centralized Data Management
o Provide a unified database to manage patient records, doctor schedules, appointments,
prescriptions, billing, and medical history efficiently.
2. Error-Free Appointment Scheduling
o Ensure that appointments are scheduled without conflicts, so no doctor is double-
booked at the same time.
o Allow different doctors to have simultaneous appointments for their respective
patients.
3. Efficient Prescription and Billing Handling
o Maintain detailed records of prescriptions linked to each appointment, ensuring
accurate and traceable treatment history.
o Generate clear, error-free billing records for services provided, improving operational
efficiency.
4. Comprehensive Medical History Management
o Record and organize patient medical histories, including conditions, surgeries, and
medications, for easy reference during consultations or treatments.
5. Scalability for Large Data Volumes
o Handle the large volume of data generated daily by a hospital, including patient visits,
doctor schedules, and billing transactions, without impacting performance.
6. Streamlined Workflow and Coordination
o Improve coordination between departments by linking patient records, doctor
schedules, and billing in an integrated system.
By meeting these objectives, the HMS database simplifies hospital operations, reduces errors, and
enhances the overall patient experience through efficient and reliable management.
4o
METHODOLOGY
Planning of work –
The planning of work for the Hospital Management System (HMS) database project was carried out
in phases to ensure systematic progress and meet deadlines. The phases were organized to handle
each aspect of the project effectively, with clear milestones and deliverables at each step.
The work was planned as follows:
o Objective: Create a relational database schema that meets the gathered requirements.
o Tasks:
▪ Design the Entity-Relationship (ER) diagram.
▪ Convert the ER diagram into a relational schema (tables, keys, relationships).
▪ Normalize the database to reduce redundancy and ensure data integrity.
▪ Define constraints (e.g., foreign keys, unique constraints, and check
constraints).
3. Phase 3: Implementation
o Objective: Ensure that the database functions as expected and meets all requirements.
o Tasks:
▪ Execute a variety of test cases to check for errors, conflicts (e.g., overlapping
appointments), and data integrity issues.
▪ Perform functional testing on key features such as appointment scheduling,
prescription management, and billing.
▪ Validate performance with large datasets to check scalability.
o Objective: Provide clear documentation for the system, including a detailed report of
the design and implementation.
o Tasks:
▪ Document the database schema, including tables, relationships, constraints,
and triggers.
▪ Prepare a report summarizing the project, including methodology, objectives,
challenges, and solutions.
7
Constraints
1. PRIMARY KEY:
• doctor_id (Doctor table)
• patient_id (Patient table)
• history_id (MedicalHistory table)
• appointment_id (Appointment table)
• schedule_id (Schedule table)
• billing_id (Billing table)
• prescription_id (Prescription table)
2. NOT NULL:
• doctor_id, email, name, gender, phone_number, address (Doctor table)
• patient_id, email, name, gender, phone_number, address (Patient table)
• patient_id, conditions, surgeries, medications, date (MedicalHistory table)
• doctor_id, patient_id, date, starttime, endtime (Appointment table)
• doctor_id, day_of_week, starttime, endtime (Schedule table)
• appointment_id, amount (Billing table)
• appointment_id, doctor_id, medication, dosage, instructions (Prescription table)
3. UNIQUE:
• email (Doctor, Patient tables)
• phone_number (Doctor, Patient tables)
• (doctor_id, date, starttime, endtime) (Appointment table)
4. FOREIGN KEY:
• patient_id (MedicalHistory table referencing Patient)
• doctor_id, patient_id (Appointment table referencing Doctor and Patient)
• doctor_id (Schedule table referencing Doctor)
• appointment_id (Billing table referencing Appointment)
• appointment_id, doctor_id (Prescription table referencing Appointment and Doctor)
5. CHECK:
• starttime < endtime (Appointment table)
6. ON DELETE CASCADE:
• MedicalHistory, Appointment, Schedule, Billing, and Prescription tables for relevant
foreign keys.
8
Schema
1. Doctor Table:
2. Patient Table
3. MedicalHistory Table
4. Appointment Table
5. Schedule Table
6. Billing Table
7. Prescription Table
DESC Doctor;
2. Patient Table
Query for creating table and inserting records
DESC patient;
3. MedicalHistory Table
Query for creating table and inserting records
DESC MedicalHistory;
4. Appointment Table
Query for creating table and inserting records
DESC appointment;
5. Schedule Table
- Query for creating table and inserting records
DESC schedule;
6. Billing Table
Query for creating table and inserting records
DESC billing;
7. Prescription Table
Query for creating table and inserting records
DESC prescription;
FACILITIES REQUIRED FOR PROPOSED WORK
Hardware Used:
Software Used:
Book(s):
1. R. Elmasri, S. B. Navathe, “Fundamentals of Database Systems”, Addison &
Wesley, 7th Edition, 2016
Course(s):
1. Database Programming with SQL (Oracle Academy)
Link(s):
1. https://www.w3schools.com/sql/
2. https://www.geeksforgeeks.org/introduction-of-er-model/
3. https://app.diagrams.net/