Sunteți pe pagina 1din 16

Analysis and Design of

Data Systems
[Type the document subtitle]
xyz
[Pick the date]

Data Modelling and Design 1


Contents

Introduction................................................................................................................................3
Case Study and the Design.........................................................................................................3
UML Use Case Diagram........................................................................................................6
Activity Diagram....................................................................................................................7
Sequence Diagram...............................................................................................................10
Class Diagram......................................................................................................................12
State Machine Diagram........................................................................................................13
Conclusion...............................................................................................................................15
References................................................................................................................................16

Data Modelling and Design 2


Introduction

This report is about the Hospital Management System for The Royal Rundle Hospital
which is a multi-speciality hospital. The RRH includes a number of departments, rooms,
doctors, nurses, compounders, and other staff working in the hospital. Patients having
different kinds of ailments come to the hospital and get check-up done from the relevant
doctors. If required they are admitted in the hospital and discharged after treatment. The
hospital maintains the records of various departments, rooms, and doctors in the hospital
besides the most important records of the regular patients, patients admitted in the hospital,
the check-up of patients done by the doctors, the patients that have been operated, and
patients discharged from the hospital. So we have done the requirement analysis using UML
tools like UML use case diagram, activity diagram, sequence diagram, class diagram and
state machine diagram to prepare this article for the proposed system.

Case Study and the Design

In this part of the document we will design the proposed system for Hospital

Management System for RRH.

The hospital management system for the RRH is proposed to steer the day to day

activity in the hospital; i.e. any registration of patients in OPD for various type of ailments,

then after diagnosis he could be referred to treatment in various departments like Orthopedic,

Pathology, Emergency, Dental, Gynecology, Anesthetics, I.C.U., Blood Bank, Operation

Theater, Laboratory, M.R.I., Neurology, Cardiology, Cancer Department, Corpse, etc., Bill

payments will be done before admission to one of the department, then admission, then after

treatment discharge bills to be paid, staff management and many other related transactions

would be performed by using the proposed system.

To develop the new system we propose some points which would be considered

during the development:

Data Modelling and Design 3


 Department Management: there are various departments in RRH which will be

managed by this module

 Staff Management: there could be doctors, nurses and other staff which will be

managed by this module.

 Patient Management: there will be out-patients in OPD which could be transferred

to any department as in-patients for treatment or surgery. This will be managed by

this module.

 Accounting Management: All the bills of OPD, before admission bills, discharge

bills or any other bills will be handled by this module.

 Users Management: All the logins into the RRH hospital management system will

be managed by this module.

After doing rigorous system analysis we have identified some of the entities and

attributes for the proposed HMS, which are listed as below:

 Departments: All the details of any existing or new department of RRH will be

stored in this entity; the attributes, keys and other details are as follows:

Field Type Details Key


DepartmentID Int Unique identification of the Primary

department Key
Name String
HOD String
Description String
Location String

 Staffs: All the details of doctors, nurses and any other staff of RRH will be stored in

this entity; the attributes, keys and other details are as follows:

Field Type Details Key


StaffID Int Unique identification of the Primary Key

staff
Name String

Data Modelling and Design 4


Address String
StaffTypeID Int Primary Key of Staff Type Foreign Key

lookup
Speciality String
DepartmentID Int Primary Key of Department Foreign Key
ContactNo Int

 Rooms: All the details of existing and new rooms of RRH will be stored in this entity;

the attributes, keys and other details are as follows:

Field Type Details Key


RoomID Int Unique identification of the Primary Key

room
Description String
RoomTypeID Int Primary Key of Room Type Foreign Key

lookup
DoctorID Int Primary Key of Staffs Foreign Key
NurseID Int Primary Key of Staffs Foreign Key
OtherStaffID Int Primary Key of Staffs Foreign Key
RoomNo Int
RoomCharges Number(10,2)
IsAvailable Char(1) Y or N will be stored

 Patients: All the details of patients of RRH will be stored in this entity; the attributes,

keys and other details are as follows:

Field Type Details Key


PatientID Int Unique identification of the Primary Key

Patient
Name String
StaffID Int Primary Key of Staff Foreign Key
PatientTypeID Int Primary Key of Patient Foreign Key

