You are on page 1of 17

Use an appropriate design tool to design a relational database system for a

substantial problem

Design a relational database system using appropriate design tools and


techniques, containing at least four interrelated tables, with clear
statements of user and system requirements

Produce a comprehensive design for a fully functional system which


includes interface and output designs, data validations and data
normalization.

Evaluate the effectiveness of the design in relation to user and system


requirements.
Aim:

Suppose you are hired as a trainee Software Engineer by ABC hospital and you are assign to design and develop a
Database for the hospital.
ABC hospital is a multi-specialty hospital that includes a number of departments, rooms, doctors, nurses, compounders
and other staff working in the hospital.
Patients having different kinds of illnesses come to the hospital and get checkup done from the concerned doctors. If
required they are admitted in the hospital and discharged after treatments.
The aim of this case study is to design and develop a database for the hospital to maintain the records
of various departments, patients and doctors in the hospital

Description:
 In hospital, there are many departments like Orthopedic, Pathology, Emergency, Dental, Gynecology,
Anesthetics, I.C.U., Laboratory etc. A department is describing by its name, department location, and
facilities available.
 There are two types of the doctors in the hospital (identify by a unique ID), namely, regular doctors and
call on doctors. Hospital needs to store personal details of doctors like name, qualification, address,
phone number, salary, date of joining, etc.
 Regular doctors are those doctors who come to the hospital daily. It is required to store payment as
monthly salary for regular doctors.
 Calls on doctors are those doctors who are called by the hospital if the concerned doctor is not available.
Fees per call and payment due need to be store related to this doctor category.
 You need to store the details about the patients. Hospital needs to record the patient details when any
patient arrives in the hospital for a check-up. When patient arrives, a patient number is generated which
acts as a primary key. Other details like name, age, sex, address, city, phone number, entry date, name of
the doctor referred to and department name are also stored.
 After making entry, patients go to the concerned doctor’s room and the doctor checks up their illnesses.
According to the illnesses, the doctor either prescribes medicine or admits the patient in the concerned
department.
 Details of regular patients are stored separately which includes date of visit, diagnosis, treatment, status
of treatment, etc.
 When patient is admitted, his/her related details are need to be stored separately. Information stored
includes patient number, advance payment, mode of payment, room number, department, date of
admission, initial condition, diagnosis, treatment, referred doctor etc.
 Whenever a patient gets discharged from the hospital, it is required store details like patient number,
treatment given, payment made, mode of payment, date of discharge, etc.
 The patient who admitted to the hospital may choose either private or general room according to his/her
need. Room number (unique), room type (general or private), status (whether occupied or not) and
if occupied, then patient number etc
Activity 1

1.1)
a) Identify the user and system requirements to design a database for the
above scenario
This system provides fundamental services as well as the upgrade of the hospital and can be
identified as follows by the user according to the study.

Users of system :-

1. Patients
2. Patients family members
3. Doctors (on call/ regular)
4. Hospital staff

Requirements :-

1. The system should be able to register and enroll patients.


2. System should be able to manage the patient's reservation room.
3. The system should be able to keep records of patients.
4. System offers a physician on call facility.
5. The system manages the life-cycle of the hole from patient registration through patient
release.
6. The system should also be able to save information for physicians [ CITATION CJD09
\l 1033 ]

User Requirements
In order to take and subsequently store data from the patients, the Hospital
Management System is used. Hospital management system's primary objective is to treat
and reduce overtime pay appropriately.

The HMS includes several features. Some functions of the system include registration,
patient inspection, report production and more. This explains the Hospital Management
System's functional and non-functional needs.
Functional
The Hospital Management System has numerous software needs which encompass
multiple processes: registration, check-up, report generation, and database. There are
also many software standards.

Registration Process 

● Patient Adding: The Hospital Management allows front desk staff to integrate the
system into new patients.

● Assign a patient ID: The HMS provides a unique ID for each patient at the front desk
and subsequently adds it to the patient's records sheet. During your whole hospital stay,
patients can use the ID.

Check out.

● Delete Patient ID: the patient ID can be deleted from the system from the ward
administration staff after the patient leaves the hospital.

