Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 83

Undergraduate Project Report

2022/23

Development of an application storing patients'


data

Name: Sijie Zou


School: International School
Class: 2019215105
QMUL Student No.: 190900621
BUPT Student No.: 2019213171
Programme: Telecommunications
Engineering with
Management

Date: 27-04-2023
Development of an application storing patients' data

Table of Contents
Abstract..............................................................................................................................3
Keywords............................................................................................................................3
Chapter 1: Introduction.......................................................................................................5
Chapter 2: Background.......................................................................................................9
2.1 Introduction to Java...............................................................................................................9
2.1.1 Java language.......................................................................................................................................9
2.1.2 IntelliJ IDEA........................................................................................................................................10
2.2 Swing..................................................................................................................................11
2.3 MySQL.................................................................................................................................11
2.3.1 MySQL................................................................................................................................................11
2.3.2 SQL language......................................................................................................................................12
2.4 JDBC....................................................................................................................................12
Chapter 3: Requirements Analysis and System Design.......................................................14
3.1 Requirement analysis..........................................................................................................14
3.1.1 Business process................................................................................................................................14
3.1.2 Functional requirements analysis.......................................................................................................15
3.1.3 Performance requirements analysis...................................................................................................16
3.2 System design......................................................................................................................16
3.2.1 Database design.................................................................................................................................17
3.2.2 Process design....................................................................................................................................22
3.2.3 Java design and conceptual class diagram.........................................................................................22
3.2.4 Public interface design.......................................................................................................................23
3.2.5 Detailed functional design.................................................................................................................24
3.2.6 Interface design.................................................................................................................................27

Chapter 4: Implementation and Results............................................................................28


4.1 Programming.......................................................................................................................28
4.1.1 Public modules...................................................................................................................................28
4.1.2 Basic information module..................................................................................................................29
4.1.3 Administrator.....................................................................................................................................32
4.1.4 Doctor................................................................................................................................................36
4.1.5 Nurse..................................................................................................................................................38
4.1.6 Receptionist.......................................................................................................................................38
4.1.7 Patient................................................................................................................................................38
4.2 Encryption technology.........................................................................................................40
4.3 System Testing.....................................................................................................................41
4.3.1 Testing process...................................................................................................................................41
4.3.2 Test case design.................................................................................................................................41
4.3.3 Test result analysis.............................................................................................................................43

Chapter 5: Conclusion and Further Work...........................................................................44


5.1 Conclusion...........................................................................................................................44
5.2 Further work.......................................................................................................................46
References........................................................................................................................47

1
Development of an application storing patients' data

Acknowledgement............................................................................................................48
Appendix..........................................................................................................................49
Disclaimer.................................................................................................................................49
Project specification..................................................................................................................50
Early-term progress report........................................................................................................55
Mid-term progress report..........................................................................................................59
Supervision log..........................................................................................................................63
Additional Appendices..............................................................................................................65
Risk and environmental impact assessment......................................................................78

2
Development of an application storing patients' data

Abstract
Computers have become a necessity for people's lives and careers, playing a significant part
in many industries as science and technology improve in today's society. As civilization
advances, people's knowledge of their health gradually rises, and the healthcare sector is
expanding quickly. The modernization and informatization of hospital management has
become the need of the times. Hospitals are currently beginning to pay more attention to
modernizing the way that medical institutions are managed. The hospital management system
is thus established.

Hospital Management System, also known as HMS, is an online sharing of patient treatment
information, hospital administration, and personnel management information in all functional
departments of the hospital, mainly through advanced computers, the Internet, and other
advanced technology solutions. Compared with the traditional manual management mode, its
advantages are obvious, such as, the management efficiency is greatly improved, the
information retrieval is more convenient and more reliable, the number of information storage
is increased, and the daily management is more controllable. The system is responsible for the
integration, preservation, processing, and sharing of all information, and provides functional
services to authorized personnel so that they can perform their functional operations and view
relevant data.

This application includes five sub-modules, classified by user types, which are administrator,
doctor, nurse, receptionist, and patient. It also includes the implementation of user information
adding, modifying, deleting, searching, viewing, relationship binding, appointment, and
permission management functions. In addition, the project uses Base64 technology to encode
some of the information to ensure safe data storage. The project as a whole was developed
using Java and MySQL technologies.

Keywords
Java, MySQL, Hospital Management System

3
Development of an application storing patients' data

摘要
当今社会,科学技术水平日趋先进,计算机已然成为人们生活、工作的必需品,
在各个领域发挥着重要作用。随着社会的进步,人们的健康意识逐步提高,保健产业
正迅猛发展,医院的现代化和信息化管理成为时代发展的需要,也逐渐受到医院的重
视,医院管理系统应运而生。
医院管理系统,简称 HMS,主要借助先进的计算机、互联网等先进技术方案,将医
院各职能科室病人诊疗信息、医院的行政管理和人事管理信息进行在线共享。相比传
统的人工管理模式,其优点显而易见,例如,管理的效能大幅提升、信息检索更为便
利、信息的可靠性更高、信息的存储数量更多、便于日常管理等。系统负责所有信息
的整合、保存、处理、共享,为系统授权人员提供相关功能服务,使用户能清楚地进
行自己的功能操作,查看相关数据。
本应用包括五个子模块,按用户种类分类,分别是管理员、医生、护士、分诊处
和病人。同时包括用户信息的添加、修改、删除、搜索、查看、关系绑定、预约、权
限管理等功能的实现。此外,该项目使用 Base64 技术对部分信息进行编码,以保证数
据的安全存储。项目整体采用 Java 和 MySQL 技术完成开发。

关键词
Java,MySQL,医院管理系统

4
Development of an application storing patients' data

Chapter 1: Introduction
With the progress of society and the development of science and technology, information
technology has been widely used in various fields and has become an indispensable tool in all
walks of life, which makes hospital management also enter the era of information technology.
The hospital management system has to be updated to provide the infrastructure and
technological support required for current hospital operations. The goal of modernizing the
hospital management system is to strengthen hospital administration through the use of more
cutting-edge, scientific, and standardized methods, increase hospital effectiveness, raise the
standard of medical care, and create a new perception of the modern hospital—which is also
the unavoidable course for future hospital growth.[1] Therefore, the management mode of
modern hospitals has also undergone great changes and has gradually changed from the
traditional empirical management mode to the modern management mode.

Modern hospital management is the general term for a series of activities such as planning,
organizing, directing, supervising, and regulating with modern knowledge and achievements
of natural science, social science, and management science applied to hospital management to
promote the modernization and identification of hospital management. In other words, the use
of modern scientific thinking, organization, methods, and means to effectively manage the
hospital's large medical technology and economy creates the best social and economic
benefits.

The primary task of the hospital management system (HMS) is to complete hospital
administration and transaction processing, free staff from heavy manual labour, reduce the
labour intensity of transaction personnel, greatly improve staff efficiency, and assist hospital
leaders to make efficient HMS covers a wide range of areas, including outpatient management
systems, inpatient management systems, etc. One of the important components of modern
hospital management is personnel and case management, which is the foundation and core of
hospital management.

Before the advent of the information age, the paper has been the only carrier of personnel and
case information, but with the increase in information year by year, the paper brings many
problems to management: for example, the increase in file shelves, additional storage, file
search, protection, etc., consuming a lot of hospital manpower, material, and financial
resources, which is a problem faced by many hospitals. The more important problem is the
method of managing paper archives, which is extremely inefficient, and difficult to find, and
5
Development of an application storing patients' data

the information cannot be used effectively. Therefore, standardized records management is


not only a basic requirement for hospitals but also a means and credential for patient and
community monitoring.

A holistic hospital management system requires the ability to extract, integrate, display store,
and analyse medical staff and patient data and information. Improving the quality and
efficiency of this process is the key to improving the overall hospital. An advanced, holistic
hospital information system should have the following characteristics.

i. Clinical information systems need to be extremely responsive.

ii. The system application software should be simple and easy to use, and at the same time,
able to enhance the efficiency and quality of clinical work.

iii. All patient-related data and information should be collected directly from the patient, not
transcribed on paper, and entered into the system.

iv. Data extracted from the computer system should be integrated into the hospital system in
real time, and these objective data need to be accurate, reliable, and immediate.

v. The hospital information system should have a unified user index with a unified
evaluation identification mechanism, e.g.: a single patient number, etc.

vi. With a sound data and information security assurance system, which can reduce the
workload of clinical daily document establishment.

vii. The holistic information should provide important support for clinical patient diagnosis
and treatment and medical management directly.

The construction of the hospital management system should adopt a centralized and
decentralized data management model, which will greatly accelerate the data transmission
speed, system security, and low-cost system maintenance will have a reliable technical
guarantee. The information is extracted and presented in a reasonable way to solve the
traditional system integration problem of multiple access to multiple systems.

In addition, the increasing utilization of computers and the decreasing number of paper-based
offices directly lead to many important data being stored on computers, which places higher
demands on the security of data and information. For the hospital system, the security issue of
data leakage and outsider access cannot be tolerated. Therefore, the work on data
confidentiality is particularly important. Encoding technology is a major method to prevent
data leakage. Using the corresponding technology, certain important data is transformed so
6
Development of an application storing patients' data

that it cannot be recognized by the outside world and transmitted to it. In order to ensure the
security and trustworthiness of the data throughout the process, the access rights, encryption,
and security level of the data need to be controlled. In this project, we will create specific
operations and permissions related to data access for people with different identities in the
hospital, and ensure a secure data storage system.

Main Task:

This project focuses on the building of a hospital management system after the requirement
analysis to achieve the following tasks.

i. Research and build the platform and user-friendly GUI interface. The Java language
chosen for this project generates a better result for the construction of the GUI, which
contains GUI development packets, mainly Swing.

ii. Create a database for storing user information. The major goal of this step is to identify the
different informational categories, data types, etc. that the user information contains. The
patient information, for instance, needs to include the patient's name, ID number, address,
and phone number. The data will be gathered using self-created virtual data. The database
access and management language of choice is SQL (Structured Query Language).

iii. Implement user authentication and related actionable functions by code. For the hospital
background in this project, the users are simply divided into five categories: administrator,
doctor, nurse, receptionist, and patient. What they have in common is that they will all be
assigned unique IDs and set passwords for user authentication. The rest of the functions
can be classified into the following categories.

Administrator: can create, edit and delete doctor, nurse, and receptionist data. Also, they
can process patient requests for the release of rights.

Doctor: can create, edit and delete patient data.

Nurse: can edit patient data.

Receptionist: can make an appointment with a doctor for a patient.

Patient: can view only their own data and that of their bound family members. Also,
patients can match the personal information of registered patients and bind relationships
with family members according to the query mechanism. After leaving the current