Type lookup
OldPatientTyp Int Primary Key of Patient Foreign Key

eID Type lookup


DateOfBirth Date
RoomID Int Primary Key of Rooms Foreign Key
ContactNo Int
PatientStatusI Int Primary Key of Patient Foreign Key

Data Modelling and Design 5


D Status lookup

 Diagnoses: Whenever a patient is given any diagnosis, all its details will be stored in

this entity; the attributes, keys and other details are as follows:

Field Type Details Key


DiagnosisID Int Unique identification for the Primary Key

facility
Description String
PrscriptionList String
StartDate Date
EndDate Date
PatientID Int Primary Key of Patients Foreign Key
RoomID Int Primary Key of Rooms Foreign Key
StaffID Int Primary Key of Staffs Foreign Key

 Bills:  Whenever a new bill is added in the system, all its details will be stored in this

entity; the attributes, keys and other details are as follows.

Field Type Details Key


BillId String Unique identification for any Primary key

member
BillHeadID Int Primary Key of Patient Status Foreign Key

lookup
Password String
Name String
StaffID Int Primary Key of Staffs Foreign Key
DateOfBirth Date
IsActive String Y or N

 Users:  Whenever a new user is added in the system, all its details will be stored in

this entity; the attributes, keys and other details are as follows.

Field Type Details Key


UserId String Unique identification for any Primary key

member
Password String
Name String
StaffID Int Primary Key of Staffs Foreign Key

Data Modelling and Design 6


DateOfBirth Date
IsActive String Y or N

UML Use Case Diagram

Ideally there should be following primary actors in the proposed system:

 Admin: This user will be responsible for maintaining whole system, especially user

management and department management module.

 Staff: This user will be responsible for using the staff management, accounts

management and patient management module of RRH HMS.

We have identified many use cases in the proposed system; some of which are listed as

below:

 Add/Modify/Delete of any existing or new user.

 Add/Modify/Delete of any existing or new department.

 Add/Modify/Delete of any existing or new staff.

 Add/Modify/Delete of any existing or new room.

 Add/Modify/Delete of any lookup value like Room Type, Bill Head, Patient Type,

Patient Status etc.

 Add/Modify/Delete of any new patient registration.

 Add/Modify/Delete of any existing or new diagnosis of specific patient.

 Transfer patient’s case to specific department if required after diagnosis.

 All bill generation activity.

 Any reporting activity for MIS purpose or part of existing process.

Data Modelling and Design 7


Class Diagram

Some major classes of many classes from the proposed system are as follows:

 Department: All the department related activities will be done from this class.

 Room: All activities related to rooms will be managed by using this class.

 Staff: All activities related to staffs will be managed by using this class.

 Patient: all the accounts related to staff like doctor, nurse, or other staff will be

managed by using this class.

 Diagnosis: All the diagnosis transactions will be managed in this class.

 Bill: All bills related to OPD, Patient’s diagnosis or any other charges will be

managed in this class.

 PatientType:  This will contain all the patient types like OPD, IN_Patient, Other.

 RoomType: This will contain all the room types like Private, General, OPD Room

etc.

 StaffType: This will contain all the staff types like Doctor, Nurse, Compounder,

Receptionist etc.

Data Modelling and Design 8


 BillHead: This will contain all the bill heads like Consulting charges, admission

charges, room charges, registration charges etc.

 BillStatus: This will contain all the bill statuses like Paid, Raised, Patially Paid, etc.

 PatientStatus: This will contain all the patient statuses like OPD, Admitted,

Discharged, etc.

 User: All the users of the proposed system will be managed by using this class.

Data Modelling and Design 9


Conclusion

In this document, a hospital management system in RRH has been proposed and it has

the ability to manage resources of the hospital through properties of automatic system. After

considering all the requirements, we could conclude that the proposed system is very

important aspect of any hospital in current scenario. It helps in fast-tracking all day-to-day

activities and smooth functioning of the users. Building this software is a golden opportunity

to create the distinct, efficient and fast delivering medicare model. Implementation of hospital

management system project helps to store all the kinds of records, provide coordination and

user communication, implement policies, improve day-to-day operations, arrange the supply

chain, manage financial and human resources, and market hospital services. This beneficial

