Online Patient Appointment System
Online Patient Appointment System
ABSTRACT
The objective of this thesis was to develop an Online Doctor's Appointment and Medical
Database Management System . The purpose of implementing this application was to create a
system through which a patient can easily choose and make an online appointment for a doctor
just by sitting at home. The second objective was to replace manual medical file keeping
system with online database management system.
The application was successfully implemented by using famous technologies and programming
languages. This application does not aim to target any specific group but every individual who
wants to seek medical help and that is why it was kept in mind to keep the user interface simple
and friendly while building this application. Like all other applications, this application also has
a client side and a server side. This application was developed by using HTML, CSS, and
JavaScript at the client side while PHP and MySQL on the server side.
For now, basic functionalities have been implemented but for the future, work will be done to
link pharmacies and laboratories to the system. Online follow-up for the distant patients is
another feature that is aimed to add at later stages.
4
CONTENTS
1 INTRODUCTION ............................................................................................. 6
1.1 Main Purpose ............................................................................................. 7
1.2 Objective of the Project ............................................................................. 7
1.3 Aim of the Project ...................................................................................... 8
1.4 Project Scope ............................................................................................. 8
1.5 Study Limitation ........................................................................................ 8
2 LITERATURE REVIEW .................................................................................. 9
2.1 Waiting time .............................................................................................. 9
2.2 Appointment Delay .................................................................................... 9
2.3 Managing Patient’s Appointment ............................................................ 10
2.4 Online Booking ........................................................................................ 10
2.5 Existing System ....................................................................................... 11
2.5.1 Determination of Problem ............................................................. 11
2.5.2 Proposed System ...........................................................................12
2.6 Patient’s Appointment Time .................................................................... 13
2.7 APPLICATION TECHNOLOGIES ........................................................ 13
2.7.1 Web Server .................................................................................... 13
2.7.2 Programming Languages ..............................................................14
2.7.3 Software Tools ..............................................................................17
3 SYSTEM ARCHITECTURE .......................................................................... 18
4 REQUIREMENT AND SYSTEM DESIGN .................................................. 19
4.1 System Overview ..................................................................................... 19
4.2 Use Cases ................................................................................................. 19
4.2.1 Patient Use Case ...........................................................................21
4.2.2 Doctor’s Use Case ......................................................................... 25
4.2.3 Admin Use Case ...........................................................................30
4.3. System Design ......................................................................................... 32
4.3.1 Class Diagram ...............................................................................32
4.3.2 ER Diagram ..................................................................................33
5 SYSTEM IMPLEMENTATION AND SOFTWARE TESTING .................. 35
5.1 System Testing ......................................................................................... 35
5.2 User Interface Layout .............................................................................. 36
5. DISCUSSION .................................................................................................39
REFERENCES ..................................................................................................... 41
APPENDICES ...................................................................................................... 43
5
1 INTRODUCTION
Health care is one of the fastest growing industry all over the world. Before the last few
years, medical appointments were usually taken on the phone calls or by visiting the
hospitals in person. This process needed the involvement of individuals so, the ability to
take appointment was restricted to the availability of schedulers, phone lines or the
physical presence of a person.
With the growth of time, everybody demanded timeless and efficient medical care
delivery because manual appointments (that requires the physical presence of both
individuals) and long waiting lines have formed an irritating situation for the healthcare
institutions. So, it created a need for such an integrated health care system that could
deliver seamless care to both outpatients as well as inpatients. The emergence of online
appointment system offered timeless and efficient access to health care services.
Therefore, for hospitals and other medical societies, online appointment booking has a
great importance and a subject of interest (Koole, 2007).
Booking appointment online has become a new trend in the past few years and is
considered as one of the key processes in the healthcare industry. Bailey (1952)
considered scheduling system as a trade-off or a compromise between a doctor and
patient’s waiting times. Patients who get late for the appointments or who fails to come
becomes the reason for the underutilization of a doctor’s time. Idle time and
underutilization of doctor’s time are also resulted by gaps in the appointment times
(Bailey, 1954).
Different researchers agreed that main patient dissatisfaction is caused by long waiting
times. Cayirli (2003) defined access time as the time between patients’ request for the
appointment and the time he is checked up. According to Veral, waiting time is the time
between consultation and the scheduled time while neglecting the early arrival of a
patient (Veral, 2003). Different researchers defined waiting /access time in different
ways. A well-designed appointment system supposed to improve patients’ satisfaction
by reducing cost and time of clinics and hospitals especially in the busy lives we are
leading today.
7
With the growing population need for more efficient ways to access a medical treatment
is also growing. Through an online appointment scheduling system, a user gets access
to the doctor's online webpage and can make an appointment with online software.
Patient/user can also provide additional medical history in advance, giving adequate
time to the doctor to prepare the necessary information for consultation. In this way,
online appointment scheduling systems are helping doctors and the patients and making
the healthcare delivery efficient.
Nowadays there are many kinds of online appointment tools available in the market
which are easy to set up and not too much expensive. Online scheduling system offers
value-added services and lots of benefits to the doctors and patients. It makes the
patient appreciated by eliminating the hassle of long waiting times. Online appointment
systems are also getting popular because of its low-cost availability.
The main purpose of this project is to link and bring all major private medical clinics of
the city (of my country) to a single platform. So that patients can easily get access to the
doctor's profile and make online appointments. The second purpose is to create an
online medical history database so that doctors and patients can freely exchange
patients' medical history information much easier, faster, and safer.
The main objective of the thesis is to provide quality medical care to the patients by
bringing all medical practitioners of the city to a single platform so that everybody can
easily access them and make appointments. The second objective is to replace the
current manual file keeping system with an online medical patient database system.
8
The aim of this project is to create a platform where patients and doctors can access
/interact efficiently with each other and provide ease and comfort to the patients. It also
aims to resolve the problems that patients have to face while taking appointments and
keeping medical files. Patients can choose a medical practitioner based on their
professional profile and other patient's reviews.
This system is implemented for all the individuals who want to get treated by the city
practitioners. The users can participate only if they have created an account through the
registration form and have provided their medical history. Once they get registered
themselves further they would not need to update their record as it would be done
automatically after each doctor’s visit.
The lack of time was the main the limitation. Secondly, because there is no such system
in my country so there may be some difficulties to implement and convince people to
use this system.
9
2 LITERATURE REVIEW
Fernandes et al. (1994) defined waiting time as the period of time an individual wait
until a specific action occurs. Waiting time was also defined as the time a patient
entered a clinic or service point and gets consulted by a doctor with a prescription in his
hand. There are two different ways in which the waiting time has been defined in the
past. At first, waiting time is the time that starts when an individual comes for the
appointment and it continues until the individual gets consulted by the doctor. In the
second definition, it starts when an individual comes for taking appointment and ends
when he got prescribed medicine after being consulted by the doctor.
With the passage of time, long waiting lines at doctor’s clinics became a major problem
in developing countries. In a South African health clinic, block appointment system was
introduced as an experiment, in which waiting time for patients was measured for the
period of one week before and after the implementation of the appointment system.
During the experiment, interviews were taken from focus-group, staff, and patients and
from results it was realized that acute medically ill patients with prior appointments had
short waiting times as compared to the patients without appointments.
It has also been stated that the appointment system has no benefit for the patients not
seeing the doctor or who are taking routine repeated medication. Later it was realized
that the block appointment system offers shorter waiting time only for acutely ill
patients and not for others.
It has been proved in the past research that there is a direct relationship between
appointment delay and cancellation of the appointment. Appointment delay is defined as the
time which starts when an individual request for an appointment and ends until he/ she gets
consulted by the doctor. Longer appointment delays cause more appointment
10
In a health care centre, an application which is used to manage and minimize patient
waiting time is called managing patient's appointment system. Some health care clinics
use this kind of applications while some do not. Medical clinics who use such
applications usually have shorter waiting times as compared to those medical clinics
who do not use any appointment application. Patients who supposed to wait more than
an hour for their medical check-up feel disgraced and unfair. Patients can evaluate the
quality of any medical centre based on the waiting time they have to experience.
Therefore, it has become important to consider factors like “saving time” and
“minimizing idle time” while developing any patient’s appointment system. Whereas
according to Klassen (2002), scheduling doctor’s time and patient’s appointment
supposed to depend on the seriousness of the case and patient’s need.
pushed to recognize the need for better-quality care services. With the advancement of
information technology and the sensitive situation of medical care, online appointment
system emerged as an important output for efficient and timely delivery of health care
services. Earlier, appointment requests were used to make through the phone call, email
or fax but with the advancement of technology and internet, the trend changed towards
the proper online appointment systems.
According to Gruca (2004), a patient can make an appointment for a doctor either by
going directly to the doctor's clinic or making a manual appointment through the phone
call or sending the email. With the emergence of the internet, health care centres can
connect and communicate with their patients efficiently. Therefore, many healthcare
centres have started using online appointment systems. Such systems ensure efficiency
and effectiveness.
In Pakistan, there is a huge trend of private medical clinics and hospitals. Doctors run
their own private clinics and consult patients during the evening or any time of the day
depending on their availability. Some are popular and known to all while some are
known by few people. This situation proves to be a challenge for new practitioners as
they are known to very few people even if they have a good academic background. On
the other side, patients also face difficulty in finding and choosing a nearby doctor.
Unscheduled appointments, long waiting lines and keeping medical files in physical
form are also the common problems faced by the people/ patients of Pakistan.
When registering as a patient, the user can give all necessary medical history so that he
doesn't need to keep or bring his medical file when going for a check-up. Every time
13
when a user books his appointment, the doctor can easily get access to the patient’s
profile and also update medical record.
Scheduling appointments for the patients started long years ago. Primarily appointment
system was developed to minimize doctor’s idle time because it was thought that
doctors time is more valuable as compared to the patient’s waiting time. But later it was
realized that the importance of minimizing the patient's waiting time is as important as
the doctor’s time. So now while developing an appointment system doctor's idle time
and the patient's waiting time both factors are given equal importance. Patient’s
scheduling also includes improving quality health services, reducing doctors and nurses
idle time and reducing patient’s waiting time.
Role of a web server is to communicate between the client side and server side by storing,
processing and delivering web pages to the client side. Usually, web browser initiates the
communication using HTTP by sending the request of a specific resource and server gives
the response with the content of that requested resource. For this project work, Apache
HTTP server was chosen, and it exists on the WAMP service. Apache HTTP server is one of
the popularly used web server software used in a lot of project works.
14
Apache web server is a free, open source and most popularly used software. Apache
web server is used by many famous websites such as Apple, Wikipedia, and PayPal.
Another reason for its popularity is that it can run on multiple operating systems such as
Linux, UNIX, windows, and macOS. Another feature of Apache web server is that it
can host websites which use server-side language code (Perl, PHP). Because in this
project server-side implementation is done by using PHP so Apache was a good choice.
In this project, PHP was chosen as a server-side programming language and MySQL
was selected as a backend database. HTML, CSS, and JavaScript were used for the
client-side work.
PHP
One of the reasons for choosing PHP in this project is that it supports MySQL which is
chosen as a database in our project. PHP programming language makes easy to present
images and PDF files on HTML pages.
15
Client-side programming
For the development and designing of web pages HTML, CSS and JavaScript
languages were used. HTML for creating the web pages, CSS for styling and for adding
further functionalities JavaScript was used.
JavaScript
HTML
Hypertext markup language (HTML) is used for creating web pages and web
applications. It describes the structure of the web pages. Information from the HTML
documents is sent to the web browser to render or display on the multimedia pages.
Html used to describe the structure of a document by presenting a document in a
heading, paragraph, image, list, links and other objects like that. Web browser presents
the HTML document by using its tags.
CSS
It is important to make HTML pages attractive to the users and for this purpose, developers
choose colors, nice fonts, and different layouts. All this work is done by the CSS. In short,
CSS is used for styling of a HTML document. It is designed in such a way that enables
separation of content and presentation so that it makes easier any change of
16
content without interfering with a design. It also enables multi web pages to share the
single CSS file for styling to reduce repetition and complexity.
Backend technology
MySQL
Applications which demand availability and scalability use MySQL. Because it has the
capability to recover and cope with failures on the host, MySQL, operating system or
the hardware that may cause downtime. Scalability refers to the ability to spread the
database as well as application queries. MySQL is reliable for data security. MySQL has
a good memory management system and provides multiple development interfaces
(ODBC, JDBC).
Since MySQL is a free open source software so anyone can download it without paying
anything and make changes into the source code. For this project, MySQL was chosen
because it is very easy to use and PHP's ability to work with MySQL.
17
For this project work following source tools were chosen to perform various tasks:
Notepad++
Notepad++ is an unrestricted, plain text editor used widely by developers for Microsoft
Windows. Notepad++ supports several languages and is used to write and edit code. In
this project Notepad++ is used to write HTML, CSS, PHP and JavaScript codes. Its
main features include syntax highlighting, correcting and auto-completion.
XAMPP Server
XAMPP is a free and open source software which empowers technologies, processes, and
machines to link and work together. It is established by Apache. It stands for x-OS, Apache,
MySQL, PHP, and Perl and used as a stage for coding and designing web pages.
Xampp is very easy to install and has the capability to run on several platforms. Xampp has
very strict security settings and with a single command it can start and stop the server.
18
3 SYSTEM ARCHITECTURE
The system architecture of this system is divided/split into two parts. One is the client
side and the other is the server side. Client-side is the user interface whereas the server
side is the combination of web pages written by PHP and the MySQL database. PHP
pages contain the written SQL queries which make the accessibility to database
possible. The following figure shows the architecture of the system while the detail of
the technologies used in this application is discussed in chapter 2.
19
• Every individual either a doctor or a patient will have an independent id, name and a
profile. Doctors are further categorized by the specialty of practice (i.e. Obs/Gyne,
Urology, Internal Medicine etc.)
• The user (patient) can get, change or cancel appointment time and view medical
record while the doctor can make changes in his calendar and accept or reject
appointment request by log in to the site and accessing his/her personal page.
To explain the better view and functionalities of the system, use case diagrams are
chosen. The use case diagram is important to document the requirement of the system
as well as to specify functionalities of the system. Use case diagrams better explain the
way the user interacts with the system.
20
Use-Case 1: Registration
Basic use-case flow: For the registration process, the user/patient needs to give some
information by filling the form. Some of the required information includes the following:
First name
Last name
22
Gender
Email address
National ID no.
Main scenario: The user/patient will go onto the patient sign-up button either from the
main page or from the drop-down menu. After clicking the sign-up button, a registration
form will appear, where the user must give his personal information i.e. name, gender,
email address, CNIC, any medical history etc. After giving the required information
user will submit the form. If all the fields are filled including the valid email address
and CNIC, the user will be registered onto the system. In case of any missing entry or
invalid format of an email or CNIC, the error occurs onto the page.
Use-case 2: Login
Primary-actor: Patient/user.
Description: Before taking any appointment or get access to his medical record, the
user must have to provide his username and password.
Basic use-case flow: a valid username with a password must be entered by the user.
Main scenario: To be able to get into the system, the user needs to enter his username
and password either from the main page or from the drop-down menu from the top of
the page. After clicking onto the login button, authentication request will be forwarded
to the system.
Description: In this use-case, any registered or unregistered user, can look and search
for a doctor of any desired specialty.
Basic use-case flow: By going into the category of any specific specialty, the user can
view the list of all registered doctors.
Main scenario: The user will go to the down menu at the top of the page. A list of all
specialties will appear in a drop-down list. The user will hit on the desired specialty.
After that, a page will open with all doctors of that specific specialty. Now the user has
the choice to choose any doctor based on qualification, experience, location etc.
Primary-actor: User/patient
Basic use-case flow: The patient/user hits the button for taking an appointment for the
doctor. A list of available timings will appear for the chosen date. The user will select
the suitable time for him and send the request for approval.
24
Main scenario: The user will hit the button for "take appointment". List of available
timings will appear for a chosen date. The user selects the suitable time. The user will
hit the submit button to send the request for approval.
Primary-actor: User/patient
Basic use-case flow: The user/patient will click on the name of the patient and it opens
the patient's profile. By going into it the user can view the history by clicking on the
button for the patient’s old reports/history.
Main scenario: The user clicks on the name of the patient and then press the button
“view history” to view old reports.
Primary-actor: User/patient
Basic use-case flow: the user can sign out himself from the system.
25
Main scenario: the user clicks on the log out button. The system will bring the user to
the main page for the generic user.
Use-case 1: Registration
Description: To get online appointment requests, the doctor must register himself as a
user on the application/system.
Basic use-case flow: To register as a doctor, the user must fill the form. Required fields
include the following information:
Full name
Email address
National identity number
Qualification
Experience
Valid PMDC certificate (Practicing license issued by the PMDC authority)
Clinic address
Clinic timings
Main scenario: The user/ doctor has to go onto the doctor’s sign-up button either from
the drop-down menu at the top or from the main page. After clicking the sign-up button,
a registration form will appear, where doctor/user has to give his personal as well as
professional information i.e. name, clinic address, qualification, working experience etc.
The user must give valid PMDC certificate for the registration process. After giving the
required information user/ doctor will submit the form. If all the fields are filled, request
for registration will be sent to the admin. As soon as admin receives a request for a
doctor's registration he will verify his documents and only then the user will be accepted
/registered. In case of any missing entry or invalid format of email or CNIC, an error
occurs onto the page. PMDC certificate is a license or a proof that an individual is
allowed by the authority to practice medicine. Any user fails to give valid PMDC
certificate issued by PMDC authority will not be allowed to register as a doctor. PMDC
certificate is important to avoid any scam.
27
Use-case 2: log in
Primary-actor: User/doctor
Description: For further functions, the user must have to provide his email address and
password.
Basic use-case flow: user/doctor should provide his username and password to log in.
Main scenario: To be able to get into the system, the user needs to enter his username
and password either from the main page or from the drop-down menu from the top of
the page. After clicking onto the login button, an authentication request is forwarded to
the system.
Primary-actor: User/doctor
Basic use-case flow: After logging in, the user/patient selects the date from the
calendar to filter out the appointment.
28
Main scenario: After signing in, the user/doctor can view the page of his calendar. The
user will select the month and date to see the appointments of that period or date. The
user can view all the patient's appointments of any date.
Primary-actor: User/doctor
Basic use-case flow: User/doctor selects any date and decides to accept or reject any
appointment request.
Main scenario: After logging in, all the patient's appointment requests will be
appearing on the calendar according to the dates. User /Doctor will select the date from
the calendar. User /Doctor can view all the appointment requests. User /Doctor can
select the option to accept or reject the appointment request from the drop-down menu.
Primary-actor: User/doctor
Basic use-case flow: After selecting the date, user/doctor selects the patient.
User/doctor can view the patient's detail and medical history.
Main scenario: After selecting the date, list of patients of that particular date will
appear. User /Doctor will select the patient. User (doctor) can view his all information
including the medical history by clicking on the "view patient" button
Primary-actor: User/doctor
Description: User/doctor would be able to write his own comments into the patient's
medical profile.
Basic use-case flow: After clicking on the "write comments" button, user/doctor can
add his own reviews after checking the patient.
Main scenario: User/doctor will hit the "write comments" button. User (doctor) will
write his or her comments. User/doctor will hit the submit button.
Primary-actor: User/doctor
Basic use-case flow: the user/doctor can sign out himself from the system.
Main scenario: the user/doctor clicks on the log out button. The system will bring the
user to the main page for the generic user.
The class diagram is chosen to explain the design phase of the system. A class diagram
describes classes of the system, attributes, and operations and relationships of the
classes in a better way. We can also say that class diagrams are used to justify the
structure or behavior of use cases of the system. Class diagrams best explain the
conceptual model of the system in terms of entities and their relationships. The class
diagram looks like a shape of a rectangle, comprising three compartments stacked
vertically. The first top box comprises the class name, the second middle box contains
the attributes of the class and third the last box contains the methods or functions
performed by that class. The first compartment /box of the name is compulsory while
rest of the two can be omitted to simplify the diagram. So, in any class diagram first
compartment must be drawn while the second two compartments are optional.
The class "patient" contains multiple parameters (such as id, name, age, address), which
depict the information of all the registered patients. The user class also contains the
methods performed by these users such as get appointment, view/ create own medical
record etc. In the same way, the class "doctor" has the parameters id, name, department,
address possessing all the required information of the users registered as a doctor on to the
system. Methods include accept/reject the appointment, check the patient, view a medical
record of any patient etc. These methods are the functions performed by the users
registered as a doctor on the system. The class “appointment” has the parameters of date
and time, explaining what time or day patient user has requested for the
33
appointment to the doctor. The class “department” has the parameters id and name and
methods include add/ delete doctor and add or delete department. Every doctor user
must belong to any department class. The “report” is another class containing methods
like write report or prescribes medicine. In the end, class “admin” contains the
parameters like id and name and methods of this class include manage users.
4.3.2 ER Diagram
A basic ER model consists of objects called entities and specifies relationship among
those entities. Purpose of this diagram is not to define any functionality rather show
association and dependency among entities. ER diagram is drawn with "rectangular
boxes" as entities and the "straight lines" showing the relationship between these boxes.
An entity is an object or a thing that has an independent existence and can be easily
differentiated from others. Each entity has some attributes like name, age, address,
department etc. In the following diagram the doctor, patient, appointment, admin etc, all
are different entities. So, an entity can be a person, animal, plant, event or a company.
34
Entities consisting of similar attributes make the entity sets. These entities have some
association among each other which make a relationship. These relationships can be
"one to one" or "one to many" or "many to many". For example, a doctor and
department can have "one to many" relationships, means one department can have many
doctors but one doctor is related to only one department.
Figure 6: ER Diagram
35
For the sake of software quality assurance, system testing is a very essential thing to do.
It is a process by which we try to make the system error proof by performing the
program to find an error. The goal is to run the program, find errors or bugs and then fix
them. Testing is considered a very essential step in software development and any
system is not considered to be complete without this process. Different developers
follow different approaches for system testing. System testing is followed to make sure
that system is working fine and meets the requirements.
ID card
no
This online clinical appointment system is the first system to be implemented in Pakistan,
so it is very important to keep the interface simple and easy to be easily understood by a
user. For this purpose, simple and common UI elements are used. It makes the common user
to easily understand the system and get used to it. The below-given figure shows the
prototype of the system. There is a horizontal menu list on top of the home page. This menu
list contains drop down buttons such as specialization, patient, doctor, and contact. All these
buttons open a new webpage. When a user brings cursor onto the specialization button, a
drop-down menu list appears showing/ containing all the existing departments. All doctors
are classified based on the departments or specialty. The user can choose to view the
doctors of any specific specialty by clicking on this button. Next comes the button for the
doctor. The user can register himself or sign in if he already has an account. Next button on
the menu is for the patient, the user can again sign up or sign in if he/she has already an
account. The last button on the menu bar is of “contact us”. Any user can call or send an
email to the admin by using this option. This page contains all the information or possible
ways to contact in case of any need. When we go down of the homepage there is a big
picture to make the page look good and then again there are two blocks for the doctor
registration/ sign in and patient registration/sign in.
37
https://theseus.fi/bitstream/handle/10024/121504/Aljaf_Begard.pdf?sequence=1
http://airccse.org/journal/jcsit/6414ijcsit05.pdf
APPENDICES