0% found this document useful (0 votes)
3 views

Hospital Management System Report

The Hospital Management System (HMS) project report focuses on the Patient Management System, detailing its objectives, database schema, and functionalities such as stored procedures, triggers, and user roles. It emphasizes the importance of data integrity, security, and optimized performance in managing patient information and appointments. The report concludes that the system effectively meets healthcare management needs through its structured design and implementation.

Uploaded by

jannatimtiaz288
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Hospital Management System Report

The Hospital Management System (HMS) project report focuses on the Patient Management System, detailing its objectives, database schema, and functionalities such as stored procedures, triggers, and user roles. It emphasizes the importance of data integrity, security, and optimized performance in managing patient information and appointments. The report concludes that the system effectively meets healthcare management needs through its structured design and implementation.

Uploaded by

jannatimtiaz288
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Hospital Management System Project Report

Module: Patient Management System


Prepared by: Jannat Imtiaz
University: University of Management and Technology (UMT)
Course: IT

Table of Contents
1. Introduction
2. Objectives
3. ERD Representation
4. Database Schema with Integrity Constraints
5. Stored Procedures for DML Operations
6. User Roles and Privileges
7. Views for Data Access
8. DML Triggers
9. Usage of Indexes
10. DBA Roles and Responsibilities
11. Conclusion

1. Introduction
The Hospital Management System (HMS) is designed to streamline
healthcare processes by automating patient management.
The selected module focuses on managing patient details, doctor
assignments, appointments, and treatment records.
2. Objectives
- To create a robust database system for managing patient
information.
- To ensure data integrity, security, and optimized performance.
- To implement features like stored procedures, triggers, and views
for better functionality.
- To define and enforce database administration policies.

3. ERD Representation
The Entity-Relationship Diagram (ERD) for the Patient Management
System is as follows:
Entities:
- Patient: Stores patient information.
- Doctor: Stores doctor details.
- Appointment: Manages scheduling between patients and doctors.
- Treatment: Records diagnosis and prescriptions.
Relationships:
- Patient - Appointment: One-to-Many
- Doctor - Appointment: One-to-Many
- Appointment - Treatment: One-to-One

4. Database Schema with Integrity Constraints


Schema
- Patient Table:
CREATE TABLE Patient (
PatientID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(100) NOT NULL,
Age INT NOT NULL CHECK (Age > 0),
Gender ENUM('Male', 'Female', 'Other') NOT NULL,
Contact VARCHAR(15) UNIQUE NOT NULL,
Address TEXT,
MedicalHistory TEXT
);

- Doctor Table:
CREATE TABLE Doctor (
DoctorID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(100) NOT NULL,
Specialty VARCHAR(50),
Contact VARCHAR(15) UNIQUE NOT NULL,
Availability BOOLEAN DEFAULT TRUE
);

- Appointment Table:
CREATE TABLE Appointment (
AppointmentID INT PRIMARY KEY AUTO_INCREMENT,
PatientID INT NOT NULL,
DoctorID INT NOT NULL,
AppointmentDate DATE NOT NULL,
Time TIME NOT NULL,
Status ENUM('Scheduled', 'Completed', 'Cancelled') DEFAULT
'Scheduled',
FOREIGN KEY (PatientID) REFERENCES Patient(PatientID),
FOREIGN KEY (DoctorID) REFERENCES Doctor(DoctorID)
);

5. Stored Procedures for DML Operations


Example: Adding a New Patient
DELIMITER //
CREATE PROCEDURE sp_AddPatient (
IN pName VARCHAR(100),
IN pAge INT,
IN pGender ENUM('Male', 'Female', 'Other'),
IN pContact VARCHAR(15),
IN pAddress TEXT,
IN pMedicalHistory TEXT
)
BEGIN
INSERT INTO Patient (Name, Age, Gender, Contact, Address,
MedicalHistory)
VALUES (pName, pAge, pGender, pContact, pAddress,
pMedicalHistory);
END //
DELIMITER ;

6. User Roles and Privileges


Roles
1. Admin: Full access to the database.
2. Doctor: Access to their appointments and patient details.
3. Receptionist: Manage patient records and appointments.
Example SQL for User Creation
CREATE USER 'receptionist'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, UPDATE ON HospitalDB.* TO
'receptionist'@'localhost';

7. Views for Data Access


Example: Patient Details View
CREATE VIEW PatientDetails AS
SELECT
Patient.PatientID,
Patient.Name,
Appointment.AppointmentDate,
Appointment.Status
FROM
Patient
JOIN
Appointment ON Patient.PatientID = Appointment.PatientID;

8. DML Triggers
Example: Trigger for Updating Last Appointment Date
CREATE TRIGGER UpdateLastAppointment
AFTER INSERT ON Appointment
FOR EACH ROW
BEGIN
UPDATE Patient
SET LastAppointment = NEW.AppointmentDate
WHERE PatientID = NEW.PatientID;
END;

9. Usage of Indexes
Example: Adding Indexes for Faster Searches
CREATE INDEX idx_patient_name ON Patient(Name);
CREATE INDEX idx_appointment_date ON
Appointment(AppointmentDate);

10. DBA Roles and Responsibilities


i. DBA Policy and Standards
- Database Security: Implement user roles and encrypt sensitive
information.
- Data Quality Management: Regular audits and validation to prevent
data corruption.

ii. Roles and Responsibilities Matrix


Role Responsibilities Access Privileges
Admin DBA Manage schema, backups, and user roles Full
Access
Security DBA Enforce security policies and monitor access Manage
Users & Roles
Application DBA Optimize queries, maintain indexes, and views
SELECT, UPDATE, INSERT, DELETE

11. Conclusion
The Patient Management System module in the Hospital Management
System meets the requirements for managing patient records and
appointments efficiently. The implementation of stored procedures,
triggers, and views ensures data integrity, ease of access, and
security. This project demonstrates the importance of well-designed
database systems in healthcare.

You might also like