7
Development of an application storing patients' data

address, the patient can remove functional privileges and self-deletion and update user
information.

iv. Storing security-sensitive data. The main functional component of the Java program and
the SQL-written information storage database will now be fully integrated. In order to
build information security, it is important to consider privacy protection, data isolation,
identity authentication, and authority management. Different user identities have varying
levels of access to the features and data in this application system, and these identities will
be specifically identified and isolated through authentication ID and password to ensure
data confidentiality.

v. Final application with the patients’ data. The project is a standalone application and the
final result will be presented as an executable file.

8
Development of an application storing patients' data

Chapter 2: Background
This project is based on Java programming and uses the Swing package for GUI architecture.
The database side uses SQL statements and connects to Java via JDBC.

2.1 Introduction to Java

2.1.1 Java language

Java, as one of the most common programming languages, has many advantages of its own. It
can be used on multiple platforms for multiple objects to complete the relevant language
design. It is also distributed, highly secure, and structurally neutral.[2]

a) Simplicity of the Java language. Similar to the C or C++ language, programmers can learn
it in a short time when they apply such software. In addition, compared with C++, Java is
not complicated to understand and is simple and easy to understand. In particular, the Java
language does not involve pointers, while the use of interfaces instead of multiple
inheritances, you can also get the relevant waste promptly, the programmer does not need
to devote special time to deal with memory.

b) Java language object-oriented. Object-oriented is the basis of the Java language and is also
an important feature of the Java language. Object-oriented means that the object is the
basic unit, including properties and methods. The state of the object is expressed in
attributes, and the behaviour of the object is expressed in methods. Object-oriented
technology makes the development of applications easy to use and saves code.

c) Java language has distributed characteristics. In the process of Internet development, this
language is extremely widely used in all Java application interfaces, there is a network
application programming interface, and its main role is to program the class library.

d) The Java language is robust. In Java language, it has its strong type system, automatic
scrap collection pattern, etc. are important guarantees of such features. Pointer rounding is
important. Also, the security checking system is an important basis for such features.

e) The Java language is highly secure. This language is used extensively in the network
environment. Therefore, the security requirements are also relatively high. As it happens,
the Java language does this. In addition, it is a high-security management model.

9
Development of an application storing patients' data

f) From the structure of this language, it has a neutral structure. Based on the Java platform,
such programs can be converted into a neutral bytecode format. Thereafter, any file can be
kept running on such a platform. This method is widely used in some heterogeneous
network environments and software distribution stages.

g) The Java language itself has portability. This feature was developed based on the
neutrality of the structure. In addition, the application of this Java language specifies the
length of different types of data. The language also has major advantages in terms of
suppressiveness. This language environment is done on the basis of ANSIC.

h) The power of Java. The Java language has a powerful function when compared with other
high-level scripting languages, and the rapid development of JIT compilation technology
makes the functions of Java and C++ close to each other.

i) Java language has multi-threaded features. The multi-threaded mechanism allows the
application to perform several tasks in parallel at the same time. The Java language
provides synchronization mechanisms between multiple threads, and these corresponding
synchronization mechanisms can well ensure that different threads can share data
correctly. The multi-threaded mechanism allows the program to have better interactivity
and real-time.

j) Java has dynamic features. The ability of the Java language to change with the
environment is one of its design objectives. The Java runtime environment can
dynamically load the classes required for Java programs, and the classes can also be
loaded over the network, which is helpful for software updates. Classes in Java can do
runtime type checking and have a runtime representation.

The advantages of the Java language itself make it more reliable, which can also effectively
reduce the maintenance cost of the system. At the same time, the Java language itself has
comprehensive support for objects and the platform-embedded API can make the system
development cost significantly reduced. The feature of running anywhere with every
compilation of the language can make it have a development structure and cross-platform
low-cost operation mode.[3]

2.1.2 IntelliJ IDEA

IntelliJ IDEA is an integrated development environment for the Java programming language.

10
Development of an application storing patients' data

IntelliJ IDEA is mainly used as a development tool to support Java, Scala, Groovy, and other
languages, and also has support for the current mainstream technologies and frameworks,
specializing in enterprise applications, mobile applications, and web applications. It may be
noted that Java development tools are excellent, particularly in terms of intelligent code
assistant, automatic code prompting, refactoring, JavaEE support, all types of versioning tools
(Git, SVN, etc.), JUnit, CVS integration, code analysis, and creative GUI design. In terms of
language support, IDEA supports basic JVM, such as Java and Groovy; and SQL-like
languages, such as PostgreSQL, MySQL, Oracand le, and SQL Server. IDEA’s main
advantages, compared to Eclipse, are the following. The first is its powerful integration
capabilities, such as Git, Maven, Spring, and other tools; the second is the prompting function
is fast and easy, prompting a wide range of language features, the third is more intelligent
shortcuts and code templates, in addition to its precise search capabilities.

2.2 Swing

Swing is a toolkit for the design and development of interfaces for Java applications. Based
on the AWT, Swing can be used to implement different platform application appearance
styles. Essentially, Swing belongs to the Java program components, you can flexibly create
graphical user interface (GUI) components, such as tables, text boxes, etc., which is part of
the JAVA API. Swing developers only need to write a small amount of code and can use the
powerful features of Swing to design a beautiful user interface. Swing mainly features
lightweight components and can be inserted into the appearance of components.

2.3 MySQL

2.3.1 MySQL

As an open-source database management system (DBMS) that can be excellently applied to a


variety of systems, MySQL allows to keep the data existing in the database. It is powerful,
easy to use, easy to manage, fast, secure, and reliable. And users can write programs to access
MySQL databases using many languages. Nowadays, many websites, corporate LANs, and
personal databases use MySQL as the backend database.

11
Development of an application storing patients' data

2.3.2 SQL language

Structure Query Language (SQL) is a structured query language that can manipulate, define,
query, and control data, and is highly efficient, simple, and powerful. At the same time, SQL
is non-procedural. SQL operates on a collection of data, and the collection can be the input of
SQL, and also the output of SQL, which makes the SQL statement can use another output
statement as the current input statement. the most core function of SQL language is to realize
the data connection between different types of databases. According to ANSI regulations,
SQL is the standard language for relational database management systems, and SQL
statements can achieve a wide range of functions, such as data modification, data deletion,
and so on. At present, most relational database management systems use SQL language, and
even though more and more databases have extended SQL statements according to their
actual requirements, the standard SQL commands, such as CREATE\DROP, can still perform
all the data operations.[4]

2.4 JDBC

There are three ways to access MySQL database through client-side operation: i) use a third-
party client to access MySQL, such as SQLyog, Navicat, etc., ii) use MySQL's command line
way to access, and iii) access MySQL database through Java.

JDBC, which is Java DataBase Connectivity, is a Java database connectivity technology.


JDBC API is a Java API that can access any type of table data, especially data stored in
relational databases. It is essentially a specification interface for Java applications that execute
SQL statements and consists of a set of classes and interfaces written in the Java language that
send SQL to manipulate the database through coding.

The JDBC API provides a common data access method for Java programming, allowing
developers to access a variety of data sources, such as relational databases, general files, etc.,
relatively freely. At the same time, JDBC technology is like providing an open platform for
Java development, other programming languages, interfaces, and so on can be common in this
platform within a certain range.

JDBC is the standard specification for Java access to databases, and specific implementation
classes are needed to operate the databases, i.e. database drivers. the Java database connection
architecture is the main method to realize the connection between Java applications and

12
Development of an application storing patients' data

databases. For Java programmers, JDBC is the application programming interface, while for
service providers, JDBC is the interface model for connecting to the database. As an
important application programming interface, JDBC sets a standard for programmers to
develop their programs and gives database vendors and third-party middleware vendors a
standard way to connect to databases. The connection principle is shown in Figure 1.

Figure 1 JDBC connection principle

13
Development of an application storing patients' data

Chapter 3: Requirements Analysis and System Design


Requirements analysis is a crucial link between the phases of system analysis and software
design. The essential basis for software design, implementation, testing, and maintenance is
the requirements specification. On the one hand, the requirements analysis checks and
modifies them from a software perspective using the system definition and project planning as
the fundamental starting points for analysis operations. This chapter focuses on a detailed
analysis of the operational processes used by the hospital management system and the overall
architecture created as a result of the investigation.

3.1 Requirement analysis

Before the design and implementation of the system, this project will analyse the usage
scenarios and the actual needs of the target users. A specific description of functional
categories, types and interrelationships will be obtained, mainly by means of observations, to
lay the foundation for later work.

3.1.1 Business process

The business process is shown in Figure 2 for the objects involved in the system and each
business.

Figure 2 Business process

14
Development of an application storing patients' data

3.1.2 Functional requirements analysis

This project initially conducted a lot of background reading, referring to existing hospital
management systems on the market, and also observing the needs of the target users, so that
the functions were analysed according to client classification.

a) Common functions

Login. Each user is assigned a unique ID and is authenticated by a password set by the
user.

Personal information entry. Users' personal information, including name, age, address,
etc., should be created and written to the database by themselves or by the corresponding
responsible person.

b) Doctor’s side

Each doctor should belong to a certain department and the information will be written to
the database of the corresponding department. Doctors can perform writable operations to
create, edit and delete patients, plus read-only operations to search and view. For doctors,
the objects that can be manipulated and displayed should be the patients under their
responsibility.

c) Nurse’s side

Nurses can perform writable operations for editing patients, as well as read-only
operations for searching and viewing.

d) Receptionist’s side

Receptionists can make appointments with patients and doctors, which provides one-to-
one contact and storage between patients and doctors. For nurses, all patients are available
for operation and display.

e) Patient’s side

Patients can perform read-only operations to view only their own information. In addition,
patients can search for the names of family members or guardians registered with the
hospital to bind them to each other. This allows the patient to view both their own data
and that of the person to whom they are bound.

f) Administrator’s side

Administrators can manage the information of all doctors and nurses in this hospital,
15
Development of an application storing patients' data

including creating, editing, deleting, searching, and viewing. Also, they can receive
patients’ request for releasing account rights. The actions of withdrawing the request and
completing the releasing operation, which will delete this patient’s data and initialize the
relationship for his/her family member, are included in this function. But there is no read-
and-write permission for patients’ other detailed information.

3.1.3 Performance requirements analysis

a) Rationalized modular design

When designing modules, the basic characteristics of different hospitals should be fully
taken into account. It is also important to establish a normalized connection between the
subsystems.

b) Efficient and timely transmission and sharing of information

When applying the computer system, information sharing can be realized. When
information is entered in a certain section, other sections can also view the corresponding
information in a timely manner.

c) Easy operation of the system

