Professional Documents
Culture Documents
MANAGEMENT SYSTEM
BY:
DEME TEMESGEN
MINTESENOT
SAMUEL MISIKIR
SOLOMON YOHANNIS
AKLILU YOSEF
ASHAGIRE
October, 2023
Adama, Ethiopia
DESIGN AND IMPLEMENT WEB BASED HOSPITAL
MANAGEMENT SYSTEM
BY:
DEME TEMESGEN
MINTESENOT
SAMUEL MISIKIR
SOLOMON YOHANNIS
AKLILU YOSEF
ASHAGIRE
October, 2023
Adama, Ethiopia
DESIGN AND IMPLEMENT WEB BASED HOSPITAL
MANAGEMENT SYSTEM
BY:
DEME TEMESGEN
MINTESENOT
SAMUEL MISIKIR
SOLOMON YOHANNIS
AKLILU YOSEF
ASHAGIRE
1.
2.
3.
October, 2023
Adama, Ethiopia
DECLARATION
We certify that the project entitled “ DESIGN AND IMPLEMENT COMPUTER BASED HOSPITAL MANAGEMENT
SYSTEM” in partial fulfillment of the requirements for the award of BACHELOR OF SCIENCE DEGREE IN
COMPUTER SCIENCE is the result of our group work under the supervision of Mr. Nigussie Teferi
Lake, Lecturer Unity University Adama Campus, Department of Computer Science. The work
has not been presented elsewhere for assessment where material has been used from other
sources it has been properly referred.
1. Deme Temesgen
2. Mintesenot Samuel
3. Misikir Solomon
4. Yohannis Aklilu
5. Yosef Ashagire
I hereby declare that I have read this project and in my opinion this project is sufficient in terms
of scope and quality. This project has been submitted for examination with my approval.
Advisor Name Signature Date
ACKNOWLEDGEMENT
Above all, we would like to thank the Omniscient, Omnipotent, and Almighty God. He gave us
courage, strength, and impatience to finish this project. Next to God, our special gratitude goes to
our advisor, Nigussie Teferi (MSc), for his invaluable support and smooth communication
throughout the preparation of this project. We are also indebted to our honorable families for
their moral and financial support. Finally, we would like to thank the entire staff who
participated in this project and our friends for their suggestions.
I
List of Tables
II
Table 38: illness_complaint table..................................................................................................66
Table 39: treatment table...............................................................................................................66
Table 40: incomeexpense table......................................................................................................67
Table 41: invoice table...................................................................................................................67
Table 42: item table.......................................................................................................................67
Table 43: issue_stock table............................................................................................................68
Table 44: item_master table...........................................................................................................68
Table 45: lab_master table.............................................................................................................68
Table 46: lab_test_data table.........................................................................................................69
Table 47: leave_from table............................................................................................................69
Table 48: leave_master table.........................................................................................................69
Table 49: maintenance_of_item table............................................................................................70
Table 50: medicine table................................................................................................................70
Table 51: medicine_expiry_report table........................................................................................70
Table 52: operative_schedule table................................................................................................71
Table 53: patient_allergy table......................................................................................................71
Table 54: patient table....................................................................................................................72
Table 55: patient_canteen_bill table..............................................................................................72
Table 56: patient_bill table............................................................................................................73
Table 57: patient_history table......................................................................................................73
Table 58: patient_canteen_order table...........................................................................................74
Table 59: patient_illness_pasthistory table....................................................................................74
Table 60: payment table.................................................................................................................75
Table 61: purchase_order table......................................................................................................75
Table 62: room_master table.........................................................................................................76
Table 63: supplier_master table.....................................................................................................76
Table 64: treatment_doctor_note table..........................................................................................76
Table 65: treatment_clinical_handover table.................................................................................77
Table 66: treatment_investigation table.........................................................................................78
Table 67: treatment_outpatient table.............................................................................................79
Table 68: treatment_patient_dailytreatment table.........................................................................79
Table 69: treatment_patient_dailymedication table.......................................................................80
Table 70: treatment_patient_assesment.........................................................................................80
Table 71: treatment_surgery tableadd............................................................................................82
Table 72: patient_allergy table......................................................................................................82
Table 73: patient_addiction table...................................................................................................83
Table 74: patient_admission table.................................................................................................83
III
List of Figures
Figure 1: Project Time Schedule Management...............................................................................8
Figure 2: Essential Use Case Diagram for Hospital Management System...................................13
Figure 3: CRC Model for Existing Hospital Management System...............................................17
Figure 4: Essential UI for Medicine Prescription..........................................................................18
Figure 5: Essential UI for X-ray Examination Request Form.......................................................19
Figure 6: General Use Case Diagram............................................................................................25
Figure 7: Patient Management Use Case.......................................................................................26
Figure 8: Staff Management Use Case..........................................................................................27
Figure 9: Doctor Management Use Case.......................................................................................28
Figure 10: Room Management Use Case......................................................................................29
Figure 11: Laboratory Management Use Case..............................................................................30
Figure 12: Supplier’s Management Use Case...............................................................................31
Figure 13: Conceptual Class Diagram...........................................................................................36
Figure 14: Sequence Diagram for Patient Registration Use Case.................................................37
Figure 15: Sequence Diagram for Update Doctor Use Case.........................................................38
Figure 16: Sequence Diagram for Register Doctor Use Case.......................................................39
Figure 17: Sequence Diagram for Update Patient Details Use Case.............................................40
Figure 18: Sequence Diagram for Book Appointment Use Case..................................................41
Figure 19: Sequence Diagram for Insert Invoice Details Use case...............................................42
Figure 20: Sequence Diagram for Report Management................................................................43
Figure 21: Activity Diagram for login Use Case...........................................................................44
Figure 22: Activity Diagram for Add Doctor Use Case...............................................................45
Figure 23: Activity Diagram for Manage Appointment Use Case................................................46
Figure 24: Activity Diagram for update Patient Detail Use Case..................................................47
Figure 25: Activity Diagram for update Canteen Food Price Use Case........................................48
Figure 26: System Architecture Design Diagram..........................................................................50
Figure 27: HMS System Decomposition.......................................................................................52
Figure 28: Hardware/ Software mapping for the proposed HMS..................................................54
Figure 29: Object Oriented class Diagram....................................................................................56
Figure 30: Component diagram.....................................................................................................57
Figure 31: Deployment Diagram...................................................................................................58
Figure 32: Entity Relation Diagram..............................................................................................60
Figure 33: login page Screen UI....................................................................................................84
Figure 34: Patient Registration Screen UI.....................................................................................85
Figure 35: Doctor Registration Screen UI.....................................................................................86
Figure 36: Services Screen UI.......................................................................................................87
Figure 37: Cleaning Service Screen UI.........................................................................................88
Figure 38: Staff Management Screen UI.......................................................................................89
Figure 39: Register Employee Screen UI......................................................................................90
IV
Figure 40: Daily Attendance Screen UI.........................................................................................91
Figure 41: Departments Screen UI................................................................................................92
Figure 42: Reports Management Screen UI..................................................................................93
Figure 43: Medicine Report Screen UI..........................................................................................94
V
Table of Contents
ACKNOWLEDGEMENT................................................................................................................I
List of Tables..................................................................................................................................II
List of Figures................................................................................................................................IV
Acronyms......................................................................................................................................IX
Abstract...........................................................................................................................................X
CHAPTER ONE: INTRODUCTION..............................................................................................1
1.1. Background of the Project.................................................................................................1
1.2. Statement of the problem..................................................................................................2
1.3. Purpose of the Project.......................................................................................................3
1.4. Objectives of the Project...................................................................................................3
1.4.1. General Objectives.....................................................................................................3
1.4.2. Specific Objective......................................................................................................3
1.5. Scope of the project...........................................................................................................4
1.6. Limitation of the Project...................................................................................................4
1.7. Feasibility Study...............................................................................................................4
1.7.1. Economic Feasibility.................................................................................................4
1.7.2. Technical Feasibility..................................................................................................5
1.7.3. Operational Feasibility...............................................................................................5
1.8. Significance of the Project................................................................................................5
1.9. Methodology.....................................................................................................................6
1.9.1. Fact Finding Methodology........................................................................................6
1.9.2. System Development Process Model........................................................................6
1.9.3. System Design and Development Tools....................................................................6
1.10. Testing Plan...................................................................................................................6
1.10.1. Unit Testing............................................................................................................6
1.10.2. Integration Testing.................................................................................................7
1.11. Project Management......................................................................................................7
1.11.1. Cost Management..................................................................................................7
1.11.2. Project Schedule.....................................................................................................8
CHAPTER TWO: ANALYSIS OF EXISTING SYSTEM.............................................................9
VI
2.1. Overview of Existing System...........................................................................................9
2.2. Function of Existing System.............................................................................................9
2.3. Problems of the Existing System....................................................................................10
2.4. Players of Existing System.............................................................................................11
2.5. Supplementary Specification..........................................................................................11
2.5.1. Business Rule...........................................................................................................11
2.6. Modeling the Existing System........................................................................................12
2.6.1. Use Cases.................................................................................................................12
2.6.2. Essential Use Case Modeling..................................................................................13
2.6.3. Essential Use Case Documentation.........................................................................14
2.6.4. CRC Model..............................................................................................................17
2.6.5. Essential User Interface (UI) Flow Diagram...........................................................18
CHAPTER THREE: ANALYSIS OF PROPOSED SYSTEM.....................................................20
3.1. Overview of Proposed System........................................................................................20
3.2. Requirement Determination............................................................................................20
3.2.1. Functional Requirement...........................................................................................20
3.2.2. Non-Functional Requirements.................................................................................21
3.2.3. System Requirements..............................................................................................21
3.3. Supplementary Specification..........................................................................................22
3.3.1. Business Rule...........................................................................................................22
3.3.2. Constraints...............................................................................................................23
3.4. Modeling Proposed System............................................................................................23
3.4.1 System Use case Model................................................................................................23
3.4.2. Conceptual Class Diagram......................................................................................36
3.4.3. Sequence Diagram...................................................................................................37
3.4.4. Activity Diagram.....................................................................................................44
CHAPTER FOUR: SYSTEM DESIGN........................................................................................49
4.1. Overview of System Design...........................................................................................49
4.2. Design Goals...................................................................................................................49
4.3. Architecture of System Design.......................................................................................50
4.3.1. System Architecture.................................................................................................50
VI
4.3.2. System Process........................................................................................................51
4.3.3. System Decomposition............................................................................................52
4.3.3.1. Subsystem Decomposition...................................................................................52
4.3.4. Hardware/Software Mapping...................................................................................54
4.4. Object Oriented Class Diagram......................................................................................55
4.5. Component Diagram.......................................................................................................57
4.6. Deployment Diagram......................................................................................................58
4.7. Database Design..............................................................................................................59
4.7.1. Conceptual Database Design...................................................................................59
4.7.2. Physical Database Design........................................................................................61
4.8. User Interface Design......................................................................................................84
4.9. Access Control................................................................................................................95
CHAPTER FIVE: IMPLIMENTATION AND TESTING...........................................................96
5.1. Introduction.....................................................................................................................96
5.2. Coding.............................................................................................................................96
5.3. Software Testing and Procedures....................................................................................97
5.3.1. Software Testing......................................................................................................97
5.3.2. Testing Procedures...................................................................................................97
CHAPTER SIX: CONCLUSION AND RECOMMENDATIONS..............................................99
6.1. Summary and Conclusion...................................................................................................99
6.2. Recommendation..............................................................................................................101
I. REFERENCES....................................................................................................................102
II. APPENDIX..........................................................................................................................103
APPENDIX A: Sample code for database connection........................................................103
APPENDIX B: Sample script code for Surgery Consent....................................................104
APPENDIX C: Sample script code for Add Surgery Consent............................................107
VI
Acronyms
GB Giga Byte
NO. Number
Qty Quantity
TB Terabyte
UI User Interface
IX
Abstract
An organized computerized system called a "hospital management system" was designed and
developed to handle day-to-day operations and management of hospital activities. In many
hospitals, the Existing System has many problems such as lack of immediate retrievals, lack of
immediate information storage, lack of prompt updating, managing record, generating reports is
difficult and takes a lot of time and is highly error-prone as it is manual. The major goal of this
project is to computerize paper-based task and to develop a user-friendly, quick, and affordable
hospital management system. Information about the patient, doctors, and other staff’s, and more
are performed through the system. The system's primary purpose is to register, store, and
retrieve, patient, doctor and other staff’s information as needed, as well as to change this
information in a useful way. The methodology used to model and develop this system is Iterative
and Incremental Model, which allows room for scalability as time goes on and this model helps
to start development with a simple implementation of a small set of the software requirements
and iteratively enhances the evolving versions until the complete system is implemented. This
Project benefits doctors, patients, finance departments, HR departments and many other hospital
authorities improving the day to day activities.
X
CHAPTER ONE: INTRODUCTION
Our project, named "Hospital Management System," is powerful, flexible, and easy to use and is
designed and developed to deliver real, conceivable benefits to hospitals. The main purpose of
this project is to address the issues faced by hospitals and to develop a web-based hospital
management system that will replace an old paper-based management system. This project has
many modules like patient management, doctor/physician management, medicine and
prescription management, online appointment management, laboratory management, nurse
management, etc.
1
Our project Hospital Management System (HMS) includes registration of patients, storing their
details into the system, making appointments, having doctors assign nurses for treatments,
prescribing a laboratory for detail tests, viewing treatment details, prescribing medicine to
patients without writing on paper, and also having patients download their details and
prescription. The software has the facility to create a unique ID for every patient and member of
staff and stores the details of every patient and member of staff automatically. It includes a
search facility to determine the current status of each room. The user can search for the
availability of a doctor and the details of a patient using the ID or username.
2
1.3. Purpose of the Project
The purpose of this project is to develop a computerized hospital management system that
replaces the current paper-based hospital management system. By employing this software,
hospitals will be able to register patients more efficiently and manage appointments, patient
records, medical prescriptions, laboratory results, as well as other tasks.
3
1.5. Scope of the project
Our software intends to develop a hospital management system which is a web based
application. This project is suitable for any hospital that needs a web based system. The scope of
this project includes:
4
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products have to be purchased.
The system will reduce different types of errors that are made through interventions like
missing billing, operational failure, clinical errors, missing appointments, and much
more.
The system allows easy patient data retrieval.
The system is time-saving technology.
The system helps reduce the work of documentation.
The System helps the HR department by improving the way to manage employees.
The system helps the finance department by improving tasks like bill management,
inventory management, salary and more.
The system also allows generating report’s between days.
5
1.9. Methodology
Direct observation
Existing document Analysis
6
1.10.2. Integration Testing
After the unit testing, the integration testing of the system is carried out. In integration testing,
we check if there is any error or bug present in the system after combining the different modules
that may have been developed by the different stakeholders. This type of testing is heavily
dependent on the behavior of the system that it exhibits after the interaction of the different
modules and whether they are providing the correct and accurate output of indented inputs.
7
1.11.2. Project Schedule
Once we examine that the project is feasible, we undertake project planning. The figure shown
below describes how we planned our project.
8
CHAPTER TWO: ANALYSIS OF EXISTING SYSTEM
2.1. Overview of Existing System
This part of the project describes the major functionality of the current or existing hospital
management system, problems with the existing system, identification of players in the existing
system, supplementary specification (i.e., business rule), and modeling the existing system
through an essential use case diagram, a CRC model, and an essential user interface prototype
flow diagram.
There is a lot of paperwork in the current HMS. To maintain or retrieve patient medical records
manually is a time-consuming task. With the increase in records, it will become a massive task to
maintain the medical records. It requires large quantities of file cabinets, which are huge and
require quite a bit of space in the office which is used for storing records of previous details. The
retrieval of records of previously registered patients will be a tedious task. The lack of record
security allows anyone to disassemble your system's records. All this work is done manually by
the receptionist and other operational staff, and a lot of papers need to be handled and taken care
of. Also, doctors have to remember various medicines available for diagnosis and sometimes
miss better alternatives as they can't remember them at that time. If someone wants to check the
details of the available doctors, the existing system does not provide any necessary details of this
type.
9
Generate lab test report.
Locate available bed rooms.
Identify the medicines in the store.
Record expire dates of the medicine.
Receive Payment
Make Receipt
Hire Staff’s
Manage employee
10
2.4. Players of Existing System
The following table shows players of the existing system and their corresponding responsibility.
11
2.6. Modeling the Existing System
In order to model the current HMS, we employ the essential use case model as well as the CRC
model.
12
2.6.2. Essential Use Case Modeling
The essential use case diagram of the current hospital management system is shown in the figure
below: It shows how the players interact with the manual systems.
13
2.6.3. Essential Use Case Documentation
The following tables shows an essential use case documentation
14
Name Buy medicine
Identifier None
Description A patient buys medicine from the pharmacy.
Actor Patient
Pre-Condition The patient must be registered
Post Condition The patient must have a prescription to buy the medicine.
Extends None
Includes None
Basic Course of Action
1. The patient takes his or her prescription and goes to the laboratory.
2. The laboratory technician accepts the prescription and verifies it.
3. The lab technician takes a sample from the patient.
4. The lab technician generates the test result report.
15
Name Sell Medicine
Identifier None
Description Sell available medicine in the store to the customer
Actor Pharmacist
Pre-Condition The pharmacist checks prescription
Post Condition The pharmacist will sell medicine if the it is available on the shelf
Extends None
Includes None
Basic Course of Action
1. The pharmacist accept prescription from the patient
2. The pharmacist find or search the medicine on the shelf
3. The pharmacist collect medicine from the shelf and identify according to its type
4. The pharmacist give the medicine to the customer
Alternative Course of Action
3. The medicine is not available on the shelf
4. The pharmacist informs to the customer the medicine type is not available
Table 7: Sell medicine use case documentation
16
2.6.4. CRC Model
CRC, which stands for Class-Responsibility-Collaboration, is an index card on which one
records the responsibilities and collaborators of classes. The CRC model of the current hospital
management system is shown in the following figure:
17
2.6.5. Essential User Interface (UI) Flow Diagram
18
Figure 5: Essential UI for X-ray Examination Request Form
19
CHAPTER THREE: ANALYSIS OF PROPOSED SYSTEM
3.1. Overview of Proposed System
The proposed project named “Hospital Management System” is a web based application. An
interactive application for managing details of Patients, doctors, Staff, doctors schedule, Bill,
Appointment, Canteen Services, Laboratory services and Reports.
This part of the project describe requirement determination (functional requirement, non-
functional requirement and system requirement), supplementary specification, identification of
actors and use cases and modeling the proposed system through system use case diagram,
conceptual class diagram, sequence diagram, and activity diagram.
20
3.2.2. Non-Functional Requirements
Table 9 : Non-Functional Requirements
Security:
3.2.3. System Requirements
Login Credential: Any users who make use of the system need to hold a Logon credential.
3.2.3.1. Hardware Requirements
Front Desk Staff Rights: The staff at the front desk can view any data in the Hospital
No Hardware Devices Specification
Management system, and add new patients record to the HMS but they don't have any rights to
1 Laptop/Desktop PC Core-i5, 2.5GHZ, 4GB RAM, 1TB hard disk
alter any data in it.
2 Printer HP, LaserJet Printer that is shared by more than
Administrator rights: The administrator can view as well as alter any information in the
users in LAN
Hospital Management System.
3 Hard Disk 1 Terabyte
4 Wi-Fi-router For internet
Usability: This Hospital Management System work
has a operations inside
good looking useroffriendly
hospitalinterface.
Table 10: Hardware Requirements
Serviceability: If issue arises in the Hospital Management System, then the project must be
programmed in such a way that developer can service it again.
21
3.2.3.2. Software Requirements
No Software Specification
1 Windows Operating System Windows 10 64-bits
2 Xampp Server Local Server installed in a computer
3 MSQL For database Management
4 PHP To develop Backend of the system
5 Visual Studio Code To write code
6 Web browser Google Chrome, Mozilla Firefox etc.
Table 11: Software Requirements
ID BR-2
ID BR-3
Name Inpatient Admission
Description The Inpatient admission form must be filled by the doctor and admin rather than other
staffs.
Table 14: Business Rule 3 (Inpatient Admission)
ID BR-4
Name Patient Discharge
Description Patients must need to have discharge report and payment receipt before leaving the
hospital.
Table 15: Business Rule 4(Patient Discharge)
22
3.3.2. Constraints
Computer skilled person needed for smooth operation.
The system performs only basic accounting facilities (classified transactions into
Income, Expense, Asset and Liability).
The system does not consider any governmental Tax’s.
23
7 UC-07 Manage Bill
8 UC-08 Receive Payment
9 UC-09 Pay Bill
10 UC-10 Manage staff details
11 UC-11 Room Service
12 UC-12 Manage Reports
13 UC-13 Take Order
14 UC-14 View Order
15 UC-15 Manage Material
16 UC-16 Manage Supplier Details
17 UC-17 View Test Prescription
18 UC-18 Patient Discharge
19 UC-19 Treatment Details
20 UC-20 Manage hospital activities data
21 UC-21 Order food
22 UC-22 View Own Medical History
23 UC-23 Staff Report
24 UC-24 Medicine Expiry Report
25 UC-25 Patients Report
26 UC-26 Income Expense Report
27 UC-27 Material Reports
28 UC-28 View Medicine Prescription
29 UC-29 Print Prescription Details
30 UC-30 Calculate salary
31 UC-31 Take attendance
32 UC-32 Medicine
33 UC-33 Room Materials
34 UC-34 Prepare test Result
35 UC-35 Calculate Salary
36 UC-36 Canteen
37 UC-37 Laboratory
38 UC-40 Food materials
Table 17: Identification of Use Case
24
3.4.1.3. System Use Case Diagram
The following figures show the General and Specific System use case diagram:
25
The Following Use Case Diagrams are created for the purpose of simplicity, understandability
and mainly to reduce complexity. They are the detail definition of some use cases.
26
Figure 8: Staff Management Use Case
27
Figure 9: Doctor Management Use Case
28
Figure 10: Room Management Use Case
29
Figure 11: Laboratory Management Use Case
30
Figure 12: Supplier’s Management Use Case
31
3.4.1.4. System Use Case Documentation
Name Login
Identifier UC-01
Description log in to the system
Actor System Admin
Pre-Condition None
Post Condition The system admin log in to the system to perform admin tasks
Extends None
Includes None
32
Name Book Appointment
Identifier UC-02
Description It shows users a list of available doctors, timings and enables patients
to select the most suitable appointment date and doctor.
Actor Patient
Post Condition Patient details are displayed and a new appointment is fix or a existing
appointment is cancelled.
Extends None
33
Name Manage Patient’s Detail
Identifier UC-04
Description The doctor can view patients appointment, record, past History and
other patient related issues
Actor Doctor
Pre-Condition The Doctor Must be registered doctor and system does not allow doctor
to modify some of his details.
34
Name Manage Staff Details
Identifier UC-10
Description The HR can manage staffs
Actor HR
Pre-Condition The HR Must be registered
Post Condition None
Extends None
Includes None
Basic Course of Action
1. The HR person enter his/her login credential and enters into the system
2. After successfully login his select Staffs link from the navigation bar
3. The system displays links related to staffs i.e. Attendance Salary, Leave
35
3.4.2. Conceptual Class Diagram
A Conceptual Class diagram is a visual representation in the unified modeling language (UML)
that illustrates the high level, abstract relationships and entities in a system or software
application. It focuses on the key concepts, classes and their association without getting into
detailed attributes or methods. The figure below shows the conceptual class diagram of the
proposed hospital management system.
36
3.4.3. Sequence Diagram
A sequence diagram or system sequence diagram (SSD) shows process interactions arranged in
time. It depicts the processes and objects involved and the sequence of messages exchanged
between the processes and objects needed to carry out the functionality. The following figures
represent sequence diagram of different use case.
37
Figure 15: Sequence Diagram for Update Doctor Use Case
38
Figure 16: Sequence Diagram for Register Doctor Use Case
39
Figure 17: Sequence Diagram for Update Patient Details Use Case
40
Figure 18: Sequence Diagram for Book Appointment Use Case
41
Figure 19: Sequence Diagram for Insert Invoice Details Use case
42
Figure 20: Sequence Diagram for Report Management
43
3.4.4. Activity Diagram
We use Activity Diagrams to illustrate the flow of control in a system and refer to the steps
involved in the execution of a use case. We model sequential and concurrent activities using
activity diagrams. So, we basically depict workflows visually using an activity diagram. An
activity diagram focuses on condition of flow and the sequence in which it happens. We
describe or depict what causes a particular event using an activity diagram. The following
figures shows Activity diagram of different use cases.
44
Figure 22: Activity Diagram for Add Doctor Use Case
45
Figure 23: Activity Diagram for Manage Appointment Use Case
46
Figure 24: Activity Diagram for update Patient Detail Use Case
47
Figure 25: Activity Diagram for update Canteen Food Price Use Case
48
CHAPTER FOUR: SYSTEM DESIGN
This part of the project includes: Design Goals, System Architecture such as Architectural Style,
System Process, System Decomposition and system design models such as Object Oriented
Class diagram, Collaboration Modeling, Component Modeling, Deployment Modeling, Database
Design, and User Interface Design. It is also include the Access control and Design of the
Algorithm.
Hospital management systems must be designed with the specific needs and requirements of the
healthcare facility in mind. This may involve incorporating features such as electronic health
records (EHRs), which enable the secure and efficient exchange of patient information between
healthcare providers and facilities. To ensure the successful implementation of the hospital
management system, it is crucial to conduct a thorough needs assessment and involve relevant
stakeholders in the design process. This will help to identify any potential challenges or
constraints and develop a system that can effectively address these issues.
49
4.3. Architecture of System Design
We are using this architecture because each tier can run on a separate operating system and
server platform and this gives us benefits like:
50
4.3.2. System Process
A hospital management system (HMS) is a software application that helps healthcare
organizations manages their operations. HMSs can be used to manage a variety of tasks,
including patient records, appointments, billing, scheduling, staff management, canteen services
material inventory and so on. The system process at the system design level for an HMS
typically involves the following steps:
Define the system requirements: This step involves gathering the requirements from the
stakeholders, such as the hospital administrators, doctors, nurses, and patients. The
requirements should include the functional requirements (what the system should do) and
the non-functional requirements (how the system should perform).
Design the system architecture: This step involves designing the overall architecture of
the system, including the hardware, software, and network components. The architecture
should be designed to meet the system requirements and to be scalable and reliable.
Develop the system: This step involves developing the software code for the system. The
code should be developed in a modular and maintainable way.
Test the system: This step involves testing the system to ensure that it meets the
requirements. The testing should include functional testing, performance testing, and
security testing.
Deploy the system: This step involves deploying the system to the production
environment. The deployment should be done in a controlled and orderly manner.
Maintain the system: This step involves maintaining the system to ensure that it
continues to meet the requirements. The maintenance should include bug fixes, security
patches, and new features.
51
4.3.3. System Decomposition
System decomposition is the process of breaking down a complex system into smaller, more
manageable components. This can be done for a variety of reasons, such as to make the system
easier to understand, to improve its performance, or to make it more scalable.
52
4.3.3.2. Subsystem Description
No Subsystem Description
1 Patient Management This subsystem is responsible for tracking patient information,
such as their medical history, current medications, and
allergies. It also allows scheduling appointments, track patient
progress.
2 Doctor Management This subsystem is responsible for tracking doctor information,
such as their schedules, availability, and specialties.
53
4.3.4. Hardware/Software Mapping
One of the major tasks in system design deals with hardware/software mapping which deals with
which components would be part in which hardware and so on. The HMS is a broad system that
performs many functions. The web based part is expected to run on a networked environment on
different Operating System platforms. The client/server architecture of the system enables
different clients to connect to the server remotely through Internet connection. The applications
of the system will run on the web server connected to the database server by MYSQL. Users
merely need to start their browsers and enter the URL of the application Web site. The server
hosting the Web site is responsible for allocating all the resources the Web application requires.
The following figure is the hardware/software mapping of the proposed Hospital Management
System.
54
4.4. Object Oriented Class Diagram
At the design phase, an object-oriented class diagram serves as a blueprint for implementing a
system. It goes beyond the conceptual representation provided by the class diagram at the
analysis phase. In this context, the class diagram at the design phase delves into the specifics of
how the software components will be organized and structured in the code. This phase
emphasizes the internal structure of classes, including their methods, attributes, and
relationships, while considering implementation details such as data types, access modifiers, and
method signatures. Additionally, the design phase class diagram may also include details
regarding interfaces, abstract classes, and specific design decisions, which are not typically
present in the analysis phase diagram. The following figure is the object Oriented class Diagram
of the proposed Hospital Management System.
55
Figure 29: Object Oriented class Diagram
56
4.5. Component Diagram
A Component Model describes the hierarchy of functional components, their responsibilities,
static. Relationships and the way components collaborate to deliver required functionality.
The following figure is a Component diagram for the proposed Hospital management system.
57
4.6. Deployment Diagram
A deployment diagram is a diagram that shows the configuration of run time processing nodes
and the components that live on them. Deployment diagrams are a kind of structure diagram used
[6]
in modeling the physical aspects of an object-oriented system . They are often be used to
model the static deployment view of a system. For the Hospital management system, the
deployment model should be designed to ensure maximum efficiency and reliability in managing
the overall activity of the hospital.
58
4.7. Database Design
Database design is the process of producing a detailed data model of a database. It involves
identifying the data to be stored and organizing it in a way that reflects the relationships between
different data elements. A well-designed database ensures data integrity, efficiency, and ease of
use for the end-users.
59
Figure 32: Entity Relation Diagram
60
4.7.2. Physical Database Design
Physical database design is the process of transforming a data model into the physical data
structure of a particular database management system (DBMS). This part of the design shows the
physical realization of the data in the database. Accordingly, the following table shows the
physical database design of hospital management system.
61
Table 26: attendance_tran table
62
Table 30: distribution_of_item table
63
Table 33: doctor_outdoor table
64
Table 36: employee_master table
65
Table 38: illness_complaint table
66
Table 40: incomeexpense table
67
Table 43: issue_stock table
68
Table 46: lab_test_data table
69
Table 49: maintenance_of_item table
70
Table 52: operative_schedule table
71
Table 54: patient table
72
Table 56: patient_bill table
73
Table 58: patient_canteen_order table
74
Table 60: payment table
75
Table 62: room_master table
76
Table 65: treatment_clinical_handover table
77
Table 66: treatment_investigation table
78
Table 67: treatment_outpatient table
79
Table 69: treatment_patient_dailymedication table
80
81
Table 71: treatment_surgery tableadd
82
Table 73: patient_addiction table
83
4.8. User Interface Design
User interface (UI) design focuses on creating easy-to-use visual or audio interface elements to
help users interact with a site, app, or other computer systems in a user-friendly manner.
On this page the user needs to enter the USERNAME and PASSWORD and press on LOGIN
button which gets the user to the HOME page.
84
Figure 34: Patient Registration Screen UI
85
Figure 35: Doctor Registration Screen UI
86
Figure 36: Services Screen UI
87
Figure 37: Cleaning Service Screen UI
88
Figure 38: Staff Management Screen UI
89
Figure 39: Register Employee Screen UI
90
Figure 40: Daily Attendance Screen UI
91
Figure 41: Departments Screen UI
92
Figure 42: Reports Management Screen UI
93
Figure 43: Medicine Report Screen UI
94
4.9. Access Control
Access control is a data security process that enables organizations to manage who is authorized
to access corporate data and resources. Secure access control uses policies that verify users are
who they claim to be and ensures appropriate control access levels are granted to users.[7]
Implementing access control is a crucial component of web application security, ensuring only
the right users have the right level of access to the right resources. The process is critical to
helping organizations avoid data breaches.
For this project we decided to use role-based access control. Role-based access control or role-
based security is an approach to restricting system access to authorized users. It is suitable for
our project because our system has different type of user which has different level access and
authority. Each role in the system has privileges and restrictions.
95
CHAPTER FIVE: IMPLIMENTATION AND TESTING
5.1. Introduction
The implementation phase is the practical realization of the software design. It involves writing
the actual code based on the design specifications, integrating different modules or components,
and ensuring that the entire system is configured properly. This phase includes utilizing
configuration management tools and practices to effectively manage changes and control the
software development process. Testing is also critical phase that runs in parallel with
implementation. It includes several types of tests.
This part of the project contains Coding, Software testing and testing procedures like Unit testing,
Integration testing and System testing.
5.2. Coding
Coding refers to the process of translating design specifications into a computer program. It is a
crucial phase in the software development lifecycle that involves writing precise, structured, and
readable code based on the requirements and design specifications identified during earlier stages
of development. We use different tools to develop this project. Some of them are:
Database MYSQL
Server Apache
96
5.3. Software Testing and Procedures
To demonstrate to the developer and the customer that the software meets its requirements.
To discover situations in which the behavior of the software is incorrect, undesirable, or does
not conform to its specification.
We test the software process activities such as Design, Implementation, and Requirement Engineering
using unit testing, integration testing because design errors are very costly to repair once system has
been started to operate. Therefore, it is quite obvious to repair them at early stage of the system.
97
5.3.2.2. Integration Testing
After our individual module was tested out, we go to the integrated to create a complete system.
This integration process involves building the system and testing the resultant system for
problems that arise from component interactions. We have applied top-down strategy to validate
high-level components of a system before design and implementations have been completed.
Because, our development process started with high-level components and we worked down the
component hierarchy.
98
CHAPTER SIX: CONCLUSION AND RECOMMENDATIONS
6.1. Summary and Conclusion
The hospital management system is a comprehensive software solution designed to streamline
and optimize various administrative and operational tasks within a healthcare facility. Through
its user-friendly interface and robust features, the system facilitates efficient management of
patient records, appointments, billing, and inventory. It enables seamless communication
between different departments, allowing for coordinated and timely patient care. Moreover, the
system ensures compliance with regulatory standards and data security protocols, safeguarding
sensitive patient information. Overall, the hospital management system significantly enhances
the overall efficiency and quality of healthcare services, leading to improved patient experiences
and better healthcare outcomes.
99
Whenever we have shown our vision and work about the project to anyone like our
teachers, friends, they always told us that we have taken a very big task to get completed
in very short time and to do that it takes courage and also they all given best wishes and
support and believed in us that we can do it.
Building a software application for a hospital to cover all the aspects and putting the
whole manual system into a computer based system with a proper and user-friendly view
and generating a proper output taught us how different is the real world.
Working in a team made us realize the importance of team spirit, unity and patience. It
taught us how to utilize the strengths of every individual in a team and also how to
support each other in weak areas of one.
We faced many difficulties but having a good advisor makes everything much easier,
every time we were stuck somewhere our guide was there to help us, challenged us to
solve the queries on our own and in the end always used to give us the finest solutions.
We learned to solve real problems, learned lot of new techniques and technologies
during this period. This project helped us to get out of our comfort zone, learn new
technologies and their implementations.
We have strengthened our knowledge about the languages such as PHP and HTML.We
have learned that little changes in the basic syntax can do a lot of complex tasks.
The last 4 months were a roller coaster ride for us consisting of knowledge gain,
experience, life lessons, team work, real time dealing. We are grateful to our department
for such an amazing experience.
10
6.2. Recommendation
Efficient utilization of the hospital management system can be ensured through a multifaceted
approach. Providing continuous training sessions and support for the staff members will
empower them to navigate the system seamlessly. Regular system updates and maintenance
checks are imperative to keep the software robust and aligned with the latest industry standards.
Exploring the possibilities of integrating the hospital management system with other healthcare
systems, such as electronic health records and diagnostic systems, can streamline data
management and enhance the overall operational efficiency of the hospital. Prioritizing
flexibility and scalability in the system architecture will enable the hospital to adapt to the
changing needs of the healthcare environment. Rigorous implementation of data security
measures and compliance with privacy regulations will be instrumental in safeguarding patient
data and maintaining the trust of the patients. Creating a systematic feedback loop to gather
inputs from stakeholders and incorporating these insights into system enhancements will foster
continuous improvement. Establishing comprehensive disaster recovery plans and regularly
testing backup systems will ensure data integrity and minimize the impact of potential system
failures. Regular cost-benefit analyses will aid in evaluating the return on investment and the
overall impact of the system on the hospital's operations and patient care services.
10
I. REFERENCES
1. National Academies of Sciences, Engineering, and Medicine. 2021. Implementing High-
Quality Primary Care: Rebuilding the Foundation of Health Care. Washington, DC: The
National Academies Press. https://doi.org/10.17226/25983.
2. Griffith, J. R., & White, K. R. (2005, May). The revolution in hospital management.
In CASES (Vol. 39, No. 1, p. 239).
3. Balaraman, P., & Kosalram, K. (2013). E-hospital management & hospital information
systems-changing trends. International Journal of Information Engineering and Electronic
Business, 5(1), 50.
4. Cohen, H. J., Feussner, J. R., Weinberger, M., Carnes, M., Hamdy, R. C., Hsieh, F., ... &
Lavori, P. (2002). A controlled trial of inpatient and outpatient geriatric evaluation and
management. New England Journal of Medicine, 346(12), 905-912.
5. Booch, G., Maksimchuk, R. A., Engle, M. W., Young, B. J., Connallen, J., & Houston,
K. A. (2008). Object-oriented analysis and design with applications. ACM SIGSOFT
software engineering notes, 33(5), 29-29.
6. Torre, D., Labiche, Y., Genero, M., & Elaasar, M. (2018). A systematic identification of
consistency rules for UML diagrams. J. Syst. Softw., 144, 121-142.
7. https://www.fortinet.com/resources/cyberglossary/access-control
10
II. APPENDIX
APPENDIX A: Sample code for database connection
<?php
$con_servername = "localhost";
$con_username = "root";
$con_password = "";
$database = "hospital_management_system";
$connection = mysqli_connect($con_servername, $con_username, $con_password, $database);
?>
10
APPENDIX B: Sample script code for Surgery Consent
<?php
// A form to be filled before Surgery
include('connect.php');
$current_date = date("Y-m-d");
$current_time = date("H:i");
$patient_id = $_GET["patient_id"];
$treatment_id = $_GET["treatment_id"];
$view_patient = "SELECT * FROM patient WHERE Patient_id = $patient_id";
$result_patient = mysqli_query($connection, $view_patient);
if(mysqli_num_rows($result_patient) > 0)
{
while ($row_patient = mysqli_fetch_assoc($result_patient))
{
$patient_name = $row_patient["Patient_Name"];
$patient_relative_name = $row_patient["Patient_Relative_name"];
$patient_relative_rel = $row_patient["Patient_Relative_Relation"];
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Surgery Consent</title>
</head>
<body class="container" style="font-family: Times New Roman; font-size: 16px;">
<img src="../images/background.jpg" align='right'>
<h2>
<span style="padding-left: 15px; padding-right: 15px;">
CONSENT FOR SURGERY
</span>
</h2>
<br><br>
<form action="../Surgery_Consent_Add.php" method="POST">
<input type="hidden" value="<?php echo $treatment_id;?>" name="treatment_id">
<input type="hidden" value="<?php echo $patient_id;?>" name="patient_id">
<input type="hidden" value="<?php echo $login_name;?>" name="admin_name">
<textarea rows="10" cols="40"><?php echo $patient_name;?></textarea>
<div class="justify-content-center" style="padding-top: 12%">
Hereby I/my relative<input type="text" value="<?php echo $patient_name;?>" readonly="">
(Patient Name), give my full consent as an act of my own free will to undergo the following
surgery<input type="text" name="surgery_name" required="" >(Surgery name) at <b>HMS
10
Hospital</b> under the supervision and guidance ofDr.<input type="text" name="doctor_name"
required=""> and his team of assistants, nurses and hospital staff as deemed necessary.<br><br>
I have been explained in the language known & understood by me about the nature of the
surgery being performed, its benefits and costs, risks associated with, other alternatives and its
prognosis.<br>
Risks: <input type="text" name="surgery_risks"><br>
Benefit: <input type="text" name="surgery_benefit"><br>
Alternatives: <input type="text" name="surgery_alt"><br>
<ul><li> I have been explained clearly that my Surgery is not totally safe and that Surgery can
be risk to life of healthy person, despite the necessary & proper steps are taken.
</li><li>
I understand my doctors have explained to me that excessive bleeding, infection, cardiac
arrest,pulmonary embolism and complication like this can arise suddenly and unexpectedly while
undergoing any investigation/Surgery.
</li>
<li>
I give consent and agree to the removal & disposal of body parts/tissues by the hospital
Authority that may be above - mentioned surgery.
</li>
<li>
I have read the above writing has been explained in detail to me. I have understood that foresaid
and I am willingly giving my consent without any pressure & taking every necessary precaution
& giving adequate care & treatment, above mentioned outcome occurs in the hospital, respective
Surgeon or Staff member are not held responsible</li> </ul>
<table>
<tbody>
<tr>
<td>
Name of Patient/Relative/Witness
<input type="text" value="<?php echo $patient_relative_name;?>">
</td>
<td>Name of Surgeon:<input type="text" name="surgeon_name" required="" ></td>
</tr>
<tr>
<td colspan="2"> Sign of:Patient/Relative/Witness<input type="text" readonly="" >
</td>
</tr>
<tr>
<td>Relation with Patient:
<input type="text" value="<?php echo $patient_relative_rel;?>">
10
</td>
<td>Sign of Surgeon:<input type="text" readonly=""></td>
</tr>
<tr>
<td>Date:<input type="text" readonly=""></td>
<td>Date:<input type="date" value="<?php echo $current_date;?>"></td>
</tr>
<tr>
<td>Time:<input type="text" readonly=""></td>
<td>Time:<input type="time" value="<?php echo $current_time;?>"></td>
</tr>
</tbody>
</table>
</div>
<input type="submit" value="Next">
</form>
</body>
</html>
10
APPENDIX C: Sample script code for Add Surgery Consent
<?php
// To insert the surgery form into database
include('connect.php');
if($_POST)
{
$login_name = $_POST["admin_name"];
$treatment_id = $_POST["treatment_id"];
$patient_id = $_POST["patient_id"];
$surgery_name = $_POST["surgery_name"];
$doctor_name = $_POST["doctor_name"];
$surgery_risks = $_POST["surgery_risks"];
$surgery_benefit = $_POST["surgery_benefit"];
$surgery_alt = $_POST["surgery_alt"];
$surgeon_name = $_POST["surgeon_name"];
$add_surgery_consent = "INSERT INTO treatment_surgery "
. "(Treatment_id , Doctor_name , Surgery_name , Surgeon_name , "
. "Surgery_Risks , Surgery_Benefits , Surgery_Alternatives) VALUES "
. "($treatment_id , '$doctor_name' , '$surgery_name' , '$surgeon_name' , "
. "'$surgery_risks' , '$surgery_benefit' , '$surgery_alt')";
if(mysqli_query($connection, $add_surgery_consent))
{
header("Location:Inpatient_Treatment.php?patient_id=$patient_id&admin_name=$login_name);
}
else
{
echo "<script>alert('Surgery Consent details Not Inserted');"</script>";
}
}
10