● Add to the available list of beds: staff can include a bed empty in the list of beds in the
administrative area of the ward.

Report Generation
● Patient Information: A report on various information such as the patient name,
telephone number, bed number, the medical name it assigns, the ward name and so on,
is generated by the Hospital Management System.

● Bed availability: Hospital management system may also help generate bed access
reports concerning information such as the empty or occupied bed number, the ward
name and more. 

Database Management.
● Compulsory Patient Information: each patient will have certain data necessary, such as
phone numbers, first and last names, personal health numbers, mailing code, nation,
address, city, patient identity number etc[ CITATION Pet07 \l 1033 ].
● Patient update information: The hospital management system enables users to update
patient information as indicated in the required information.

Non Functional
The non-functional needs of the hospital management system encompass several
software requirements and includes many processes, namely safety, performance,
maintenance and reliability.

Security
 Patient Identification -Patients need to recognize themselves on the phone by the system. 
 User login ID - All system users have to have a logon identification and password.
 Alterations- Only the ward administrator can synchronize and perform any modifications,
such insertion, delete, update etc.. for the database.
 The crew of the front desk -they can examine any of the data in the Hospital Management
System, add new patients to the HMS record but do not have rights to modify any of its
data.
 Rights of Administrator - Administrator may examine and edit any Hospital Management
System information.

Maintaining
● Recovery : The system provides data backup efficiency.

● Failures: Every will be tracked by the system and logged on.

Performance
● Real - time data collection: Once the 'patient' information is reviewed, the system gives
recognition in just one second.

● Capabilities: at least 1000 persons must be supported at a time by the system.

● User-Interface: The ui acknowledges within five seconds.

● Conformance: the system must ensure compliance with Microsoft Accessibility


Guidelines.

Availability
the system should be always available and active to users.

System Requirements
Server configuration – ERP for hospitals (Brand of your choice)
 Intel cor i7 or above
 32 GB RAM
 3 x 1 TB Solid-state drive with mirroring OR RAID 5
 Gigabyte ethernet
 Windows 2016 server OR Linux (Ubuntu 64 bit)
 Open-source relational database – MySQL,PostgresSQL or FirebirdSQL 3.x (64 bit)
 Antivirus subscription

Hospital Patient portal / PACS application server


 Intel Xeon dual-core or above
 32 GB RAM
 1 x t TB solid-state drive with mirroring OR RAID 5
 Gigabyte Ethernet
 On-premise or hosted Windows  2016 / Ubuntu server
 Antivirus subscription

Workstations for hospital departments


 Intel Core i3 / i5
 8 GB RAM
 Fast Ethernet
 LCD monitor
 Space-saving footprint
 Windows 10 licenses
 500 GB solid-state drive

Peripherals and Accessories for Hospital ERP automation


 Cat 6 or e-Cat structured cabling
 24 port managed switch for connectivity and network monitoring
 DVD writer / External hard disk for data backup
 Connectivity cables for medical device integration
 A4 Laser printer (laboratory results and patient discharge summary)
 Static leased line connection for remote support (Mandatory)
 24 Wire dot matrix printer (department billing)
 Epson point of sale (POS) printer
 Barcode printer & scanner (optional )
 HP Scanjet N8420 desktop scanner with barcode detector (for EMR)
 GPU enabled server for machine learning (Tensorflow)
 Bluetooth beacons for hospital indoor positioning systems
 Digital twin software platform for hospitals
 Mesh sensors to detect CO2, Smoke, Indoor Air quality, etc
[ CITATION Pat01 \l 1033 ]
b) Identify entities and attributes of the given scenario and design a
relational database system using conceptual design (ER Model) by
including primary key of each entity, cardinalities and participations of
relationships.

[ CITATION Pet07 \l 1033 ]

c) Convert the ER Model into logical database design using relational


database model including primary keys foreign keys and referential
Integrities. It should contain at least four interrelated tables.
Note: -It is allowed to have your own assumptions and related attributes within the scope of the
case study given.

Following are the tables along with constraints used in Hospital Management database.

