Case Study
Case Study
1. Abstract
The Hospital Management System (HMS) is a comprehensive
database system designed to automate the management of a
hospital's patient information, staff scheduling, medical records,
and billing. The primary goal is to streamline operations, enhance
data integrity, and improve the efficiency of hospital staff in
accessing patient data. This system incorporates several modules
such as patient records, doctor schedules, billing, pharmacy, and
more.
2. Introduction
The purpose of the Hospital Management System is to manage
hospital operations more effectively. With increasing numbers of
patients and healthcare needs, hospitals face challenges in managing
records, which can lead to errors. HMS ensures that all patient
records are stored, updated, and accessed with ease, reducing
redundancy and improving accuracy.
3. Project Description
This project involves designing a database that will handle the
hospital’s data, including patient information, doctor schedules,
prescriptions, and billing information. It aims to integrate all
aspects of hospital operations into one centralized system. The
project is developed using SQL and PL/SQL.
6. Schema Diagram
(A schema diagram defines how the tables are structured, including
primary and foreign keys, constraints, etc.)
7. Creating Commands
a. Create Table:
Example: Creating the Patient table
sql
sql
sql
SELECT COUNT(*) FROM Patient WHERE Admission_Date >=
'2023-09-01';
d. Cursor:
Example: Using a cursor to retrieve patient details for billing
purposes.
sql
DECLARE
CURSOR patient_cursor IS
SELECT Name, Total_Amount FROM Patient JOIN Billing ON
Patient.Patient_ID = Billing.Patient_ID;
BEGIN
FOR record IN patient_cursor LOOP
DBMS_OUTPUT.PUT_LINE('Patient: ' || record.Name || ' |
Total Bill: ' || record.Total_Amount);
END LOOP;
END;
e. View:
Example: Creating a view to show doctor schedules
sql
sql
sql