The system does not need to record information instructions in the process of application,
the GUI interface is simple, and the whole operation method is extremely simple and
efficient.

3.2 System design

The effectiveness and implementation of the information management system are directly
impacted by the architecture of the database and Java code structure. The efficiency of data
storage and operation, as well as the consistency and unity of the data, can all be improved by
a decently constructed structure, which can also increase the code's reusability.

The database design and Java code used in the hospital management system are based on the
findings of the requirement analysis in this section.

16
Development of an application storing patients' data

3.2.1 Database design

a) Concept design

The entities planned out in the system are i) administrator information entity ii) doctor
information entity iii) patient information entity iv) appointment information entity v)
information entity of each department vi) release rights information entity. Specifically, 15
tables were created to record data.

The relationship between them is shown in Figure 3.

Figure 3 E-R diagram

17
Development of an application storing patients' data

18
Development of an application storing patients' data

b) Logical structure analysis

i. Administrator information table

The administrator information table includes the administrator's username and password,
and its attributes are shown in Table 1. Set the administrator's number as the primary key.

Table 1: Administrator information table

PRI-
FIELD DATA FOREIGN KEY
NULL MARY REMARK
NAME TYPE RELATIONSHIP
KEY
username varchar(15) ×
password varchar(15) ×

ii. Doctor information table

The doctor information table includes the doctor’s count, joining date, ID, name, age, etc.,
and its attributes are shown in Table 1. Set the doctor’s count as the primary key.

Table 1: Doctor information table

PRI-
FIELD DATA FOREIGN KEY
NULL MARY REMARK
NAME TYPE RELATIONSHIP
KEY
count int(11) × √ AUTO_INCREMENT
date varchar(10) ×
id varchar(20) ×
name varchar(30) ×
age int(5) ×
gender varchar(8) ×
blood varchar(4) ×
dept varchar(20) ×
phone varchar(15) ×
email varchar(30) ×
status varchar(10) ×
address varchar(20) ×
room int(11) ×
username varchar(20) ×
password varchar(40) × Base64 Encode

19
Development of an application storing patients' data

iii. Patient information table

The patient information table includes the patient’s count, joining date, ID, name, age,
etc., and its attributes are shown in Table 1. Set the patient’s count as the primary key, the
doctor in charge as the foreign key referencing doctor’s name.

Table 1: Patient information table

PRI-
FIELD DATA FOREIGN KEY
NULL MARY REMARK
NAME TYPE RELATIONSHIP
KEY
AUTO_INCRE-
count int(11) × √
MENT
date varchar(10) ×
id varchar(20) ×
name varchar(30) ×
age int(5) ×
gender varchar(8) ×
phone varchar(15) ×
disease varchar(20) ×
status varchar(10) ×
address varchar(20) ×
room int(11) ×
DEFAULT
username varchar(20)
0
DEFAULT
password varchar(40) Base64 Encode
'MA=='
relation- DEFAULT
varchar(20)
ship 0
doctor varchar(20) × doctor (`name`)

20
Development of an application storing patients' data

iv. Nurse information table

The nurse information table includes the nurse’s count, joining date, ID, name, age, etc.,
and its attributes are shown in Table 1. Set the nurse’s count as the primary key.

Table 1: Nurse information table

FIELD DATA PRIMARY FOREIGN KEY


NULL REMARK
NAME TYPE KEY RELATIONSHIP
AUTO_INCRE-
count int(11) × √
MENT
date varchar(15) ×
id varchar(20) ×
name varchar(30) ×
age int(5) ×
gender varchar(8) ×
blood varchar(4) ×
phone varchar(17) ×
email varchar(40) ×
status varchar(10) ×
address varchar(30) ×
username varchar(20) ×
password varchar(40) × Base64 Encode

v. Appointment information table

The appointment information table includes the patient’s name, doctor’s name, and room
number, and its attributes are shown in Table 1. Set the doctor’s name as the foreign key
referencing doctor’s name, and the patient’s name as the foreign key referencing patient’s
name.

Table 1: Appointment information table

FIELD DATA PRIMARY FOREIGN KEY


NULL REMARK
NAME TYPE KEY RELATIONSHIP
dName varchar(20) × doctor (`name`)
pName varchar(15) × patient (`name`)
room int(11) ×
21
Development of an application storing patients' data

vi. Receptionist information table

The receptionist information table includes the receptionist’s count, joining date, ID,
name, age, etc., and its attributes are shown in Table 1. Set the receptionist’s count as the
primary key.

Table 1: Receptionist information table

FIELD DATA PRIMARY FOREIGN KEY


NULL REMARK
NAME TYPE KEY RELATIONSHIP
AUTO_INCRE-
count int(11) × √
MENT
date varchar(15) ×
id varchar(20) ×
name varchar(30) ×
age int(5) ×
gender varchar(8) ×
blood varchar(4) ×
phone varchar(17) ×
email varchar(40) ×
status varchar(10) ×
address varchar(30) ×
username varchar(20) ×
password varchar(40) × Base64 Encode

vii. Release rights information table

The release rights information table is to record the patient’s information, and who is
going to lose rights, including the patient’s ID, name, username, and relationship, and its
attributes are shown in Table 1. Set the ID as the foreign key referencing patient’s ID.

Table 1: Release rights information table

FIELD DATA PRIMARY FOREIGN KEY


NULL REMARK
NAME TYPE KEY RELATIONSHIP
id varchar(20) × patient (`id`)
name varchar(20) ×
username varchar(20) ×
relationship varchar(20) ×

22
Development of an application storing patients' data

viii.Department information table

The department information table is to record the information of doctors belonging to


their respective departments, and its attributes are shown in Table 1. Set the doctor’s ID as
the primary key, and also as the foreign key referencing doctor’s ID.

Table 1: Department information table

FIELD DATA PRIMARY FOREIGN KEY


NULL REMARK
NAME TYPE KEY RELATIONSHIP
date varchar(15) ×
id varchar(20) × doctor (`id`)
name varchar(30) ×
age int(5) ×
gender varchar(8) ×
blood varchar(4) ×
dept varchar(20) ×
phone varchar(17) ×
email varchar(40) ×
status varchar(10) ×
address varchar(30) ×
room int(11) ×
username varchar(20) ×

3.2.2 Process design

For the subsequent Java programming of the system functions to be performed, the flowcharts
created initially can show the steps and sequence of execution of each function of the system,
as well as the inputs and outputs of the system. The flowcharts can be seen in Appendix 1.

3.2.3 Java design and conceptual class diagram

For the classes involved in Java programming, I conducted the system outline design and
framework design to obtain the UML class diagram (Unified Modelling Language). It lists the
main functional categories in the project system and illustrates the classes to be implemented
in Java programming and their characteristics, the relationship and structure between entities,
23
Development of an application storing patients' data

and other information for the subsequent class creation. The diagram is shown in Appendix 2.

3.2.4 Public interface design

a) Connector public class

All links to the database are connected through the JDBC database connection pool.
Database connection pooling technology can effectively prevent frequent access to the
database by multiple users, greatly reducing the database connection, releasing the
bottleneck in database performance caused by the connection, and achieving resource
sharing through database connection pooling.

Connector class encapsulates the connection method. It connects to the database through
the DriverManager of JDBC and obtains the database query object through the
PreparedStatement object. Then it implements the database query through the
executequery() method and implements the update and delete of data through the
executeupdate() method.

b) Base64Tools public class

All parts of the system involving passwords are Base64 encrypted and decrypted. Here the
API calls open-source Java security-related third-party extensions Bouncy Castle, and the
password stored in the database are encrypted to ensure data security. The passwords
called by SQL statements and displayed in the interface are decrypted for easy reading.

c) JFrame public class

The JFrame form is a container, which is the carrier of each component in the Swing
packet, therefore, JFrame can be regarded as the container that carries these Swing
components. In this project, the form is created by inheriting from the java.swing.JFrame
class, and then adding components to the form and setting events for the components.
Since the form inherits the JFrame class, it has maximization, minimization, and close
buttons. the form of a Swing component is usually associated with a component and a
container, so after the JFrame object is created, you need to call the getContentPane()
method to convert the form to a container and then add components to the container or set
the layout manager. Usually, this container is used to contain and display components.

d) ActionListener interface

ActionListener interface listens to different event responses, through the user to access the

24
Development of an application storing patients' data

system or click events, double-click events, etc. to achieve the corresponding events to
trigger action, so that the system responds to the behaviour of the user-issued action.

e) exe4j

exe4j is a Java executable file generation tool to help integrate Java applications into the
Windows operating environment. It packages Java source code into a ".jar" format file and
then compiles the jar class file into a ".exe" format executable file that can be run directly
under Windows. Thus, support the program to run directly on multiple platforms.

3.2.5 Detailed functional design

a) Login function

The system through hospital class to achieve the login function, the use of JDBC database
connection pool technology, Connector public class (using the JDBC DriverManager
method to access the database). By executing the SQL statement SELECT, determine
whether the entered user name or ID and password exist. If the return result is empty, the
pop-up window will be prompted and stay in the current interface; if the data is consistent,
it will enter the main interface of the user system.

b) Doctor, nurse, and patient management function

i. Add

The system through addDoctor, addReceptionist, and addPatient classes to achieve the
function of adding users. The system uses functions to encapsulate the added information
and shield the external process of adding information. The basic information of the input
user is realized, mainly including name, address, telephone, etc. The information input by
the user is obtained through the request.getParameter() method. Finally, the data is stored
in the corresponding table through INSERT of SQL statement. In addition, the system
compares and judges the new ID entered with the ID in the database, so as to ensure the
uniqueness of the user ID in the system. If the ID is already occupied, a prompt will be
given to request a reset.

ii. Edit

The system uses updateDoctor, updateReceptionist, and updatePatient classes to achieve


25
Development of an application storing patients' data

the function of modifying user information. Among them, the loadData() function
encapsulates the details of user information, connects to the database through JDBC
technology, and at the same time gets the user information through the executeQuery()
method of the Connector interface, and displays it in the table of JPanel panel. The
corresponding event of the ActionListener interface is triggered after the user modifies the
information. Specifically, the schema of the form is changed through the setModel()
method, setting the new schema to correspond to the matrix in order to make changes to
the information in the form. Then get the number of rows changed by the
getSelectedRow() method, and get the data of each coordinate by the getValueAt()
method. Finally, the data in the database is updated by the SQL statement of UPDATE
operation.

iii. Delete

The system implements the function of deleting user information through the
deleteDoctor, deleteReceptionist, and deletePatient classes. The loadData() function
encapsulates the details of the user information, connects to the database through JDBC
technology, and at the same time acquires the user information through the executeQuery()
method of the Connector interface, and displays it in the table of the JPanel panel. By
entering the user ID that needs to be deleted, the data in the database is eventually deleted
by the SQL statement DELETE operation.