decision covers the needs of the patients, staff and hospital authorities and simplifies their

interactions. It has become the usual approach to manage the hospital. Many clinics have

already experienced its advantages and continue developing new hospital management

system project modules.

Data Modelling and Design 10


References

http://www.programsformca.com/2012/03/uml-diagrams-library-mgmt-system.html

Data Modelling and Design 11


Appendices

Create Database HospitalDB;

CREATE TABLE PatientTypes(


PatientTypeID NUMBER NOT NULL,
PatientType VARCHAR2(50) NOT NULL,
PRIMARY KEY(PatientTypeID)
);

CREATE TABLE RoomTypes(


RoomTypeID NUMBER NOT NULL,
RoomType VARCHAR2(25) NOT NULL,
PRIMARY KEY(RoomTypeID)
);

CREATE TABLE StaffTypes(


StaffTypeID NUMBER NOT NULL,
StaffType VARCHAR2(50) NOT NULL,
PRIMARY KEY(StaffTypeID)
);

CREATE TABLE BillStatus(


BillStatusID NUMBER NOT NULL,
BillStatus VARCHAR2(50) NOT NULL,
PRIMARY KEY(BillStatusID)
);

CREATE TABLE PatientStatus(


PatientStatusID NUMBER NOT NULL,
PatientStatus VARCHAR2(50) NOT NULL,
PRIMARY KEY(PatientStatusID)
);

CREATE TABLE BillHeads(


BillHeadID NUMBER NOT NULL,
BillHead VARCHAR2(100) NOT NULL,
PRIMARY KEY(BillHeadID)
);

CREATE TABLE Departments(


DepartmentID NUMBER NOT NULL,
NameOfDepartment VARCHAR2(100) NOT NULL,
HOD VARCHAR2(100) NOT NULL,
Description VARCHAR2(255) NOT NULL,
Location VARCHAR2(100) NOT NULL,
PRIMARY KEY(DepartmentID)
);

Data Modelling and Design 12


CREATE TABLE Staffs(
StaffID NUMBER NOT NULL,
Name VARCHAR2(100) NOT NULL,
Address VARCHAR2(255) NULL,
StaffTypeID Number NOT NULL,
Speciality VARCHAR2(100) NULL,
DepartmentID NUMBER NULL,
ContactNo VARCHAR2(100) NULL,
PRIMARY KEY(StaffID)
);

CREATE TABLE Rooms(


RoomID NUMBER NOT NULL,
Description VARCHAR2(100) NOT NULL,
RoomTypeID NUMBER NOT NULL,
DoctorID NUMBER NOT NULL,
NurseID NUMBER NOT NULL,
OtherStaffID NUMBER NOT NULL,
RoomNo NUMBER NOT NULL,
RoomCharges NUMBER(10,2) NOT NULL,
IsAvailable VARCHAR2(1) NOT NULL,
PRIMARY KEY(RoomID)
);

CREATE TABLE Patients(


PatientID VARCHAR2(25) NOT NULL,
Name VARCHAR2(100) NOT NULL,
StaffID NUMBER NOT NULL,
PatientTypeID NUMBER NOT NULL,
OldPatientTypeID NUMBER NOT NULL,
DateOfBirth DATE NOT NULL,
RoomID NUMBER NOT NULL,
PatientStatusID NUMBER NOT NULL,
PRIMARY KEY(PatientID)
);

CREATE TABLE Diagnoses(


DiagnosisID NUMBER NOT NULL,
Description VARCHAR2(255) NOT NULL,
PrescriptionList VARCHAR2(255) NOT NULL,
StartDate DATE NOT NULL,
EndDate DATE NULL,
PatientID VARCHAR2(25) NOT NULL,
RoomID NUMBER NULL,
StaffID NUMBER NOT NULL,
PRIMARY KEY(DiagnosisID)
);

CREATE TABLE Bills(

Data Modelling and Design 13


BillID NUMBER NOT NULL,
BillHeadID NUMBER NOT NULL,
PatientID VARCHAR2(25) NOT NULL,
BillDate DATE NOT NULL,
BillPaidOn DATE NOT NULL,
Amount NUMBER(10,2) NOT NULL,
BillStatusID NUMBER NOT NULL,
PRIMARY KEY(BillID)
);