1) tbl_Department
This table contains details of the  hospital departments.
This table contains the information as such,
 dept_Name (Primary Key) – Department Name
 dept_location - place where the department is situated
 Facilities – Facilities provided and actions specialised in.
dept_Nam
dept_Location Facilities
e
2) tbl_Doctor
This table contains information about all doctors who work for the hospital and its related
departments.
This table contains the information as such,
 DOC_Id (Primary Key) – An identity number starting with RD or CD prefixes is given
to every doctor respect to the type of the doctor(Regular Doctor/ Call on Doctor).
 dept_Name (Foreign Key/Primary Key of tbl_Department

DOC_Id dept_Name

3) tbl_RegDoctor
This table preserves details of regular hospital doctors. The doctors are indicated by their given
DOC_Id. This table contains the personal information of doctors as such,
 DOC_Id (Primary Key) – An identity name starting with RD
 DOC_Name - Name of the Doctor
 Qualification – the specialization of the doctor
 Address - Residence of the Doctor
 Contact_No – Mobile Number of the doctor
 Salary – Monthly Salary
 dateOfJoin – Joined Date

DOC_Id DOC_Name Qualification Salar dateOfJoin Addres Contact_No


y s

4) tbl_CallOnDoctor 
Details of doctors called by hospital are recorded in this table when more doctors are
requested. This table contains the personal information of doctors as such,
 DOC_Id (Primary Key) – An identity name starting with CD
 DOC_Name - Name of the Doctor
 Qualification – the specialization of the doctor
 Address - Residence of the Doctor
 Contact_No – Mobile Number of the doctor
 Fee_Per_Call – the charging amount for per visit
 Due_Payment – date of charging of payment

DOC_Id DOC_Nam Qualification Addres Contact_No Fee_Per_Cal Due_Payment


e s l

5) tbl_PatientEntry
When a patient arrives at the hospital for check up, a record is produced in this table. A patient
number is generated when the patient arrives, which acts as the Primary key . This table contains
the information of patients as such,
 P_Id (Primary Key) – Patient number
 P_Name – Patients name
 P_Gender – Gender
 P_Address – Patients Residence
 P_ContactNo – Patients Mobile No
 P_Age – Patients Age
 Diagnosis – Diagnosed Disease
The patient is transferred to the doctor for check ups after storing the essential details.
P_I P_Nam P_Gende P_Address P_ContactNo P_Ag Diagnosis
d e r e

6) tbl_PatientCheckUp 
This table stores the details about the patients who get treatment from the doctor referred to.
Details like patient number from tbl_Patient,DOC_Id, date of check up, diagnosis, and
treatment are stored. One more field status is used to indicate whether patient is admitted,
referred for operation or is a regular patient to the hospital. If patient is admitted, further details
are stored in tbl_PatAdmit table. If patient is referred for operation, the further details are stored
in tbl_PatOperate table and if patient is a regular patient to the hospital, the further details are
stored in tbl_PatRegular table.
P_I DOC_Id DOChekUp Diagnosis Statu Treatment
d s

7) tbl_PatAdmit
Related information is recorded in this table when the patient is admitted. The saved data include
patient number, advance payment, payment method, room number, department, date of
admission, initial condition, diagnosis, therapy, physician number of the person receiving
treatment, name of the attendant, etc.
P_I Advanced_Paym payment_Mo Room_N dept_Na DateOfAd ON_Conditi
d ent de o me mit on

8) tbl_PatDisCharge
An entry is created when a patient is released from the hospital in this table. Each entry contains
information such as patient numbers, treatment, Advise treatment , payment payment method,
dates of discharge, and so on.
P_I Advise_On_Tr Date_Of_Discha Issued_Treateme Medicin payme payment_Mo
d eat rge nts es nt de

9) tbl_PatRegular
Details of regular patients are stored in this table. Information stored includes date of visit,
diagnosis, treatment, medicine recommended, status of treatment, etc.
Primary Key – (P_Id,DateOfVisit)

P_Id DateOfVisi Medicine Diagnosis Payment Treatment Status


t