iv. Search

The system implements the search function of user information through searchDoctor,
searchReceptionist, and searchPatient classes. By inputting the name of the user to be
searched, the data in the database is eventually fuzzy searched by the SELECT of the SQL
statement, and an incomplete keyword search can be performed. Finally, the user
information searched is obtained through the executeQuery() method of the Connector
interface and added to the table in the JPanel panel.

v. View

The system implements the user information viewing function through the viewDoctor,
viewReceptionist, and viewPatient classes. Among them, the loadData() function
encapsulates the details of user information, connects to the database through JDBC
technology, executes the SQL statement "SELECT *" to get all the user information, and
displays it in the table of the JPanel panel.
26
Development of an application storing patients' data

vi. Appointment

The system implements the overall appointment function through Appointment,


chooseDoctor, and choosePatient classes. The nurse selects the doctor and patient involved
in the appointment through the chooseDoctor and choosePatient classes. In this case, the
SQL statement SELECT is used to search for doctors by department and patients by fuzzy
search by name. The results of the selection are then stored in the appointment form in the
database by INSERT.

c) Personal information management functions

i. Set the username and password

For patients with only IDs who log in for the first time, the initial username and password
are set by judging that the username and password are empty and creating objects of the
setPassword class for subsequent login operations and other functions. Among them, the
setting information is added into the database by the SQL statement UPDATE.

ii. Modify the password

The system implements the function of password modification through the


changePassword class. Among them, get the input string by the getPassword() method,
and then compare the two input strings by the equals() method to see if they are the same.
If it is the same, the user's password is updated by the SQL statement UPDATE. Here the
password operation also includes Base64 encryption and decryption.

d) Automatic update

The system is automatically updated by the releaseRequest and releaseOperation classes,


i.e., when the patient moves out of the current residence, he/she needs to submit a request
to make the system administrator delete the account and data owned by him/her, and the
bound family relationship will also be deleted. In particular, the releaseRequest class
stores the user information, including name, ID, relationship, etc., that needs to be
processed in the database in the lostright table through the SQL statement INSERT. Next,
the releaseOperation class displays the data from the database table in the interface
through the load() method and the SQL statement SELECT. This allows the administrator
to select the user to be processed for data deletion in the table that has been set up with a
27
Development of an application storing patients' data

specific matrix schema.

e) Interface features

The system's interface using Java GUI design (Swing interface design), where JPanel is
the Swing panel container class, can be added to the JFrame, all the interfaces through the
JFrame to achieve the addition of different forms to achieve modular interface design
effect.

Interface through the windowing design style to make the system interface clean and
simple, convenient for users to use the functions faster, and can enhance resource
allocation and improve efficiency.

f) Department management function

When adding doctors' information, the system will store the doctors in their respective
departmental database at the same time through the SQL statement SELECT to facilitate,
for example, the appointment function and the call of additional functions in the future.

3.2.6 Interface design

At the beginning of the project, I chose Balsamiq Wireframes to create a prototype user
interface, in which the interaction interface and relationships required in the project are
reflected. For example, the initial interface, login and registration, authentication, user
function interface, and operation reminder interface. The results for the prototype can be seen
in Appendix 3.

28
Development of an application storing patients' data

Chapter 4: Implementation and Results


This project uses Java language to build GUI and the logical implementation of specific
functions. After the programming of the system, the project underwent software testing to
ensure its correctness of the system.

4.1 Programming

The specific code implementation of the hospital management system is carried out in Java
according to the design scheme provided earlier, and the design scheme of each functional
module will be explained in detail.

4.1.1 Public modules

a) Connector public class. It is used to implement the required database management, it


completes the driver by waiting for the code segment, completes the association with the
database, and finally attributes the full database access to the static feature. This class
requires mysql-connector-j-8.0.32.jar to be set as a project library. the purpose of using the
Class.forName() static method is to ask JVM to find and load dynamically loaded classes
with the ultimate purpose of instantiating objects. Then, use the getConnection() method
in DriverManager to connect with the database, i.e. MySQL's localhost. The code is
shown in Figure 4.

Figure 4 Connector class

29
Development of an application storing patients' data

b) Base64Tools public class. This class provides methods for encrypting user passwords
when storing them and decrypting them when extracting them for display. It requires that
the file ‘bcprov-jdk15on-149.jar’ be set as the project library and then the class should
import the 'org. bouncy castle.util.encoders.Base64' package. The code is shown in Figure
5.

Figure 5 Base64Tools class

c) All classes in the project that involve GUI interfaces need to extend ‘javax.swing.JFrame’.
the Frame class creates and initializes the form object to add a desktop panel to the form.

4.1.2 Basic information module

a) The Hospital class is used to allow the user to select the identity of the login. The interface
is shown in Figure 6.

30
Development of an application storing patients' data

Figure 6 Hospital interface


The code for the action listener to the button is shown in Figure 7.

Figure 7 Action listener code for doctor button

b) The Doctor, Receptionist, and Patient classes are used to verify login information,
including username and password. The interface is shown in Figure 8.

Figure 8 Authentication interface for username

31
Development of an application storing patients' data

The code for the action listener to the button is shown in Figure 9.

Figure 9 Action listener code for the login button

For the authentication function, the system will first create a connection with the database
through the imported Connector class. Then the SQL commands are prepared and
executed using the prepareStatement() method and executeQuery() method, and the result
set is accepted. the results in the result set are read by the next() method and then
compared and judged. For the part involving password validation, the input password is
Base64 encoded and then compared with the password in the database for validation. In
addition, after the verification is successful, the system will take the username as the
transmission parameter and create the user’s home page class.

c) The Doctor_id, Receptionist_id, and Patient_id classes are used to verify the login
information including ID and password.

The code for the action listener to the button is shown in Figure 10. In addition to
authenticating with the ID and encoded password, the system will also call the
corresponding username as a parameter for transmission. Especially, for patients who are
logging in for the first time, meaning they have not set their username and password, then
their password defaults to '0'. And after they log in with the default password, the interface
will not jump to the patient home screen, but to the password setting screen (setPassword
class), and the patient can only enter the home screen after the initialization of the account
is finished.

32
Development of an application storing patients' data

Figure 10 Action listener code for the ID login button

4.1.3 Administrator

a) AdminActivity class is the administrator function interface, which is shown in Figure 11.

Figure 11 Administrator portal interface

b) The patientManagement class is the administrator's interface for patient management


functions. It includes the releaseOperation class, whose role is to process the patient's
request for permission release. Their interfaces are shown in Appendix 4.

The code for the action listener to the button in the releaseOperation class is shown in
Figure 12. After selecting the patient information to be processed, the system executes the
SQL statements DELETE and UPDATE to remove the user information from the database

33
Development of an application storing patients' data

and update the relationship data of the relevant patient.

Figure 12 Action listener code for the release button

c) The doctorManagement class is the administrator's management interface for the doctor
management function. It includes addDoctor, updateDoctor, deleteDoctor, searchDoctor,
and viewDoctor classes, which are used to create, modify, delete, search, and view doctor
data respectively. Their interfaces are shown in Appendix 5.

i. The code for the action listener to the button in the addDoctor class is shown in Figure 13.
After clicking the 'Add' button, the system will read the filled data and save the doctor
information to the doctor table and the corresponding department table by the SQL
statement INSERT.

Figure 13 Action listener code for add button

After clicking the 'Clear' button, the system will clear the filled information and return to
34
Development of an application storing patients' data

the initial state. The code is shown in Figure 14.

Figure 14 Action listener code for clear button

ii. The core code in updateDoctor class is shown in Figure 15.

The loadData() method is used to create a table to display user information. The
information is retrieved by SQL statements and written to the table.

Figure 15 Action listener code for update button


For the tables involved in the update user information function, you need to construct a
DefaultTableModel with the DefaultTableModel(Object[][] data, Object[] columnNames)
method and initialize the table by passing data and column names to the setDataVector
method to initialize the table. The first parameter is a two-dimensional array representing
the table array, and the second parameter is a one-dimensional array representing the
column names. The table array here enables the modification and determination of the

35
Development of an application storing patients' data

contents of the table. The code is shown in Figure 16.

Figure 16 DefaultTableModel code for update function


Add an action listener to the button. After clicking the button, the system will read the
filled data and update the doctor information to the doctor table and the corresponding
department table through the SQL statement UPDATE, and execute the loadData() method
again to update the data displayed in the interface.

iii. The searchDoctor class, in particular, uses a fuzzy query for the lookup function. The '%'
wildcard character is used, i.e. the condition in the SQL statement is set to WHERE name
like '% + searchKey + %' to achieve the function of searching for information containing
keywords.

iv. In the viewDoctor class, unlike the updateDoctor class, the DefaultTableModel() method
defines an array of tables with the following code. This array implements the display of
data information in the table, but it cannot be modified and is a read-only operation. The
code is shown in Figure 17.

Figure 17 DefaultTableModel code for view function

d) The nurseManagement and receptionistManagement class is the administrator's


36
Development of an application storing patients' data

management interface for the nurse and receptionist management function. They have the
same functions as doctor management, only for different target groups. The interfaces are
also similar to those of doctor management.

37
Development of an application storing patients' data

4.1.4 Doctor

The doctorActivity class is the doctor function interface. The interface is shown in Figure 18.

Figure 18 Doctor area interface

It includes addPatient, updatePatient, deletePatient, searchPatient, viewPatient, Appointment,


and changePassword classes, which are used to create, modify, delete, search, view patient
data, view appointment details, and change passwords respectively. Change account
password. Their interfaces are shown in Appendix 6.

i. In particular, when a doctor creates patient information, the system will store the doctor's
name in the patient table at the same time as the doctor in charge of that patient. In this
way, the doctor's functions of modifying, deleting, and viewing patient data will
conditionally retrieve only the patient information that he/she is responsible for, ensuring
the isolation of permissions and data security.

ii. The role of the Appointment class is for doctors to view their appointment information, and
the role of the patientDetails class is to view the appointment patient details. Here, the
appointment table is retrieved from the database and the condition is the doctor's name.
The code for the action listener to the button is shown in Figure 19.

38
Development of an application storing patients' data

iii. The role of the changePassword class is for the user to change the account password by
themselves. In which the user is asked to enter the password twice. The system will
compare the content of the two passwords and if they match, the new password will be
encoded and stored in the corresponding row of the form. The code for the action listener
to the button is shown in Figure 20.

Figure 19 Action listener code for appointment button

Figure 20 Action listener code for change password button

39
Development of an application storing patients' data

4.1.5 Nurse

