6 CHATBOT .. .38 Flowchart ... 39
6 CHATBOT .. .38 Flowchart ... 39
CONTENTS
1 INTRODUCTION.............................................................................................6
Main Purpose 7
Objective of the Project 7
Aim of the Project 8
Project Scope 8
Study Limitation 8
2 METHODOLOGY………………….………………………………………..9
Waiting time 9
Appointment Delay 9
Managing Patient’s Appointment..........................................................................................................10
Online Booking 10
Existing System 11
Determination of Problem 11
Proposed System 12
Patient’s Appointment Time..................................................................................................................13
APPLICATION TECHNOLOGIES......................................................................................................13
Web Server 13
Programming Languages 14
Software Tools 17
3 SYSTEM ARCHITECTURE..........................................................................18
4 REQUIREMENT AND SYSTEM DESIGN...................................................19
System Overview 19
Use Cases 19
Patient Use Case 21
Doctor’s Use Case 25
Admin Use Case 30
System Design 32
Class Diagram 32
ER Diagram 33
Flowchart………………………………………………………………………...39
ABBREVIATIONS AND TERMS
jQuery
JavaScript Library (chatBot)
UI User Interface
XAMPP X-OS, Apache, MySQL, PHP, and Perls
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 .
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. 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.
Main Purpose
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 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.
Aim of the Project
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. While doctors can access and update a
patient’s medical record after every checkup.
Project Scope
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.
Study Limitation
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.
2 METHODOLOGY
Waiting time
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.
Appointment Delay
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
cancellations. So, the best way to reduce appointment cancellations or no-shows is to
minimize the time gap between the appointment request and doctor’s check-
up/consultation time. Minimizing this gap is called open access (abbreviated as OA) or
advance access policy which later became a popular practice and part of an active
research also. Both positive and negative results were experienced by the researchers in
their experiments. Some practitioners were in the favor of OA and highly recommended
it, and on the other hand, there were some practitioners who disagreed and were against
of OA implementation.
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.
Online Booking
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.
Existing System
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 India.
Determination of Problem
Proposed System
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
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.
APPLICATION TECHNOLOGIES
Web Server
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.
Apache web server
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.
Programming Languages
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.
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
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.
Software Tools
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.
2 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.
3 REQUIREMENT AND SYSTEM DESIGN
System Overview
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.
Use Cases
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.
Figure 1: Use Case Diagram
Patient Use Case
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
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.
Use-case 4: Take
Appointment Primary-actor:
User/patient
Description: After choosing a doctor user will go further to send an appointment request
from the available timings.
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.
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
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.
Exception: False documents, expired or invalid PMDC certificate, missing fields,
expired national ID card or inactive email.
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.
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.
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
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
Description: the user/doctor will log out from the system.
Precondition: the user/doctor must be signed in
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.
Use-case 1: Login
Primary-actor: Admin/administrator
Description: A user, who possesses admin username and password, owns administrative
rights.
Main scenario: Admin/user enters valid username and password. After verification, the
user will be logged in as an admin and can use all the administrative rights.
Primary-actor:
Admin/user
Basic use-case flow: Admin/user can view, edit or delete any user information.
Main scenario: Admin can view, edit or delete any user or any information related to
user doctor or user-patient.
Primary-actor:
Admin/user
System Design
Class Diagram
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
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.
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.
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
4 SYSTEM IMPLEMENTATION AND SOFTWARE TESTING
System Testing
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.
Tes Test case Preconditio Priorit Input Steps to Expected Successfu
t name n y test data be Result l or not
cas executed
e
ID