10) tbl_PatOperate
In this table his/her details are saved if the patient is operated in a hospital. The information
saved is the P_Id, admission date, surgery date, doctor's number, operation stage number, kind of
surgery, pre- and post-operation status of the patient, treatment instructions, etc.
P_Id DateOfOperation IN_Conditio On_Condition Operation_ Medicin DOC_Id
n e

11)  tbl_RoomDet
It includes details of all hospital rooms. Includes room number, room type (general or
private), status (whether or not occupied) and number, patient name, charge per day, etc.
Details contained in this table.
Room_I Room_Type Status charge_per_da otherCharges
d y

1.2)
a) Explain data normalization with examples.
Check whether the provided logical design in task 1.1 is normalized. If not, normalize the
database by removing the anomalies.
Anomalies such as duplication of data or repeating groups may occur throughout the operations
on the relation. We should analyze and break the complex link into a less simple, structured
connection in order to deal with these challenges. This is called a standardization procedure A
good database design is a normal form These are ordinary forms:

1. First normal form (1NF)


2. Second normal form(2NF)
3. Third normal form (3NF)
4. Boyce code normal form (BCNF)
5. Fourth normal form(4NF)
6. Fifth normal form(5NF)

Relation 1: Doctors works in Department (M:1)                  


1. First normal form (1NF):
 A relation is said to INF if and only if
1. All the primary key attribute are define.
2. There are no repeating group in the table.
3. All attribute are dependent on primary key.

Department Table : tbl_Department


dept_Nam
dept_Location Facilities
e

Doctors Table : tbl_Doctors


DOC_Id dept_Name
Because the above tables adhere to the mentioned criteria, they are classified as 1NF.

2. Second Normal Norm (2NF) 


A relation is said to INF if and only if
1.      It is in 1NF.
2.      Every non primary key attribute is fully functionally dependent on the primary
Department Table: tbl_Depatment
dept_Nam
dept_Location Facilities
e

dept_Name -> dept_Location


dept_Name -> Facilities

Doctors Table:
DOC_Id dept_Name

DOC_Id -> dept_Name


It is in 2NF.

3. Third normal forms (3NF): 


A relation is said to INF if and only if
1.      It is in 2NF.
2.       No non primary key attribute transitively dependent on primary key.
Department Table:tbl_Department
dept_Nam
dept_Location Facilities
e

dept_Name -> dept_Location -> Facilities


Facilities -> DOC_Name
Doctor Table : tbl_Doctor
DOC_Id dept_Name

DOC_Id -> dept_Name


dept_Name -> DOC_Id
Above table is transitively dependent .So it is not in 3NF.

Relation 2:  Doctor check-up patient (1: N)


1. First normal form (1NF):
Doctors Table : tbl_Doctor
DOC_Id dept_Name

Patient table: tbl_PatientEntry


P_I P_Nam P_Gende P_Address P_ContactNo P_Ag Diagnosis
d e r e

It satisfies all property of 1NF. So, it is in 1NF.

2. Second Normal Norm (2NF) 


Doctors Table : tbl_Doctor
DOC_Id dept_Name
DOC_Id -> dept_Name

Patient table: tbl_PatientEntry


P_I P_Nam P_Gende P_Address P_ContactNo P_Ag Diagnosis
d e r e

P_Id -> P_Name, P_Age , P_Address, P_ContactNo


It is in 2NF.

3. Third normal forms (3NF): 


Doctors Table : tbl_Doctor
DOC_Id dept_Name

DOC_Id -> dept_Name


dept_Name -> DOC_Id

Patient table:tbl_PatientEntry
P_I P_Nam P_Gende P_Address P_ContactNo P_Ag Diagnosis
d e r e

P_Id -> P_Name -> Diagnosis


P_Id -> Diagnosis
It is transitively dependent. So it is not in 3NF.

Relation 3:  Doctors Operate On Patient (M:M)


1. First normal form (1NF):
Doctors Table : tbl_Doctors
DOC_Id dept_Name

Patient table: tbl_PatientEntry


P_I P_Nam P_Gende P_Address P_ContactNo P_Ag Diagnosis
d e r e

Doctors Operate On Patient:


P_Id DateOfOperation IN_Conditio On_Condition Operation_ Medicin DOC_Id
n e
It is in 1NF