The nurseActivity class is the nurse function interface. The interface is shown in Appendix 7.
It includes updatePatient, searchPatient, viewPatient, and changePassword classes, which are
used to modify, search, view patient data, set patient and doctor appointments, and change
account passwords respectively.

4.1.6 Receptionist

The receptionistActivity class is the nurse function interface, which is shown in Appendix 8.

It includes chooseDoctor and choosePatient classes, whose purpose on selecting doctors and
patients to constitute appointments. The receptionists can select the doctor by department and
the patient by name. The system will store the names of both and the doctor's room numbers
in the appointment table. The code for the action listener to the button is shown in Figure 21.

Figure 21 Action listener code for set appointment button

4.1.7 Patient

The patientActivity class is the patient function interface. The interface is shown in Figure 22.

40
Development of an application storing patients' data

Figure 22 Patient area interface


It includes the viewMyInfo, bindRelationship, changePassword, and releaseRequest classes,
which are used to view data, bind a family relationship, change account password, and submit
a request to release permissions, respectively. Their interfaces are shown in Appendix 9.

i. In the viewMyInfo class, the system will conditionally retrieve data and the patient will
only be able to view information about themselves and their bound dependents. The
conditions are the patient's user name and the name of the bound family member.

ii. In the bindRelationship class, by searching for the name of the family member, the system
will store the family member's name in the 'relationship' item in the corresponding row of
the database table. At the same time, the user's name will also be stored in the relationship
item of the family member, which is a two-way synchronous operation. The code for the
action listener is shown in Figure 23.

Figure 23 Action listener code for bind relationship button


iii. In the releaseRequest class, the system stores the user's ID, name, username, and
relationship information in the lostright table. The code for the action listener is shown in
Figure 24.

41
Development of an application storing patients' data

Figure 24 Action listener code for release rights button

4.2 Encryption technology

In this project, in order to ensure the security of our network data and the importance of the
data information, it is necessary to manipulate the security of the password information of
doctors, nurses, and patients.

Considering that in this project, the main role of the password is verification, and it is not
important whether the specific content of the password is known, rather than the efficient and
difficult-to-decipher characteristics of encryption required for data in a similar network
transmission, the Base64 encoding algorithm was adopted.

Base64 is not an encryption and decryption algorithm in the security field. The basic principle
of Base64 encoding is to recombine every three consecutive 8-bit bytes (3 ∗ 8 = 24) in binary
data into four 6-bit bytes (4 ∗ 6 = 24) after a shift operation, and then add two zeros in front of
the new 6-bit bytes to form the form of 8-bit bytes and so on so that the encoding result can be
expressed in 64 common characters.[5]

42
Development of an application storing patients' data

4.3 System Testing

To ensure that the system can cope with various conditions in actual application, system
testing is required before it is put into operation. The data used in system testing is the test
cases, which are selected to expose the errors and loopholes of the software as much as
possible.

4.3.1 Testing process

The basic steps to be followed in the testing process are shown in Figure 25.

Figure 25 Testing phase information flow


Among them, software configuration includes requirement specification, design specification,
and source code, and test configuration includes test plans, test tools, test cases, and expected
results.

When running the software, use test cases to see if the running results match the expected
results, find errors and loopholes, and correct them in time. Experiment with test cases in
various environments as much as possible to ensure that the software adapts to complex
situations. Through the analysis of the test results and the evaluation of the testing effect, we
can judge the quality of the software. In short, the purpose of testing is to find out the
potential errors in the program as much as possible.

4.3.2 Test case design

This part mainly takes the login function of the patient module as an example and introduces
43
Development of an application storing patients' data

the design of test cases in detail. The first step of software testing is to design test cases. The
essence of software testing is the operation of the software, and the operation requires data
input. In the testing phase, some data with typical characteristics will be designed to run the
software to find the errors of the program, which is the test case. A good test case can help to
find errors and bugs in the program more efficiently. Therefore, designing test cases is the
first step to complete software testing effectively. Based on the above principles, the test cases
in the login function of the patient module are designed as in Table 1.

Table 1: Patient module login function test case design

No. 0024
Module Name Patient Module Login Function

The patient module login function is tested to check whether


Testing Description legitimate users can log in properly and whether there are vul-
nerabilities that allow illegal users to log in.

Coun
Input Standards Output Standards
t
After entering the username/ID and correct
Enter the existing username/ID and password that exists in the database, the
1
the correct password to log in. patient can log in normally and enter the
patient home page.

Cannot log in normally due to a password


Login with an existing username/ID
2 error, and a pop-up message box "Pass-
and an incorrect password.
word error" appears.

The username/ID does not exist in the


Login by entering a non-existing database and cannot log in normally, and
3
username/ID and password. the message box "User does not exist"
pops up.

Missing password cannot log in normally,


Login with an existing username/ID
4 a pop-up message box "Please enter pass-
and no password.
word" appears.

Missing username cannot log in normally,


Log in without entering a username/
5 pop-up message box "Please enter a user-
ID and entering a password.
name".

44
Development of an application storing patients' data

Jump to the interface of the password set-


Login by entering an ID and default
ting function, and a pop-up message box
6 password (0). (For the first time log
"Please set your username and password"
in)
will appear.

4.3.3 Test result analysis

Through the design of test cases for the login function of the patient module and the testing
work, the test results shown in Table 1 can be obtained.

Table 1: Patient module login function test results

Not achiev-
All Actual Achieve ex- Large Unable
ing expected
cases cases pected results errors to test
result
Number of test
70 70 67 3 0 0
cases
Percentage 100% 100% 95.70% 4.30% 0% 0%

According to the testing of the login function of the patient module, it can be seen that the
module controls the security of the system well by i) only entering the correct username or ID
and password can log in to the module, ii) only after normal login can the module be operated
normally, and iii) the first login, i.e., when there is no user name and password, the system
will first jump to the interface of setting the password.

45
Development of an application storing patients' data

Chapter 5: Conclusion and Further Work

5.1 Conclusion

By analysing the current situation of the hospital management system, this project developed
a small-scale HMS, which facilitates the submission of cases by doctors, effectively manages
the hospital staff, rationalizes the use of limited medical resources, changes the traditional
hospital management model, improves the efficiency of the hospital, and reduces management
costs.

The following work was accomplished during the development of the project. i) A
requirements analysis of the HMS was conducted. ii) The corresponding functions were
designed and implemented as needed. iii) A database was created, which was functionally
categorized by user type, and also included data tables for special functions such as
reservations.

Firstly, the project carried out the system analysis and completed the overall system design.
The system was developed in Java language, and the Swing package was used to build the
GUI platform. The main functional modules are the administrator management module,
doctor management module, nurse management module, receptionist management module,
and patient home page module. The specific functions are described as follows.

i. Administrator management module: mainly implements the addition, inquiry,


modification, and deletion of doctors, nurses, and receptionists, and the review and
passing function of patient permission release application.

ii. Doctor management module: mainly implements the creation, editing, and deletion of
patient information.

iii. Nurse management module: mainly implements the editing and search of patient
information.

iv. Receptionist management module: mainly implements the appointment function to reach
contact between patients and doctors.

v. Patient home module: mainly implements the view of personal information and family
information, the search and binding of family relationships, and the application of
permission release.

46
Development of an application storing patients' data

Secondly, the design of the database was completed. The entities planned out in the system
are the administrator information entity, doctor information entity, nurse information entity,
patient information entity, appointment record entity, release permission record entity, and
information entity of each department. According to the entities, corresponding information
tables were established, and these tables will be used to store data and form database files in
the future. The code implementation of the subsystem is carried out with the participation of
the characteristics of the hospital management model.

Furthermore, the project is divided into two main implementation methods regarding
information security storage. i) Permission separation. Users have unique and distinctive IDs
and self-defined passwords, which are combined for login authentication to ensure that users
log in to the corresponding classification system and do not access data information that is not
their own. ii) Password encoding and storage. The role of the user password in this project is
only to provide reference value verification for authentication, so I used Base64 to encode and
decode the user password to meet the two scenarios of storage in the database and retrieval for
display, which is difficult to decipher after encoding to ensure its security.

Finally, through the development of this project, I have also come to the following thoughts
and conclusions.

i. Before the design is carried out, a lot of system analysis must be done. The more accurate
the system analysis is, the more accurate the designed system is, which can greatly reduce
the modification and maintenance work later.

ii. When architecting a hospital management information system, the system design goals
must be formulated according to the needs of different hospital management models, so
that the system achieved has good performance, simple programming, user-friendly, and
high intelligence.

iii. The use of appropriate tools can shorten the development cycle of the system and reduce
the number of iterations of system development.

iv. When carrying out programming, try to use the various functions provided by the
development tool, which not only greatly reduces the amount of code, but also improves
the operational efficiency of the program.

47
Development of an application storing patients' data

5.2 Further work

i. Due to the limited time, the system analysis, overall design, and functional design were
carried out from the perspective of the practical application of hospital management in this
project. However, based on the existing design ideas and methods, the follow-up work is
relatively simple. However, due to the hospital expertise involved, the relationship
between some departments and their interactions and complements is not clearly
understood. Therefore, the hospital management system designed in this project is only a
rough model for the transformation from traditional management to modern management,
and in the future, it is expected that a hospital management system with better design,
more complete functions, and stronger links between information will be developed on
this basis.

ii. Client / Server, also known as C / S, is a software system architecture model, which has
the advantage of the Server's low operating pressure and Server data transparent to the
Client. In the process of designing the three-layer architecture, the entire software should
be arranged according to the order from bottom to top, in order: data processing layer,
application logic layer, and presentation layer. At the same time, the layers can realize the
mutual exchange of data between the layers, and play an active role in the expansion and
adjustment of the program.[6]

If the project switched to using a C/S structure, it would be possible to decompose the
different tasks and turn them into small tasks, which would enable the server and client
programs to be solved quickly and thus improve the overall utilization of different
resources.

iii. Improvements can also be made in the encryption algorithms for the secure storage of data
required by the project. One of the algorithms that cannot restore the encrypted data is the
Hash algorithm. The only difference between this algorithm and the symmetric and
asymmetric encryption algorithms is that the encrypted data cannot be decrypted, and in
addition, the encrypted data achieved by this algorithm is unique. This algorithm is mainly
used in cases of cryptographic storage and message verification. In the system of this
project, the patient and doctor information needs to be encrypted in order to ensure the
security of the data information, and here the password information is simply encoded.
Therefore, the Hash algorithm encryption, where the main role of the password is a
verification and it is not important to know the exact content of the password, is very
48
Development of an application storing patients' data

suitable, while this encryption algorithm prevents data administrators from stealing the
user password information with ulterior motives.

49
Development of an application storing patients' data

References