CREATE TABLE Users(


UserID VARCHAR2(100) NOT NULL,
Password VARCHAR2(25) NOT NULL,
Name VARCHAR2(100) NOT NULL,
StaffID NUMBER NOT NULL,
DateOfBirth DATE NOT NULL,
isActive VARCHAR2(1) NOT NULL,
PRIMARY KEY(UserIDID)
);

--3. Create Indexes for Natural, Foreign Key, and Frequently Queried Columns

ALTER TABLE Patients


ADD CONSTRAINT FK_Patients_PatientStatus_PatientStatusID
FOREIGN KEY (PatientStatusID)
REFERENCES PatientStatus(PatientStatusID);

ALTER TABLE Patients


ADD CONSTRAINT FK_Patients_Staffs_StaffID
FOREIGN KEY (StaffID)
REFERENCES Staffs(StaffID);

ALTER TABLE Patients


ADD CONSTRAINT FK_Patients_Rooms_RoomID
FOREIGN KEY (RoomID)
REFERENCES Rooms(RoomID);

ALTER TABLE Patients


ADD CONSTRAINT FK_Patients_PatientTypes_PatientTypeID
FOREIGN KEY (PatientTypeID)
REFERENCES PatientTypes(PatientTypeID);

ALTER TABLE Patients


ADD CONSTRAINT FK_Patients_PatientTypes_OldPatientTypeID
FOREIGN KEY (OldPatientTypeID)
REFERENCES PatientTypes(OldPatientTypeID);

ALTER TABLE Diagnoses


ADD CONSTRAINT FK_Diagnoses_Staffs_StaffID
FOREIGN KEY (StaffID)

Data Modelling and Design 14


REFERENCES Staffs(StaffID);

ALTER TABLE Diagnoses


ADD CONSTRAINT FK_Diagnoses_Patients_PatientID
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID);

ALTER TABLE Diagnoses


ADD CONSTRAINT FK_Diagnoses_Rooms_RoomID
FOREIGN KEY (RoomID)
REFERENCES Rooms(RoomID);

ALTER TABLE Staffs


ADD CONSTRAINT FK_Staffs_Departments_DepartmentID
FOREIGN KEY (DepartmentID)
REFERENCES Departments(DepartmentID);

ALTER TABLE Staffs


ADD CONSTRAINT FK_Staffs_StaffTypes_StaffTypeID
FOREIGN KEY (StaffTypeID)
REFERENCES StaffTypes(StaffTypeID);

ALTER TABLE Rooms


ADD CONSTRAINT FK_Rooms_RoomTypes_RoomTypeID
FOREIGN KEY (RoomTypeID)
REFERENCES RoomTypes(RoomTypeID);

ALTER TABLE Rooms


ADD CONSTRAINT FK_Rooms_Staffs_DoctorID
FOREIGN KEY (DoctorID)
REFERENCES Staffs(DoctorID);

ALTER TABLE Rooms


ADD CONSTRAINT FK_Rooms_Staffs_NurseID
FOREIGN KEY (NurseID)
REFERENCES Staffs(NurseID);

ALTER TABLE Rooms


ADD CONSTRAINT FK_Rooms_Staffs_OtherStaffID
FOREIGN KEY (OtherStaffID)
REFERENCES Staffs(OtherStaffID);

ALTER TABLE Bills


ADD CONSTRAINT FK_Bills_BillStatus_BillStatusID
FOREIGN KEY (BillStatusID)
REFERENCES BillStatus(BillStatusID);

ALTER TABLE Bills


ADD CONSTRAINT FK_Bills_BillHeads_BillHeadID
FOREIGN KEY (BillHeadID)

Data Modelling and Design 15


REFERENCES BillHeads(BillHeadID);

ALTER TABLE Bills


ADD CONSTRAINT FK_Bills_Patients_PatientID
FOREIGN KEY (PatientID)
REFERENCES Patients(PatientID);

ALTER TABLE Users


ADD CONSTRAINT FK_Users_Staffs_StaffID
FOREIGN KEY (StaffID)
REFERENCES Staffs(StaffID);

Data Modelling and Design 16

S-ar putea să vă placă și