2. Second Normal Norm (2NF) 

Doctors Operate On Patient:


P_Id DateOfOperation IN_Conditio On_Condition Operation_ Medicin DOC_Id
n e

P_Id + DOC_Id -> DateOfOperation, IN_Condition, On_Condition


It Is In 2NF

3. Third Normal Norm (3NF) 


Doctors Operate On Patient:
P_Id DateOfOperation IN_Conditio On_Condition Operation_ Medicin DOC_Id
n e

P_Id -> IN_Condition -> On_Condition


P_Id -> On_Condition
It is not in 3NF[ CITATION Shi11 \l 1033 ]

b) Produce set of simple interfaces to input and output for the above scenario using
Wireframe or any interface-designing tool.
Patient Registration
Doctor Registration

[ CITATION Abr06 \l 1033 ]


c) Explain the validation mechanisms to validate data in the tables with examples.
The process of confirming the correctness and quality of data is referred to as data validation. It is
implemented by incorporating a number of checks into a system or report to assure the logical
consistency of input and stored data. It is vital to guarantee that the data that enters the system is
correct and fulfills the quality requirements that have been established [ CITATION CJD09 \l 1033 ].

In this Hospital Database Management System, the validation of data can be carried out as follow.

Check the data type.


A data type check ensures that the information entered is of the correct data type. The Contact Number
field of tbl_Doctor and tbl_PatientEntry, for example, may only take numeric values. If this is the case,
the system should reject any data including additional characters such as letters or special symbols.

Check data Format
Date columns kept in a set format, such as “YYYY-MM-DD” or “DD-MM-YYYY,” are a popular use case. A
data validation technique that ensures dates are formatted correctly aids in maintaining consistency
across data and over time.This can be applied to the date input of the fields in the tables.

1.3)
a) Evaluate your design in relation to the user and system requirements you identified in
1.1. a.
Patient management becomes easy when you install a software. This system feature allows
medical personnel to take into consideration the amount and number of patients and outpatients
in hospital and in bedrooms. Registrations and admissions for patients can also be handled
effectively. The scheduling and diagnosis of appointments, consultations and other such records
can be precisely kept.

Doctor records- this (HMIS) can be extremely beneficial to doctors. Doctors will have simple
access to patient appointment data. Furthermore, when multiple doctors work on a single case,
all of the records and diagnostic results can be shared so that other doctors can view the data and
decide on the best course of therapy. Medical tests and report status, for example, are
conveniently accessible.

Administration-  Management of management module This system assists the medical and
equipment administration team. Staff records with a minimum or zero error can be stored. It is
easy to control the laboratory and blood bank inventory. Moreover, a hospital information
software can regulate the payroll system. An automatic system can also be used to easily
maintain effective accounts.

Aside from these fundamental aspects, the hospital management system you choose must meet
your individual requirements. It should also be user friendly for individuals who are not tech
knowledgeable, as your patients will be an important part of it. Aside from being simple for
patients, it must also be simple for medical personnel such as doctors, nurses, lab technicians,
and so on. Above all, the software you use should be cost effective[ CITATION Shi11 \l 1033 ].
References
1. Abraham Silberschatz, H. F. K. a. S. S., 2006.. Database System Concepts,. Fifth Edition,
ed. s.l.:McGraw-Hill Education (Asia), .
2. Atul Kahate, 2006. Introduction to Database Management Systems,. New Delhi: Pearson
Education.
3. C. J. Date, A. K. a. S. S., 2009.. An Introduction to Database Systems,. Eighth Edition,
ed. s.l.:Pearson Education, .
4. Patrick O’Neil and Elizabeth O’Neil, D. P., 2001.. Programming and Performance,. First
Edition, ed. s.l.:Harcourt Asia Pte. Ltd.,.
5. Peter Rob and Carlos Coronel, 2007.. Database Systems Design, Implementation and
Management,. Seventh Edition, ed. s.l.:Thomson Learning-Course Technology, .
6. Shio Kumar Singh, 2011.. Database Systems Concepts, Designs and Application,. Second
Edition, ed. s.l.: Pearson Education,.

You might also like