[1] Web Based E-Hospital Management System. (2018). Iraqi Journal of Computer, Commu-
nication, Control and System Engineering, pp.11–28.
[2] Eckel, B. (1998). Thinking in Java. Upper Saddle River, N.J.: Prentice Hall.
[3] ‌Steven John Metsker (2002). Design patterns Java workbook. Boston: Addison-Wesley.
[4] Hibbert, A. (2001). Review: Advanced Transact-SQL for SQL Server 2000. The Com-
puter Bulletin, 43(5), pp.30–30.
[5] Rahim, R., Ratnadewi, R., Prayama, D., Asri, E. and Satria, D. (2018). Base64, End of
File and One Time Pad for Improvement Steganography Security. IOP Conference Series:
Materials Science and Engineering, 407, p.012161.
[6] Lee, W., Stark, J.L. and Markley, J.L. (2014). PONDEROSA-C/S: client–server based
software package for automated protein 3D structure determination. Journal of Biomolec-
ular NMR, 60(2-3), pp.73–75.

50
Development of an application storing patients' data

Acknowledgement

Like riding a roller coaster millions of times in a dream, my undergraduate story is honestly
something I don't really want to remember. From the age of 18 to 22, from timid to
extroverted, Beijing is a place that has brought me sorrow but also made me grow up.

For the beginning of everything, a heartfelt gratitude to my mom, dad, and family. When I
was tired and confused, their words of encouragement, saying love me, support me, and trust
me all the time, were the motivation that allowed me to keep moving forward in the midst of
my pain.

I always thought I was not much of a lucky person. But when I think deeply about it, I can
still find lots of fortunate memories. I met Sun Kexin early in university and became
soulmates. I became a fan of SEVENTEEN and Hua Shaobei when I was most stressed about
my future. I met a very kind supervisor during my final project. I received an offer from my
dream school. The last year of undergraduate is already very happy and relaxing, so it seems
to be able to forget the hard work before.

Everything will be fine from now on, right? I don't know. But I'm eager to see that. Hope I can
always be energetic and brave.

Lastly, miss my grandpa.

51
Development of an application storing patients' data

Appendix
Disclaimer
This report is submitted as part requirement for the undergraduate degree programme at the
Queen Mary University of London, and Beijing University of Posts and Telecommunications.
It is the product of my own labour except where indicated in the text. The report may be
freely copied and distributed provided the source is acknowledged.

BUPT No.: 2019213171


QM No.: 190900621
Full Name (Pin Yin): Sijie Zou
Full Name (Chinese): 邹思婕

Signature:

Date: 2023.4.27

52
Development of an application storing patients' data

Project specification
Part 1 – Supervisor
论文题目 Development of an application storing patients’ data
Project Title
题目分类 Software Development Implementation Software
Scope
主要内容 The project proposes the development of an application that will securely
Project store patients’ data. The data will be entered by doctors and nurses who
description have been previously registered. They will have a unique user ID and
password to login and have the right to do the following with patients’ data:
DR: enter, edit/ amend and delete and NURSE: view/ edit (i.e., not permitted
to enter). Note that, not all doctors/ nurses will have these rights. These data
will be stored securely. Patients will also be able to view their data with no
right to enter, edit/ amend and delete the data. The right to have access to the
patients’ data will be ensured by providing each patient with a user ID and
password. Each patient can nominate one of the family members who is also
registered with the same practice/ clinic to request to view the data in case of
an emergency. This additional feature will add a mechanism of looking up the
other registered patients with the same surname/ address - the decision of
choosing the more feasible way will be an outcome from the student’s re-
search.
关键词 Application, Data storage, Security
Keywords
主要任务 1 Research on GUI to create a platform
Main tasks
2 Creating a list of unique user ID and passwords

3 User authentication

4 Storing the security-sensitive data

主要成果 1 A secured database having a list of unique user accounts with different rights
Measurable
outcomes 2 An auto-update system of users nominated by the patient (i.e., losing
rights if they move to another practice OR if the adress is not the same any-
more)
3 Final application with the patients’ data

53
Development of an application storing patients' data

Part 2 - Student
学院 International 专业 Telecommunications Engineering with
School School Programme Management
姓 Zou 名 Sijie
Family name First Name
BUPT 学号 2019213171 QM 学号 190900621 班级 2019215105
BUPT number QM number Class
论文题目 Development of an application storing patients’ data
Project Title
论文概述 With the development of medical informatization, medical institutions have ac-
Project outline cumulated a large amount of electronic medical record data in the process of pa-
tient treatment, and these data are being used more and more widely in medical
Write about institutions. In the medical system, doctors and patients are trying to use intelli-
500-800 words gent software to replace some specific tasks of human beings, which saves a lot
of human resources while improving work efficiency and saving many hardware
Please refer to resources.
Project Student
Handbook sec- In this process, the security issues of data leakage and outsider access may arise,
tion 3.2 so the aspect of data confidentiality is particularly important. To ensure the se-
curity and trustworthiness of the data throughout the process, the access rights,
encryption, and security level of the data need to be controlled. In this project,
we will create specific operations and permissions related to data access for
people with different identities in the hospital. And to enhance the data utiliza-
tion in the later stage, the data warehouse creation and data mining are also
taken into consideration and unique ID numbers are set for users and cannot be
reused.

Based on the background reading and the observation, I got the following re-
quirement analysis. First of all, the main users of the application developed for
this project are focused on doctors, nurses, patients and patients’ guardians. The
initial functionality should include a user-friendly GUI interface, a database
with user information, actionable features such as authentication and informa-
tion addition and modification and a secure data storage system. Also, the final
result will be presented as a runnable file. The content will consist of a secure
database for storing user information and an intelligent application system that
can be automatically upgraded. Therefore, the project will use Java language for
the application architecture, and the database is planned to be built using SQL.

The tasks of the project and the functions of the application are refined and
quantified and analysed as follows.

References
[1] https://blog.csdn.net/weixin_45032905/article/details/126654328
[2] https://blog.csdn.net/m0_50546016/article/details/120070003
[3] What is Test Driven Development (TDD)? | Agile Alliance

1. Research and build the platform and user-friendly GUI


GUI is Graphical User Interface, which is a way for the interaction between user
and application and can make the application look more user-friendly. First, I
will use Balsamiq software to build a medium-fidelity prototype user interface,
which will be used as a reference for formal code writing. At the same time,
when building the GUI interface, the specific functions and usage flow con-
54
Development of an application storing patients' data

tained in the application that is the goal of this project can be better analysed
and planned. The Java language chosen for this project also brings greater con-
venience to the construction of the GUI, which contains GUI development pack-
ets, mainly AWT and Swing.

2. Create a database for storing user information


In this phase, the main focus is on determining the type of information con-
tained in the user information and the order and format in which it should be
stored. For example, the patient information should contain basic personal in-
formation such as patient ID, name, cell phone number, etc. Meanwhile, the pa-
tient information table should store the patient's personal health information,
medication usage, etc. to facilitate the subsequent data analysis. The data collec-
tion will come from self-written assumed data. I choose SQL to build the data-
base structure. SQL, which is Structured Query Language, the database manage-
ment system manages the data in the database through SQL language.

3. User authentication and related actionable functions


For the hospital context in which the project is located, the users are simply di-
vided into three categories, namely doctors, nurses, patients, and their guardi-
ans. What they have in common is that they will all be assigned unique IDs and
set passwords for user authentication. They have different access rights to the
functions and data in this application system and will be specifically distin-
guished and isolated by verifying IDs and passwords to accomplish data confid-
entiality.

1) Doctor: can create, edit and delete patient diagnosis records and patient
data.
2) Nurse: can edit patient diagnosis records and patient data.
3) Patients and family member: only view patient diagnosis records and patient
data.

Moreover, a query mechanism will be added to the project to match the personal
information of registered patients, such as last name and address. Also, a auto-
update system will be added to remove functional privileges and self-deletion
and update of user information after leaving the hospital or changing address.

This part is the key part of the project, which contains more tasks and needs to
focus on the classification and isolation of functions and data, as well as the
overlap and common relationship between them.

4. Storing the security-sensitive data


This part requires the project to meet the data security and privacy protection re-
quirements, i.e., to test and evaluate the availability, confidentiality and integrity
of user information, including privacy protection, data isolation, authentication
and permission management. This phase will complete the integration of the
main functional part of the application written in Java and the information stor-
age database written in SQL. Particular attention will be paid to the manage-
ment of permissions for different user identities, which is also the difficulty and
focus of the project.

Additionally, the testing phase of the project will use TDD (Test-Driven Devel-
opment), which is a core practice and technique in agile development, and a
design methodology. The remainder will be manual. Each subject use case is
tested for its normal flow and behaviour and also two alternative flows to ensure
Each subject use case is tested for its normal flow and behaviour and also two
55
Development of an application storing patients' data

alternative flows to ensure that cover incorrect user input or operations.

道德规范 Please confirm by checking the box:


Ethics
✘ I confirm that I have discussed ethical issues with my supervisor.
Please discuss
Summary of ethical issues:
ethical issues
(write “None” if no ethical issues)
with your su-
pervisor using
None
the ethics
checklist in
Project Hand-
book Appendix
1.

中期目标 1. Create user interface prototype.


Mid-term tar- 2. Code initial structure of the GUI.
get. 3. Implement common user authentication function and user personal informa-
tion entry and storage
It must be tan- 4. Create initial database structure and add in virtual user data.
gible outcomes,
E.g. software,
hardware or
simulation.

It will be as-
sessed at the
mid-term oral.

56
Development of an application storing patients' data

Work Plan (Gantt Chart)


Fill in the sub-tasks and insert a letter X in the cells to show the extent of each task

Nov Nov Dec Dec Jan Jan Feb Feb Mar Mar Apr Apr
1-15 16-30 1-15 16-31 1-15 16-31 1-15 16-28 1-15 16-31 1-15 16-30

Task 1 [Research on GUI to create a platform]


Research the GUI of the hospital informa-
tion system on the market X
Produce prototype user interface
X
Code the GUI interface
X X

Task 2 [Creating a list of unique user ID and passwords]


Research SQL database and the database
structure of existing information systems on X
the market
Define the type, format and storage method
of the required information X X
Create the database and add the correspond-
ing assumed data X X X

Task 3 [User authentication]


Create the UML diagram for the whole sys-
tem X X
Implement a common personal information
authentication system X X X
Implement the functions of the doctor side X
X
Implement the functions of nurse side X
X
Implement the functions of patient and fam- X X
ily member side
Implement additional functions such as in- X X
quiry system and auto-updating system

Task 4 [Storing the security-sensitive data]


Establish user rights management X X
X
Call database to realize data isolation X X X
Implement data privacy protection function X X
Test the whole system and debug X X

57
Development of an application storing patients' data

Early-term progress report


学院 International 专业 Telecommunications Engineering with
School School Programme Management
姓 Zou 名 Sijie
Family name First Name
BUPT 学号 2019213171 QM 学号 190900621 班级 2019215105
BUPT number QM number Class
论文题目 Development of an application storing patients’ data
Project Title
已完成工作 Finished work:

Summary of work was done:


 Task 1 [Research on GUI to create a platform]
1) Research the GUI of the hospital information system on the market
After reading a lot of papers and searching a lot of existing information management system inter-
action designs, the GUI interface for this project should focus on a simple and clear interface with
clear identity distinction for hospital staff to operate and identify quickly, according to the different
business processes, organizational structure and business functions of the hospital. The project's
GUI interface should focus on a simple and clear interface with clear identity distinctions to facilit -
ate quick operation and recognition by hospital staff. This includes clear guidance and help inter-
faces, functional separation of different identities, undo and redo of actions, and action completion
confirmation interfaces.

The GUI interface of this project enables login or registration functions, mainly by operating the
user's computer and completing the corresponding operations, and the corresponding results will be
displayed after completing the operations. In addition, this project also needs to pay special atten -
tion to the protection measures related to personal private information such as encrypted display of
information and passwords.

2) Produce prototype user interface


At the beginning of the project, I chose Balsamiq Wireframes to create a prototype user interface,
in which the interaction interface and relationships required in the project are reflected. For ex-
ample:
 Initial interface
 Login and registration
 Authentication
 Doctor interface
 Nurse interface
 Patient interface
 Administrator interface
 Operation reminder interface

See Appendix 1 for the prototype.

 Task 2 [Creating a list of unique user ID and passwords]


1) Research SQL database and the database structure of existing information systems on the mar -
ket
For this part, I studied SQL at the beginning of the project, combined with hands-on training, liter-
ature, and example exercises to gain some knowledge of the creation and structure of the database
part.

The research is summarized in the Summary of literature review later in the report.

58
Development of an application storing patients' data

2) Define the type, format, and storage method of the required information
To create a suitable database, I carried out a logical structure design at this stage. Listed the names,
types, and other required data information to provide a reference standard for later database con -
struction, Java construction.

See Appendix 2 for the definition table.

3) Create the database and add the corresponding assumed data


Based on the understood database structure, I designed the general conceptual structure of the data-
base. Based on the requirement analysis structure, a simple E-R diagram (Entity Relationship Dia -
gram) was constructed, which provides a way to represent entity types, attributes, and associations.

See Appendix 3 for the E-R diagram.

 Task 3 [User authentication]


1) Create the UML diagram for the whole system
I performed a preliminary system outline design and framework design for the classes involved in
Java programming to obtain the initial version of the system framework design diagram. The main
functional categories in the system of the project are listed therein to provide reference for sub-
sequent class creation.

See Appendix 4 for the system framework design diagram.

Problems were faced:


1) The architecture of the database is more complex than planned, and the construction time needs
to be extended.
2) Data separation and secure storage, whether we need to combine with existing algorithms to
achieve storage security-sensitive data.

Solutions were found:


1) Continuously study the database, increasing the time allocated for this phase, and continuously
update and improving the database during the Java implementation phase.
2) Study papers and models related to encryption algorithms and consider how and to what extent
the secure storage function can be accomplished in the context of the actual programming situ-
ation.

References
[1] Preeti Agarwal; Mansaf Alam; "Investigating IoT Middleware Platforms For Smart Application
Development", ARXIV, 2018. (IF: 3)
[2] K. Narendra Swaroop; Kavitha Chandu; Ramesh Gorrepotu; Subimal Deb; "A Health Monitoring
System for Vital Signs Using IoT", INTERNET THINGS, 2019. (IF: 3)
[3] N. Ferracuti; C. Norscini; Emanuele Frontoni; P. Gabellini; Marina Paolanti; Valerio Placidi; "A
Business Application of RTLS Technology in Intelligent Retail Environment: Defining The Shop-
per's Preferred Path and Its Segmentation", JOURNAL OF RETAILING AND CONSUMER
SERVICES, 2019. (IF: 3)
[4] I. A. T. Hashem; A. E. Ezugwu; M. A. Al-Garadi; I. N. Abdullahi; O. Otegbeye; Q. O. Ahman; G.
C. E. Mbah; A. K. Shukla; H. Chiroma; "A Machine Learning Solution Framework for Com-
batting COVID-19 in Smart Cities from Multiple Dimensions", MEDRXIV, 2020. (IF: 3)
[5] Punit Jain; Anupam Anand; Mayank Saria; Rashmi Kumari; Priyanka Bothra; Mahamuda Sul-
tana; "A Prototype Proposal for AI Based Smart Integrated Platform for Doctors and Patients",
2020 8TH INTERNATIONAL CONFERENCE ON RELIABILITY, INFOCOM TECHNOLO-
GIES AND OPTIMIZATION (TRENDS AND FUTURE DIRECTIONS) (ICRITO), 2020.

59
Development of an application storing patients' data

Summary of literature review:


1) For the development of an application storing patients’ data
The design of a real-time health monitoring system that can store a patient's fundamental health
parameters is presented by (Swaroop et al., 2019). The main findings of a study based on informa -
tion gathered using the cutting-edge technology Real-Time Locating System (RTLS) are described
in (Ferracuti et al., 2019). (Hashem et al., 2020) suggest a methodology that incorporates machine
learning to stop COVID-19 from spreading in smart cities. All of them can be set up anywhere, in -
cluding medical camps in remote places, and can be integrated with an existing IT infrastructure of
a hospital. The model's proposed solution is discussed (Jain et al., 2020). The service ovo applica -
tion is available on the Google Play store for reviews by the general public (Widiyaningsih et al.,
2020). In order to record and store medical data, (Pournaghi et al., 2020) present the "MedSBA"
system, a novel, secure, and effective approach based on blockchain technology and attribute-based
encryption. The authors claim that the proposed system protects user privacy and enables fine-grain
access control of medical patient data in accordance with General Data Protection Regulation
(GDPR). The effects of a real store, a non-immersive virtual store, and an immersive virtual store
setting on consumers' perceptions and buying behavior toward FaVs are examined (Lombart et al.,
2020). In order to create a Remote Patient Health Monitoring System (RPHMS), (Abdullah et al.,
2021) intend to use mobile phones and Bluetooth-enabled medical sensors. (Agarwal et al., 2018)
and (Rakhman et al., 2020) are two other noteworthy works.

2) For storing the security-sensitive data by SQL


Even though there are many different languages used to create online apps, Java is still a popular
option, especially for banking applications where security is particularly important. Based on the
recognition of all potential explicit flows of contaminated data in Java code, (Spoto et al., 2019)
design a unified, sound defense mechanism against such attacks. A standard method for translating
relational schemata and SQL instructions to equivalent schemata and access methods of any key-
oriented NoSQL database is presented by (Schreiner et al., 2019) and is referred to as SQL-
ToKeyNoSQL. Devgan et al. (2019) address all the requirements for a Multimedia DBMS because
they need distinct databases to store and manage it. The necessity for new analytic platforms, in
particular various big data frameworks like Hadoop and Spark, as well as MapReduce program-
ming ideas, is covered in (Basha et al., 2019). (Ferreira et al., 2020) propose a translation of natural
language in English to SQL applied in a SQL database of a system to store data from sensors, with
a focus on the idea of Industry 4.0, using recent models in natural language processing that use
neural networks as well as attention mechanisms. In order to make Oracle Database a mature plat -
form capable of supporting both SQL and NoSQL style access paradigms, (Liu et al., 2020) de-
scribe the new native JSON datatype and how it is completely integrated with the Oracle Database
ecosystem. The method for query processing on heterogeneous data sources is described in
(Pikuleva et al., 2020). (Maran et al., 2020) contrast their capacities with the aid of an actual in -
stance. (Modhiya, 2021) briefly discuss MongoDB as an example of a NoSQL database. Among
other important works is (Yu et al., 2021).

是否符合进度?On schedule as per GANTT chart?

Yes. According to the Gantt chart, I have finished the related research and prototype construction,
data type definition, etc. so far. But for the later work, I need to grow the time allocated for data-
base building.

下一步 Next steps:

Before the mid-term, I will start the Java implementation, and finish the following targets:
1) Complete the database build and add the corresponding assumed data.

60
Development of an application storing patients' data

2) Create the UML diagram for the whole system.


3) Code the initial structure of the GUI interface.
4) Implement a common user authentication function and user personal information entry and
storage.

61
Development of an application storing patients' data

Mid-term progress report


学院 International 专业 Telecommunications Engineering with
School School Programme Management
姓 Zou 名 Sijie
Family name First Name
BUPT 学号 2019213171 QM 学号 190900621 班级 2019215105
BUPT number QM number Class
论文题目 Development of an application storing patients’ data
Project Title
是否完成任务书中所定的中期目标?Targets met (as set in the Specification)?
YES
已完成工作 Finished work:

 Task 1 [Research on GUI to create a platform]


1) Research the GUI of the hospital information system on the market
After consulting a lot of information system templates, I will focus on building an easy-to-use GUI.
The hospital system is different from other service system interfaces, it should be more concise,
with clear identity distinction and information display. There should not be overly complicated
page design and indistinguishable text and picture descriptions. In addition, guidance tips and help
interfaces should be added for quick operation of users. Withdrawable and redoable functions for
operations, as well as certain information encryption measures, are also necessary.

2) Produce prototype user interface


I chose Balsamiq Wireframes to create the prototype of the user interface, which mainly represents
the interaction interface, interaction relations, etc. needed in the project. For example
Initial interface
 Login and Registration
 Authentication
 Doctor Interface
 Nurse Interface
 Patient Interface
 Administrator Interface
 Operation Reminder Interface
For the prototype completed in the early term, I added the interface design of the query function.
See Appendix 1 for the prototype.

3) Code the GUI interface


For the framework of the whole system GUI, I wrote Baseframe class as the basis of all interfaces,
which specifies the default settings of interface size, relative position, layout, MouseListener re-
sponse recognition, etc., to ensure the uniformity of the system. In addition, I wrote several util
classes, which include date formatting, date calculation, help screens, data validation tool, button
templates, and so on. These tool classes are seen as different widgets, making the whole program
have a unique point in format, reducing duplication and work time in subsequent code writing, and
realizing the DRY principle.

 Task 2 [Creating a list of unique user ID and passwords]

62
Development of an application storing patients' data

1) Research SQL database and the database structure of existing information systems on the mar -
ket
I carried out further study of SQL, combining operational training, literature introduction, and ex-
ample exercises to gain some knowledge of the creation and framing of the database part.

2) Define the type, format, and storage method of the required information
In order to create the applicable database, I implemented the logical structure design early in the
project. Based on what I learned about the database structure, I designed a general conceptual struc-
ture for the database. Based on the requirements analysis structure, a simple E-R diagram (Entity
Relationship Diagram) was constructed, which provided a way to represent entity types, attributes,
and associations. At the same time, I listed the names, types, and other information of the required
data to provide a reference standard for the later database construction, Java construction. In the
middle stage, I also made name changes to the data information and additions to the items in the
database build.
See Appendix 2 for the overview chart.

3) Create the database and add the corresponding assumed data


Through the preliminary requirements analysis, a detailed investigation of the user requirements of
the real-world hospital information system was conducted, coupled with the design of the logical
structure and the table of information types at the beginning of the project. In this phase, I built the
actual database structure. The database was defined in DDL, which includes basic tables, indexes,
constraints, views, etc. Specifically, 11 tables were created to define administrator information,
hospital information, departments, doctors, nurses, rooms, treatments, etc. The fields include name,
ID, age, phone number, etc. Conditions were also constrained for limited data such as age. Also,
procedures have been created to establish correspondence between tables and reference data to
make the correct connection between data tables. The tables that have been created have been
manually loaded with virtual data to facilitate testing of the system. The built database was tested
without error in the functional tests.
See Appendix 3 for the database tables overview.

 Task 3 [User authentication]


1) Create the UML diagram for the whole system
For the class involved in Java programming, I conducted a preliminary system outline design and
framework design and obtained the initial version of the system framework design diagram. The
main functional categories in the system of the project are listed therein to provide a reference for
the subsequent class creation.
In the middle stage, I also completed a preliminary UML diagram. This illustrates the class to be
implemented in java programming and its characteristics, the relationship between entities, and the
structure of the information.
See Appendix 4 for the UML diagram.

2) Implement a common personal information authentication system


I programmed java to implement the initial interface, login, and registration functions, and initial
authentication of the hospital information system.
Specifically, I wrote the default start screen that serves as a marker point for the start of the system.
In the login function, by selecting different identities, you can login by ID and password or phone
number and password. Identity verification is achieved by retrieving the corresponding data in the
database for comparison. In the registration function, users can select their identity and fill in the
required personal information and password to register. The information filled in will be stored in
the database, and the user will be assigned a unique ID number.
Currently, the relationship between Java code and SQL database is not well established, so only
specific data can be used to implement the function, not yet universal. However, they can run inde-
63
Development of an application storing patients' data

pendently without error.


See Appendix 5 for the interfaces overview.

All codes can be seen on sijiezou/FinalProject-2023 (github.com). (The current stage is not setting
as public.)

 Summary of Literature Review:


Because there are many challenges and issues with the current system. The goal of (Fadil, 2018) is
to put into practice an application for patient registration and queuing so that patients who will seek
treatment when they visit a polyclinic immediately receive a queue number. Particle swarm optim -
ization algorithm is used by (M et al., 2020) to track the location of a user while also displaying in-
formation about all hospitals and clinics in the Madurai district and the specialists who are access-
ible in each stream. The "martial arts athletes' physical fitness test evaluation system" was de-
veloped to be able to assess both the general and comprehensive levels of martial arts athletes'
physical fitness (Hu et al., 2020). The decomposition function, DFD, and ERD are used in the sys-
tem design (Muntohar, 2020). The primary goal of (Al-Fazari et al., 2020) is the creation of Air-
com, a real-time air pollution monitoring online application that can identify harmful substances in-
side of buildings. The waterfall software process model is employed, and analysis is aided by the
usage of Unified Modeling Language (UML) (Gulo et al., 2020). Naturally, the processes required
to create a software system that performs well cannot be isolated from how to select and use the
analysis and design methodologies. Rapid Application Development (RAD) will be used to design
a goods delivery system, in which the authors analyze the company's data management system be-
fore developing a prototype that is suitable for data management as an upgrade from the previous
system using Java Script and MySQL as its database (Nilawati et al., 2020). (Yang et al., 2020),
(Handayani et al., 2021), and (Pasaribu, 2021) are some other influential works.

尚需完成的任务 Work to do:

1. Implement the functions of the doctor, nurse, and patient side.


2. Implement additional functions such as inquiry system and auto-updating system.
3. Establish user rights management and data privacy protection function.
4. Complete the final report.

存在问题 Problems:

The connection between Java and SQL database does not implement all the features needed, and
there are some errors in reading and storing data.

拟采取的办法 Solutions:

Do further study of SQL to improve the current code and connection method to ensure error-free
data manipulation.

论文结构 Structure of the final report: (Chapter headings and section sub headings)

Abstract

64
Development of an application storing patients' data

1. Introduction
1.1 Background
1.2 Task

2. Related technologies and development tools


2.1 Introduction to JAVA
2.2 Introduction to SQL

3. System Requirements Analysis


3.1 Business Process
3.2 Functional and Performance Requirements Analysis

4. System Design
4.1 Structure Design
4.2 Database Design
4.3 Process Design
4.4 Detailed Functional Design
4.5 Interface Design

5. System implementation
5.1 Program Design
5.2 Encryption Technology

6. System Testing
6.1 Testing Strategy
6.2 Testing Techniques
6.3 Test Matrix

7. Conclusion
7.1 Summary
7.2 Future Work

65
Development of an application storing patients' data

Supervision log
学院 International 专业 Telecommunications Engineering with
School School Programme Management
姓 名
Zou Sijie
Family name First Name
BUPT 学号 QM 学号 班级
2019213171 190900621 2019215105
BUPT number QM number Class
论文题目
Development of an application storing patients’ data
Project Title

Date: 16-11-2022
Supervision type: online meeting
Summary: discussed the project specification

Date: 20-11-2022
Supervision type: email
Summary: discussed the details of the project implementation

Date: 24-11-2022
Supervision type: online meeting
Summary: discussed the process and details of the project

Date: 30-11-2022
Supervision type: email
Summary: received feedback on the specification

Date: 6-12-2022
Supervision type: email
Summary: asked how to solve my problems with the database

Date: 13-12-2022
Supervision type: email
Summary: reported on the progress of finished work

Date: 20-12-2022
Supervision type: email
Summary: reported on my progress of finished work

Date: 2-1-2022
Supervision type: online meeting
Summary: discussed early reports

Date: 5-1-2023
Supervision type: email
Summary: discussed the data used in the project

Date: 17-1-2023
Supervision type: email
Summary: received feedback on the early-term report

Date: 31-1-2023

66
Development of an application storing patients' data

Supervision type: email


Summary: reported project progress

Date: 7-2-2023
Supervision type: email
Summary: reported project progress

Date: 14-2-2023
Supervision type: email
Summary: reported project progress

Date: 20-2-2023
Supervision type: online meeting
Summary: discussed the mid-term report

Date: 28-2-2023
Supervision type: email
Summary: discussed the mid-term presentation

Date: 3-3-2023
Supervision type: email
Summary: received feedback on the mid-term report

Date: 16-3-2023
Supervision type: email
Summary: reported project progress

Date: 29-3-2023
Supervision type: email
Summary: discussed the “auto-update” function

Date: 6-4-2023
Supervision type: online meeting
Summary: discussed the implementation of the “auto-update” function

Date: 9-4-2023
Supervision type: email
Summary: discussed the draft report

Date: 20-4-2023
Supervision type: face-to-face meeting
Summary: presented the mock viva

Date: 22-4-2023
Supervision type: email
Summary: received the feedback on the final report and presentation slides

Date: 24-4-2023
Supervision type: email
Summary: discussed the final report

67
Development of an application storing patients' data

Additional Appendices
Appendix 1. Flowchart for process design

68
Development of an application storing patients' data

69
Development of an application storing patients' data

Appendix 2. UML class diagram for Java design and conceptual class diagram

70
Development of an application storing patients' data

Appendix 3. Prototype for interface design

71
Development of an application storing patients' data

Appendix 4. Interfaces of the patient management and release operation functions

72
Development of an application storing patients' data

Appendix 5. Interfaces of the doctor management, add doctor, update doctor, delete doctor,
search doctor, and view doctor functions

73
Development of an application storing patients' data

74
Development of an application storing patients' data

Appendix 6. Interfaces of the add patient, update patient, delete patient, search patient, view
patient, and appointment functions

75
Development of an application storing patients' data

76
Development of an application storing patients' data

Appendix 7. Interface of the nurse area

77
Development of an application storing patients' data

Appendix 8. Interfaces of the receptionist area, choose doctor, choose patient functions

78
Development of an application storing patients' data

Appendix 9. Interfaces of the view my information, binding relationship, change password,


set password, and release rights request functions

79
Development of an application storing patients' data

80
Development of an application storing patients' data

Risk and environmental impact assessment


1. Description of project

The Hospital Management System, or HMS, is a system for exchanging data online about
patient care, hospital operations, and personnel management across all of the hospital's
operational departments. This data is shared primarily using sophisticated computers, the
Internet, and other cutting-edge technologies. Its advantages over the conventional manual
management method are clear: Its management effectiveness is significantly boosted;
Information retrieval is more convenient and dependable; Information storage is increased;
and Daily management is more manageable. All information must be integrated, preserved,
processed, and shared by the system, which also offers authorized system workers the
necessary functional services to enable users to carry out their functional tasks and access
pertinent data.

The user types for this application's five sub-modules are administrator, doctor, nurse,
receptionist, and patient. Additionally, it implements features for adding, changing, removing,
searching, viewing, relationship binding, scheduling, and permission management for user
information. In order to assure secure data storage, the project also uses Base64 technology to
encrypt part of the data. The Java and MySQL technologies were used to create the project as
a whole.

2. Risk assessment table

Description Likelihood Impact Preventative


Description of Impact
of Risk Rating Rating Actions
The data and personal A firewall is added
information stored by users to the database and
Information
in the database may be 2 4 an encryption
leakage
accessed or leaked algorithm is applied
externally. to the data.
Missing or Users may use the 2 2 Ensure that the
invalid functions of the software system indicates that
operations when the operation is not the operation is
entered, resulting in data successful or the

81
Development of an application storing patients' data

data has been saved


not being processed.
after the operation.
Create a backup
Accidental loss of tables or database to store the
Data loss 1 3
items in the database. same information
synchronously.
The operating system or
System Debugging of the
software system crashes or
failures and 2 2 system on a regular
reports an error, making the
errors basis.
operation impossible.
The connection between the
database and Java done
Database using JDBC may not work, Use other connection
1 3
disconnection resulting in the system not methods.
being able to retrieve and
store data.

82

You might also like