Download as pdf or txt
Download as pdf or txt
You are on page 1of 80

AN INTEGRATED AI CONVERSATIONAL INTERFACE

WITHIN A HEALTHCARE ADMINISTRATION


FRAMEWORK

submitted in partial fulfillment of the requirements


for the award of the degree in

MASTER OF COMPUTER APPLICATIONS

By

KAMAL RAJ G (224012101167)

DEPARTMENT OF COMPUTER APPLICATIONS

MAY 2024
DECLARATION

I KAMAL RAJ G (224012101167), hereby declare that the Project Report entitled
“AN INTEGRATED AI CONVERSATIONAL INTERFACE WITHIN A
HEALTHCARE ADMINISTRATION FRAMEWORK” is done by me under the guidance
of Dr. S. SUBATRA DEVI is submitted in partial fulfillment of the requirements for the
award of the degree in MASTER OF COMPUTER APPLICATIONS.

SIGNATURE OF THE CANDIDATE

DATE :

PLACE :
DEPARTMENT OF COMPUTER APPLICATIONS

BONAFIDE CERTIFICATE

This is to certify that this Project Report is the bonafide work of Mr. KAMAL RAJ G
Reg. No 224012101167, who carried out the project entitled “AN INTEGRATED AI
CONVERSATIONAL INTERFACE WITHIN A HEALTHCARE ADMINISTRATION
FRAMEWORK” under our supervision from Dec 2023 to May 2024..

Internal Guide Project Coordinator Dept. Head


Name Name Name
Designation Designation Designation

Submitted for Viva Voce Examination held on_________________

Internal Examiner External Examiner


ACKNOWLEDGEMENT

First of all I would like to thank our beloved Chancellor Thiru. A.C. Shanmugam,
President Er. A.C.S Arun Kumar and Secretary Thiru A. Ravikumar for giving me
chance to pursue this degree and continuous support throughout the years of study in
our esteemed institution.
I also thank our Vice Chancellor Dr. S. Geetha Lakshmi for the support
whenever needed.
I extend my thanks to our Head of the Department Dr. Viji Vinod for kind advices
and timely encouragement throughout academic tenure and project.

My sincere thanks to our project coordinator DR.C. PRIYA and project guide

DR.S. SUBATRA DEVI for the full support, continuous encouragement and remarkable
guidance to complete the project successfully.

I would also like to thank all the teaching and non-teaching staff of the Department
of Computer Applications for their constant support through the period of study.

I am grateful to my Parents whose blessings and care have lead to achieve


new heights in my academics.
TABLE OF CONTENT

I. INTRODUCTION
1.1 Introduction 1
1.2 Problem Introduction 2
1.3 Modules in the Project 4

II. REQIREMENTS SECIFICATION


2.1 Introduction 6
2.2 Hardware Requirement 7
2.3 Software Requirement 8

III. SYSTEM ANALYSIS


3.1 Existing System 09
3.2 Proposed System 10
3.3 Feasibility Study 11
3.4 Software Specification 12

IV. DESIGN AND IMPLEMENTATION


4.1 System Design
4.1.1 Introduction to UML 21
4.2 Class Diagram 23
4.3 Use Case Diagram 24
4.4 Sequence Diagram 25
4.5 Collaborative Diagram 26
4.6 Deployment Diagram 27

i
V. TESTING
5.1 Introduction 29
5.2 Testing methods 32

VI. SYSTEM IMPLEMENTATION


6.1 Module Description 34
6.2 Algorithms 37

VII. CONCLUSION AND FUTURE ENHANCEMENT


7.1 Conclusion 43
7.2 Future Enhancement 44

VIII. APPENDICES
8.1 Coding 45
8.2 Screen Shots 59

IX. BIBLIOGRAPHY
9.1 Bibliography 72

ii
LIST OF FIGURES

CHAPTER 4
Fig 4.2 Class Diagram 23
Fig 4.3 Use case Diagram 25
Fig 4.4 Sequence Diagram 26
Fig 4.5 Collaboration Diagram 27
Fig 4.6 Deployment diagram 28

CHAPTER 8

SCREENSHOTS
59
Fig 8.2.1
Fig 8.2.2 60
Fig 8.2.3 61
Fig 8.2.4 61
Fig 8.2.5 63
Fig 8.2.6 64
Fig 8.2.7 65
Fig 8.2.8 66
Fig 8.2.9 67
Fig 8.2.10 68
Fig 8.2.11 69
Fig 8.2.12 70
Fig 8.2.13 71

iii
ABSTRACT

The reason of the venture entitled as “An Coordinates AI Conversational Interface inside a
Healthcare Organization Framework” Counterfeit Insights (AI) integration into healthcare
organization systems has gotten to be a game-changing procedure that guarantees expanded
openness, exactness, and productivity. The objective of this venture is to utilize PHP, MySQL, and
Google Discourse Stream to form an AI-powered conversational interface interior a healthcare
organization system.

Utilizing Google Exchange Streams characteristic dialect handling (NLP) calculations, the
arrangement makes it conceivable for clients and the framework to communicate consistently
whereas taking care of authoritative inquiries, booking arrangements, and overseeing
understanding information. This extend serious to address the challenges confronted in
conventional healthcare organization frameworks by presenting an instinctive and shrewdly
conversational interface. The utilize of PHP as the essential programming dialect and MySQL as
the backend database administration framework offers a strong establishment, complemented by
the capable AI capabilities of Google Exchange Stream. Through Discourse Flow's NLP
calculations, the framework will get it, translate, and react to client inquiries or commands, giving
significant data, helping in authoritative errands, and streamlining the in general healthcare
administration handle.

iv
CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION

The Coordinates AI Conversational Interface inside Healthcare Organization system marks a


critical jump forward in healthcare innovation integration, mixing the strong functionalities of PHP
and MySQL with the AI ability of Google Dialog flow. This venture stands as a comprehensive
arrangement balanced to rethink the scene of persistent intuitive and authoritative workflows inside
healthcare teach. Through a fastidious plan prepare, this stage points to enable patients, specialists,
and chairmen alike, advertising a consistent and natural encounter over the board. At its center,
this extend looks for to improve understanding engagement and streamline regulatory forms by
tackling the control of AI-driven chatbot innovation. Patients getting to the stage will discover
themselves drenched in a user-friendly environment where they can easily look for therapeutic
data, investigate point by point specialist profiles, and start arrangement bookings—all encouraged
by the brilliantly conversational interface fueled by Google Dialog flow.

This level of openness and comfort is expecting to bridge the hole between patients and healthcare
administrations, cultivating a more proactive and educated approach to healthcare administration.
Besides, the framework expands its capabilities to specialists and directors through secure login
entries custom-made to their particular parts and obligations. Specialists pick up get to a
comprehensive dashboard where they can oversee persistent arrangements, survey therapeutic
records, overhaul accessibility, and communicate consistently with patients—all inside a
centralized and secure environment. On the authoritative front, the stage prepares directors with
strong devices for client administration, arrangement planning, charging, and creating quick reports
to bolster data-driven decision-making. As healthcare proceeds to advance, the significance of
leveraging innovation to optimize understanding care and streamline regulatory errands cannot be
exaggerated. The Coordinates AI Conversational Interface inside Healthcare Organization system
speaks to a proactive reaction to this advancing scene, advertising a adaptable and versatile
1
arrangement that prioritizes proficiency, availability, and patient-centricity. By bridging the hole
between progressed AI capabilities and commonsense healthcare applications, this extends points
to set unused guidelines for healthcare conveyance, eventually upgrading the by and large quality
of care and persistent results.

1.2 PROBLEM INTRODUCTION

Despite significant advancements in healthcare technology, several challenges persist in patient


care delivery and administrative efficiency within healthcare institutions. Traditional methods of
patient-doctor interactions and administrative processes often face hurdles that hinder seamless
communication, efficient appointment scheduling, and comprehensive healthcare management.
These challenges include:

Communication Barriers: Patients often encounter difficulties in accessing timely and accurate
medical information or communicating their healthcare needs effectively. This can lead to
misunderstandings, delays in treatment, and suboptimal patient outcomes.

Data Fragmentation: Healthcare institutions typically deal with vast amounts of patient data,
medical records, and administrative information. The lack of a unified system for data management
can lead to data fragmentation, duplication, and challenges in accessing comprehensive patient
profiles when needed.

Administrative Overload: Doctors and administrative staff often face heavy workloads due to
manual data entry, paperwork, and administrative tasks. This can impact productivity, increase
stress levels, and detract from focusing on delivering quality patient care.

Patient-Centricity: In today's healthcare landscape, there is a growing emphasis on patient-centric


care, personalized treatment plans, and proactive health management. However, traditional systems
may not fully support these evolving patient expectations and healthcare trends.

2
Objective: -

1) Revolutionize patient care delivery.


2) Streamline administrative processes.
3) Enhance communication channels.
4) Implement AI-driven chatbot technology.
5) Develop a robust appointment scheduling system.
6) Ensure data integrity and accessibility.

These are the various jobs that need to be done in a hospital by the operational Staff and Doctors.
All these works are done on papers.

Scope of the Project: -

The scope of the Integrated AI Conversational Interface within Healthcare Administration


framework project encompasses the following areas:

AI Chatbot Integration: Implementing Google Dialog Flow to develop an AI-driven


conversational interface for patients to query medical information, explore doctor profiles, and
schedule appointments.

Patient Dashboard: Designing a user-friendly interface for patients to interact with the chatbot,
view doctor listings, schedule appointments, and access relevant healthcare resources.

Doctor and Administrator Portals: Creating secure login portals with role-based access control for
doctors and administrators to manage patient records, appointment schedules, communication,
billing, and reporting.

Database Management: Setting up a MySQL database to store and manage patient data, doctor
details, appointment schedules, and administrative information, ensuring data integrity and
accessibility.

3
Appointment Scheduling System: Developing a robust appointment scheduling system that
integrates with the AI chatbot, allowing patients to schedule appointments based on doctor
availability, specialties, and preferences.

Communication Channels: Facilitating seamless communication channels between patients,


doctors, and administrators for real-time interactions, appointment reminders, and efficient
coordination of healthcare services.

Security and Compliance: Implementing robust security measures, data encryption protocols, and
compliance with healthcare regulations such as HIPAA to ensure patient data confidentiality,
privacy, and regulatory compliance.

1.3 MODULES

The entire project mainly consists of 3 modules, which are


❖ Admin module
❖ User module (patient)
❖ Doctor module

Admin Module:

▪ User management including account creation, updates, and role assignments.


▪ Appointment management for scheduling, rescheduling, and cancellations.
▪ Doctor management for adding, updating specialties, and deactivating accounts.
▪ Access to patient records for viewing and updating medical information.
▪ Reporting and analytics tools for generating various system and performance reports.
▪ System Reports: Generate reports on system usage, user activity, and appointment statistics.
▪ Performance Monitoring: Monitor the performance of the system and identify areas for
improvement.
▪ Audit Trails: Maintain audit trails to track changes and access to sensitive data for security
and compliance purposes.

4
User Module(patient):

▪ Users can access the platform's home page, doctors list, and AI chatbot without requiring
separate login credentials.
▪ The AI chatbot allows users to query medical information, check doctor availability, and
receive assistance in scheduling appointments through designated channels.
▪ The platform prioritizes a user-friendly interface for seamless navigation and effective
interaction with healthcare resources.
▪ Users have access to comprehensive information about doctors' specialties, profiles, and
availability to make informed healthcare decisions.

Doctor Module:

▪ Doctor login provides secure access to patient data for viewing medical records, managing
appointments, updating treatment progress, and prescribing medications.
▪ Communication tools enable doctors to interact with patients and provide remote
consultations.
▪ Integration with diagnostic systems allows doctors to review test results for comprehensive
patient assessments.
▪ Adheres to data privacy regulations like HIPAA for ensuring patient data confidentiality
and regulatory compliance.
▪ Access to Records: View and manage patient medical records securely.
▪ Record Updates: Update patient records with new information, test results, and treatment
plans.
▪ Data Privacy: Ensure all patient information is handled in compliance with data protection
regulations.

5
CHAPTER 2
REQUIREMENT SPECIFICATION

2.1 INTRODUCTION

The requirements specification section outlines the functional and non-functional requirements of
the Integrated AI Conversational Interface within Healthcare Administration framework, defining
the system's capabilities, constraints, and performance expectations. This includes a detailed
breakdown of user requirements, system functionalities, data management, security measures, user
interfaces, and other essential aspects essential for successful project implementation and
stakeholder satisfaction.

The healthcare administration framework integrated with Google Dialog Flow requires a robust
setup to ensure seamless operation. The development environment should run on Windows 10/11,
macOS, or Linux (such as Ubuntu or CentOS), while the server environment is best supported on
Linux (Ubuntu Server 18.04 or later, or CentOS 7 or later) to ensure stability and security. For the
web server, Apache HTTP Server version 2.4 or later is recommended, although Nginx version
1.18 or later can be used if preferred for its performance benefits. The database management system
requires MySQL version 5.7 or later to handle data storage efficiently, with MariaDB version 10.3
or later as an alternative. The primary programming language is PHP, with version 7.4 or later
necessary for utilizing the latest features and security improvements. Additionally, Python version
3.6 or later is needed for integrating with Google Dialogflow and handling additional processing
tasks.

To manage PHP dependencies and libraries, Composer is essential, alongside the Google Cloud
PHP Client Library for integrating with the Google Dialogflow API. If Nginx is used as the web
server, PHP-FPM is necessary for efficient PHP script processing. Google Dialogflow provides
advanced natural language processing capabilities to handle patient queries effectively, making it
a pivotal component of the project.
6
On the hardware side, a minimum of 8 GB RAM is recommended for development machines to
ensure smooth operation, while production servers should ideally have 16 GB RAM or more to
handle multiple concurrent users. A multi-core processor (quad-core or higher) is advisable for
both development and production environments to ensure efficient processing. Additionally, a
solid-state drive (SSD) is recommended for fast read/write operations and overall better
performance.

In summary, the software and hardware requirements for this project are carefully selected to
ensure robust performance, security, and scalability, supporting the integration of PHP, MySQL,
and Google Dialog Flow for an effective healthcare administration framework.

2.2 HARDWARE REQUIREMENTS

The most common set of requirements defined by any operating system or software application is
the physical computer resources, also known as hardware. A hardware requirements list is often
accompanied by a hardware compatibility list (HCL), especially in case of operating systems. An
HCL lists tested, compatibility and sometimes incompatible hardware devices for a particular
operating system or application. The following sub-sections discuss the various aspects of
hardware requirements.

Hardware Requirements for Present Project:

PROCESSOR : Intel Dual Core i3


RAM : 2 GB
HARD DISK : 80 GB

7
2.3 SOFTWARE REQUIREMENTS

Software Requirements deal with defining software resource requirements and pre-requisites that
need to be installed on a computer to provide optimal functioning of an application. These
requirements or pre-requisites are generally not included in the software installation package and
need to be installed separately before the software is installed.

Software Requirements for Present Project:

OPERATING SYSTEM : Windows 7/ XP/8


FRONT END : HTML,CSS, JavaScript.
SERVER SIDE SCRIPT : PHP
DATABASE : MySQL

8
CHAPTER 3
SYSTEM ANALYSIS

3.1 EXISTING SYSTEM

The existing system is designed to intelligently leverage the data provided by users in previous
interactions to enhance the overall user experience and provide tailored responses. Through the
integration of a robust database management system, the system stores and organizes user inputs,
preferences, and historical data, allowing for efficient retrieval and utilization during subsequent
interactions. This data-driven approach enables the system to understand user preferences, track
past queries, and deliver personalized recommendations or responses based on the context of the
conversation.

For instance, if a user previously inquired about a specific medical condition or treatment option,
the system can recall this information and provide follow-up suggestions, relevant articles, or
updates related to the user's interest. Similarly, in the case of appointment scheduling, the system
can access past appointment history, doctor availability, and user preferences to facilitate seamless
scheduling and avoid conflicts.

Manual Processes:

• Appointment scheduling is frequently handled through phone calls, requiring administrative


staff to manually enter and update schedules in paper-based calendars or standalone
software.
• Patient intake forms and medical history are often filled out manually on paper, then
transcribed into electronic systems, increasing the risk of data entry errors.

9
Disparate Systems:

• Electronic Health Records (EHR) systems, if used, are often not integrated with other
administrative tools, leading to difficulties in accessing comprehensive patient information.
• Multiple software solutions might be used for billing, scheduling, and medical records,
creating silos of information that are hard to reconcile.

3.2 PROPOSED SYSTEM

The proposed system is designed to integrate an AI conversational interface within a healthcare


administration framework using PHP and MySQL, with the AI chatbot powered by Google Dialog
Flow. This system will feature two distinct login portals for doctors and administrators, providing
a secure environment for user interactions. Patients will engage with the system through a chatbot
on the homepage, enabling them to query information and access a comprehensive list of available
doctors.

The proposed healthcare administration framework, integrated with Google Dialog flow, aims to
address these inefficiencies by creating a unified, automated, and user-friendly system. Developed
using PHP and MySQL, this system leverages Dialog flow’s natural language processing
capabilities to enable a conversational AI interface for patients. Patients can interact with the
chatbot to inquire about services, check doctor availability, and manage their appointments through
a seamless and intuitive interface. The Doctors Module allows healthcare providers to manage their
schedules, access patient records, and update medical information efficiently. It also includes tools
for secure communication with patients, enhancing the continuity of care.

The Admin Module centralizes system management, user roles, and permissions, ensuring data
security and compliance with healthcare regulations. This module also supports system
customization, integration with other healthcare applications, and comprehensive reporting and
analytics. By streamlining appointment scheduling, patient record management, and
communication, the proposed system reduces administrative workload, minimizes errors, and
enhances the overall patient experience. Additionally, future enhancements such as direct
appointment booking via the chatbot, telemedicine features, and machine learning-driven
10
personalized healthcare recommendations will further elevate the system's capabilities, making it
a cutting-edge solution for modern healthcare administration

Key components of the system include robust user authentication mechanisms, seamless
integration of Google Dialog Flow for chatbot functionality, and the implementation of
appointment booking capabilities within the chatbot interface. By incorporating a scheduling
system, patients will be able to request appointments with doctors of their choice, while ensuring
real-time updates to doctor schedules within the healthcare administration framework.
Furthermore, the system will showcase a user-friendly interface tailored for patients, doctors, and
administrators, with a focus on responsive design for optimal accessibility across various devices.
Database management will be handled through MySQL, safeguarding sensitive user data,
appointment schedules, and doctor information. Extensive documentation will be provided,
detailing system architecture, functionalities, user roles, and technical specifications, along with
user manuals for seamless interaction with the system.

3.3 FEASIBILITY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
Three key considerations involved in the feasibility analysis are:

Economic Feasibility:
This study is carried out to check the economic impact will have on the system will have
on the organization. The amount of fund that the company can pour into the research and
development of the system is limited. The expenditures must be justified. Thus the
developed system as well within the budget and this was achieved because most of the
technologies used are freely available. Only the customized products have to be purchased.

11
Technical Feasibility:
This study is carried out to check the technical feasibility, that is the technical requirements
of the system. Any system developed must not have a high demand on the available
technical resources. This will lead to high demands being placed on the client. The
developed system must have a modest requirement, as only minimal or null changes for the
implementing this system.

Operational Feasibility:
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not
feel threatened by the system, instead must accept it as a necessity. The level of
acceptance by the users solely depends on the methods that are employed to educate
the user about the system and to make him familiar with it. His level of confidence must
be raised so that he is also able to make some constructive criticism, which is welcomed,
as he is the final user of the system.

3.4 SOFTWARE SPECIFICATION

HTML:
HTML or Hypertext Markup Language is the standard markup language used to create web
pages.

HTML is written in the form of HTML elements consisting of tags enclosed in angle
brackets (like <html>). HTML tags most commonly come in pairs like <h1> and </h1>, although
some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair
is the start tag, and the second tag is the end tag (they are also called opening tags and closing
tags). Though not always necessary, it is best practice to append a slash to tags which are not paired
with a closing tag.

The purpose of a web browser is to read HTML documents and compose them into visible or
audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the
content of the page. HTML describes the structure of a website semantically along with cues for
presentation, making it a markup language rather than a programming language.

12
HTML elements form the building blocks of all websites. HTML allows images and objects to be
embedded and can be used to create interactive forms. It provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs, lists, links,
quotes and other items. It can embed scripts written in languages such as JavaScript which affect
the behavior of HTML web pages.

CASCADING STYLE SHEETS (CSS):

It is a style sheet language used for describing the look and formatting of a document written in a
markup language. While most often used to style web pages and interfaces written
in HTML and XHTML, the language can be applied to any kind of XML document,
including plain XML, SVG and XUL. CSS is a cornerstone specification of the web and almost all
web pages use CSS style sheets to describe their presentation.

CSS is designed primarily to enable the separation of document content from document
presentation, including elements such as the layout, colors, and fonts.[1] This separation can
improve content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple pages to share formatting, and reduce complexity and
repetition in the structural content .

CSS can also allow the same markup page to be presented in different styles for different rendering
methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen
reader) and on Braille-based, tactile devices. It can also be used to allow the web page to display
differently depending on the screen size or device on which it is being viewed. While the author of
a document typically links that document to a CSS file, readers can use a different style sheet,
perhaps one on their own computer, to override the one the author has specified. However if the
author or the reader did not link the document to a specific style sheet the default style of the
browser will be applied.

MySQL:

MySQL is developed, distributed, and supported by Oracle Corporation. MySQL is a database


system used on the web it runs on a server. MySQL is ideal for both small and large applications.
It is very fast, reliable, and easy to use. It supports standard SQL. MySQL can be compiled on a
number of platforms.
13
The data in MySQL is stored in tables. A table is a collection of related data, and it
consists of columns and rows. Databases are useful when storing information categorically.

FEATURES OF MYSQL:

Internals and portability:

• Written in C and C++.

• Tested with a broad range of different compilers.

• Works on many different platforms.


• Tested with Purify (a commercial memory leakage detector) as well as with Val grind, a GPL
tool.
• Uses multi-layered server design with independent modules.

Security:
• A privilege and password system that is very flexible and secure, and that enables host-based
verification.

• Password security by encryption of all password traffic when you connect to a server.

Scalability and Limits:

• Support for large databases. We use MySQL Server with databases that contain 50 million
records. We also know of users who use MySQL Server with 200,000 tables and about
5,000,000,000 rows.

• Support for up to 64 indexes per table (32 before MySQL 4.1.2). Each index may consist of 1
to 16 columns or parts of columns. The maximum index width is 767 bytes for InnoDB tables,
or 1000 for MyISAM; before MySQL 4.1.2, the limit is 500 bytes. An index may use a prefix of
a column for CHAR, VARCHAR, BLOB, or TEXT column types.

Connectivity:
Clients can connect to MySQL Server using several protocols:

• Clients can connect using TCP/IP sockets on any platform.

14
• On Windows systems in the NT family (NT, 2000, XP, 2003, or Vista), clients can connect
using named pipes if the server is started with the --enable-named-pipe option. In
MySQL 4.1 and higher, Windows servers also support shared-memory connections if
started with the --shared-memory option. Clients can connect through shared memory by
using the --protocol=memory option.

• On UNIX systems, clients can connect using Unix domain socket files.

Localization:
• The server can provide error messages to clients in many languages.
• All data is saved in the chosen character set.

Clients And Tools:

• MySQL includes several client and utility programs. These include both command-line
programs such as MySQL dump and MySQL, and graphical programs such as MySQL
Workbench.
• MySQL Server has built-in support for SQL statements to check, optimize, and repair
tables. These statements are available from the command line through the MySQL
check client. MySQL also includes myisamchk, a very fast command-line utility for
performing these operations on MyISAM tables.
• MySQL programs can be invoked with the --help or -? option to obtain online
assistance.

WHY TO USE MYSQL:

• Leading open-source RDBMS


• Ease of use – No frills
• Fast
• Robust
• Security
• Multiple OS support
• Free
• Technical support

15
• Support large database– up to 50 million rows, file size limit up to 8 Million TB

Java Script:

JavaScript is the scripting language of the Web. All modern HTML pages are using JavaScript. A
scripting language is a lightweight programming language. JavaScript code can be inserted into
any HTML page, and it can be executed by all types of web browsers. JavaScript is easy to learn.

Why to use Java Script:

JavaScript is one of the 3 languages all web developers must learn:

1. HTML to define the content of web pages


2. CSS to specify the layout of web pages
3. JavaScript to specify the behavior of web pages

Example

x = document. getElementById("demo"); //Find the HTML element with id="demo"


x. innerHTML = "Hello JavaScript”; //Change the content of the HTML element

document. getElementById () is one of the most commonly used HTML DOM methods.

Other uses of Java Script:

• Delete HTML elements


• Create new HTML elements
• Copy HTML elements

• In HTML, JavaScript is a sequence of statements that can be executed by the web browser.

Java Script Statements:

• JavaScript statements are "commands" to the browser.


• The purpose of the statements is to tell the browser what to do.

16
• This JavaScript statement tells the browser to write "Hello Dolly" inside an HTML element
with id="demo":
• Semicolon separates JavaScript statements.
• Normally you add a semicolon at the end of each executable statement.
• Using semicolons also makes it possible to write many statements on one line.

Java Script Code:

• JavaScript code (or just JavaScript) is a sequence of JavaScript statements.


• Each statement is executed by the browser in the sequence they are written.
• This example will manipulate two HTML elements:
• Example
document. getElementById("demo"). innerHTML="Hello Dolly";
document. getElementById("myDIV"). innerHTML="How are you?";

Java Script Properties:

• Properties are the values associated with a JavaScript object.


• A JavaScript object is a collection of unordered properties.
• Properties can usually be changed, added, and deleted, but some are read only.

PHP:

What is php?

• php is an acronym for "PHP Hypertext Preprocessor"


• It is a widely-used, open-source scripting language
• php scripts are executed on the server
• It costs nothing, it is free to download and use

What is php file?

• php files can contain text, HTML, CSS, JavaScript, and PHP code
• code are executed on the server, and the result is returned to the browser as plain HTML

17
• files have extension ".php"

What can php do?

• It can generate dynamic page content


• It can create, open, read, write, delete, and close files on the server
• It can collect form data
• It can send and receive cookies
• It can add, delete, modify data in your database
• It can restrict users to access some pages on your website
• It can encrypt data

With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash
movies. You can also output any text, such as XHTML and XML.

Why php?

• It runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)


• php is compatible with almost all servers used today (Apache, IIS, etc.)
• It supports a wide range of databases
• php is free. Download it from the official PHP resource: www.php.net

Google Dialog Flow

Google Dialog Flow is a natural language understanding platform that enables developers to design
and integrate conversational user interfaces into applications, including chatbots, voice assistants,
and interactive voice response systems. It utilizes machine learning and natural language
processing (NLP) to understand and respond to user queries in a human-like manner.

It is formerly known as API.AI, is a cloud-based conversational AI platform developed by Google.


It allows developers to build natural language understanding into their applications, enabling users
to interact with these applications using text or voice-based conversational interfaces. Dialog flow
processes user input and generates appropriate responses based on predefined intents, entities, and
conversational flows defined by developers.

18
Advantages:

• Ease of Use: Dialog Flow provides a user-friendly interface for building conversational interfaces,
requiring minimal coding skills.
• Natural Language Understanding: It leverages Google's advanced NLP capabilities to understand
and interpret user input accurately, even with variations in language and syntax.
• Multi-platform Support: Dialog Flow supports multiple channels, including web, mobile apps,
messaging platforms (such as Facebook Messenger, Slack), and voice platforms (such as Google
Assistant, Amazon Alexa).
• Rich Feature Set: It offers a wide range of features, including intent recognition, entity extraction,
context management, webhook integration, and rich responses (such as cards, images, and
buttons).

Disadvantages:

• Limited Customization: While Dialog Flow offers flexibility in designing conversational flows,
there are limitations in customizing certain aspects of the platform, leading to constraints in
complex use cases.
• Dependency on Third-party Services: As a cloud-based service, Dialog Flow relies on external
infrastructure, which may lead to downtime or performance issues if there are disruptions in
Google's services.
• Cost: While there is a free tier available, advanced features and higher usage volumes may incur
costs, which could be a concern for budget-conscious projects.
• Privacy and Data Security: Storing conversational data on Google's servers may raise privacy and
data security concerns, especially for sensitive applications like healthcare or finance.

Features and Properties:

• Intents and Entities: Developers define intents (user intentions) and entities (objects or concepts)
to train Dialog Flow's NLP model to understand user queries.
• Contexts: Dialog Flow maintains conversational context to understand the flow of conversation
and provide relevant responses.
• Webhooks: Allows integration with backend systems via webhooks to fetch or update data
dynamically during conversations.
19
• Rich Responses: Supports various response types, including text, cards, images, buttons, and
quick replies, to create engaging conversational experiences.
• Analytics and Insights: Provides analytics and insights into user interactions, allowing developers
to optimize and improve conversational flows.
• Multi-language Support: Supports multiple languages, enabling developers to build multilingual
conversational interfaces.
• Voice Integration: Integrates seamlessly with voice platforms like Google Assistant and Amazon
Alexa, enabling voice-based interactions.

20
CHAPTER 4

DESIGN AND IMPLEMENTATION

4.1 SYSTEM DESIGN

4.1.1 INTRODUCTION TO UML


UML Design:

The Unified Modeling Language (UML) is a standard language for specifying,


visualizing, constructing, and documenting the software system and its components. It is a
graphical language, which provides a vocabulary and set of semantics and rules. The UML focuses
on the conceptual and physical representation of the system. It captures the decisions and
understandings about systems that must be constructed. It is used to understand, design, configure,
maintain, and control information about the systems.

The UML is a language for:

▪ Visualizing
▪ Specifying
▪ Constructing
▪ Documenting

Visualizing

Through UML we see or visualize an existing system and ultimately we visualize how the system
is going to be after implementation. Unless we think, we cannot implement. UML helps to
visualize, how the components of the system communicate and interact with each other.

Specifying

Specifying means building, models that are precise, unambiguous and complete UML addresses
21
the specification of all the important analysis design, implementation decisions that must be made
in developing and deploying a software system.

Constructing

UML models can be directly connected to a variety of programming language through mapping a
model from UML to a programming language like JAVA or C++ or VB. Forward Engineering
and Reverse Engineering is possible through UML.

Documenting

The Deliverables of a project apart from coding are some Artifacts, which are critical in
controlling, measuring and communicating about a system during its developing requirements,
architecture, desire, source code, project plans, tests, prototypes releasers, etc...

UML

A diagram is the graphical presentation of a set of elements, most often rendered as a connected
graph of vertices and arcs . you draw diagram to visualize a system from different perspective,
so a diagram is a projection into a system. For all but most trivial systems, a diagram represents
an elided view of the elements that make up a system. The same element may appear in all
diagrams, only a few diagrams , or in no diagrams at all. In theory, a diagram may contain any
combination of things and relationships. In practice, however, a small number of common
combinations arise, which are consistent with the five most useful views that comprise the
architecture of a software-intensive system. For this reason, the UML includes six such
diagrams:
1. Class diagram
2. Use case diagram
3. Sequence diagram
4. Collaboration diagram
5. Deployment diagram

22
4.2 CLASS DIAGRAM
A Class is a category or group of things that has similar attributes and common behavior. A
Rectangle is the icon that represents the class it is divided into three areas. The upper most area
contains the name, the middle; area contains the attributes and the lowest areas show the operations.
Class diagrams provides the representation that developers work from. Class diagrams help on the
analysis side, too.

Person

+name_string
Hospital
+age_number
+date of birth_number +name_string
+address_string +* +1
+address_string
+phone num_number +phon_number
+gender_string
+available time()
+date of join() +states()
+date of discharge()
+1

+*
Patient

+gender_string Staff
+prescription_string
-allergies_string +joined: date
+qulification_string
+in_time() +certification_string
+out_time() +languages_string

+work dutes()
+hoil days()

Administrative staff Technical staff


Operations staff
+name of emp_string +name_string
+names_string #details_string
+deprt_string +location_string
-time period_number
+join time() +join time()
+open_list()
+close_list()

Doctor Receptionist Technician Laboratorist


Nurse
+name_string +patient_details +name_string +name_string
+addresss_string +name_string +test_details
+address_string +problem_string +address_string
+phone_number +age_string +counter_number +time_number
+speciality_string +phone_number
+in_time() +opr_name() +room-num()
+joined_date() +join_date() +opr_time()
+ot_time() +total_opr()
+dute_time()

surgen

+opr_type
+free_number
+block_string

+opr_time()
+week period()

Fig 4.2 Class Diagram

23
4.3 USE CASE DIAGRAM:
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram
defined by and created from a use-case analysis. Its purpose is to present a graphical overview of
the functionality provided by a system in terms of actors, their goals(represented as use cases),and
any dependencies between those use cases.

Use case diagrams are formally included in two modeling languages defined by the
OMG, the unified modeling language (UML) and the systems modeling language (SYSML)

In this healthcare administration framework, the use case diagram illustrates the various
interactions between different actors and the system components. Patients serve as primary users,
engaging with the system primarily through querying information via the AI chatbot and accessing
the list of available doctors. For doctors, the system enables them to log in, view their appointments,
and manage their availability. Administrators, on the other hand, have broader access, allowing
them to manage doctors' profiles, oversee appointments, and generate reports for administrative
purposes. The AI chatbot acts as a pivotal system component, facilitating patient inquiries,
retrieving doctor information, and potentially assisting in appointment booking in future iterations.
This diagram provides a clear overview of the system's functionality and the roles of various actors
within the healthcare administration framework.

24
Registration

Reception

Goto doctor

Take recept

doctor patient

pharmacist

laboratorist

Discharge summary

Fig 4.3 Use Case Diagram

4.4 SEQUENCE DIAGRAM:

A Sequence Diagram is an interaction diagram that emphasis the time ordering of messages; a
collaboration diagram is an interaction diagram that emphasizes the structural organization of the
objects that send and receive messages. Sequence diagrams and collaboration diagrams are
isomorphic, meaning that you can take one and transform it into the other.

25
Doctor Registration Reception Patient Laboratory Pharmacy ischarge summary

1 : login()

2 : view appointment()

3 : registration()

4 : send request()

5 : done any surgeries()

6 : go to laboratory()

7 : take medicins()

8 : paitent ok()

9 : send discharge summmary()

10 : discharge paitent()

Fig 4.4 Sequence Diagram

4.5 COLLABORATION DIAGRAM

A Collaboration Diagram also called a communication diagram or interaction diagram, is an


illustration of the relationships and interactions among software objects. The concept is more than
a decade old although it has been refined as modeling paradigms have evolved.

26
1:Takes Appointment
10:Takes Appointment from doctor

P1 : Patient R1 : Receptionist

4:confirms appointment
9:Ask for payment

7:Take medicins

3:Doctor available
5:Consult doctor

8:paitent ok

2:takes Appointment from doctor

D1 : Doctor N1 : Nurse

6:Assist doctor

Fig 4.5 Collaboration Diagram

4.6 DEPLOYMENT DIAGRAM

A Deployment Diagram shows the configuration of run-time processing nodes and the
components that live on them. Deployment diagrams address the static deployment view of
architecture. They are related to component diagrams in that a node typically encloses one or more
components.

27
desktop Client
Printer

Hospital Local Server

Database Server

Fig 4.6 Deployment Diagram

28
CHAPTER 5
TESTING

5.1 INTRODUCTION TO SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub-assemblies, assemblies and/or a finished product It is the process of exercising
software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an unacceptable
manner. There are various types of test. Each test type addresses a specific testing requirement.

TYPES OF TESTING:
Unit testing:
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately to
the documented specifications and contains clearly defined inputs and expected results.

Integration testing:
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic outcome
of screens or fields. Integration tests demonstrate that although the components were individually
satisfaction, as shown by successfully unit testing, the combination of components is correct and
consistent. Integration testing is specifically aimed at exposing the problems that arise from the
combination of components.

29
Functional test:
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or


special test cases. In addition, systematic coverage pertaining to identify Business process flows;
data fields, predefined processes, and successive processes must be considered for testing. Before
functional testing is complete, additional tests are identified and the effective value of current tests
is determined.

System Test:
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions and
flows, emphasizing pre-driven process links and integration points.

White Box Testing:


White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It is
used to test areas that cannot be reached from a black box level.

Black Box Testing:


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests, must
be written from a definitive source document, such as specification or requirements document, such
as specification or requirements document. It is a testing in which the software under test is treated,

30
as a black box. you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.

Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as two
distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

• All field entries must work properly.


• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.

Features to be tested

• Verify that the entries are of the correct format


• No duplicate entries should be allowed
• All links should take the user to the correct page.

Integration Testing:
Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level –
interact without error.

31
Introduction
This document outlines the testing strategy, objectives, scope, resources, schedule, and types of
tests to be performed for the Healthcare Administration Framework project. The goal is to ensure
the system meets all functional and non-functional requirements.

5.2 TESTING METHODS

Objectives:
Validate the functionality of the healthcare administration system.
Ensure the AI chatbot correctly interprets and responds to patient queries.
Verify the system’s performance, security, and usability.

Scope:
Functional testing of patient, doctor, and admin functionalities.
Integration testing of AI chatbot with the healthcare system.
Performance, security, and usability testing.

Risks and Mitigations

Risk: Delay in test environment setup.


Mitigation: Plan ahead and allocate resources early.

Risk: High number of defects found.


Mitigation: Conduct thorough reviews and early testing.

Risk: Performance issues under load.


Mitigation: Optimize code and conduct rigorous performance testing.

Test Results:
All the test cases mentioned above passed successfully. No defects encountered.

32
Acceptance Testing:
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.

33
CHAPTER 6
SYSTEM IMPLEMENTATION

6.1 MODULE DESCRIPTION

A Module Description in software development refers to a detailed documentation of individual


components (modules) within a software system. Each module represents a distinct part of the
system's functionality and is typically designed to perform specific tasks. The module description
outlines the purpose, key features, components, and interactions of each module, providing a clear
understanding of how each part of the system contributes to the overall functionality. This
documentation is crucial for developers, testers, and stakeholders to ensure coherent development,
integration, and maintenance of the software system.

6.1.1 User Management Module

Description:
The User Management Module handles the registration, authentication, and management of user
accounts. This module supports different types of users including patients, doctors, and
administrators.

Key Features:
• User Registration: Allows new users to register and create an account.
• Authentication: Manages login and logout functionalities for all user types.
• User Roles: Defines and manages roles (patient, doctor, admin) with appropriate access controls.
• Profile Management: Allows users to view and update their profile information.

Components:
• Registration Form
• Login Page
• Profile Page

34
6.1.2 Appointment Management Module

Description:
The Appointment Management Module facilitates the scheduling, viewing, and management of
medical appointments between patients and doctors.

Key Features:
• Appointment Booking: Allows patients to schedule appointments with available doctors.
• Calendar View: Doctors can view their schedule in a calendar format.
• Appointment Notifications: Sends notifications and reminders for upcoming appointments.
• Appointment Rescheduling/Cancellation: Enables patients and doctors to reschedule or cancel
appointments.

Components:
• Appointment Booking Form
• Doctor Calendar View
• Notification System
• Reschedule/Cancel Interface

6.1.3 AI Chatbot Integration Module

Description:
The AI Chatbot Integration Module incorporates Google Dialog flow to provide an interactive
conversational interface for patients to query information and perform tasks.

Key Features:
• Natural Language Understanding: Processes and understands patient queries using NLP.
• Query Response: Provides relevant responses based on predefined intents and entities.
• Context Management: Maintains conversational context to handle multi-turn conversations.
• Future Appointment Booking Capability: Potential feature to enable appointment booking
through the chatbot.

35
Components:
• Chatbot Interface on Homepage
• Dialog flow Configuration
• Intent and Entity Management
• Webhook Integration

6.1.4 Doctor Management Module

Description:
The Doctor Management Module is used by administrators to manage the profiles and availability
of doctors within the system.

Key Features:
• Doctor Profile Management: Add, edit, or remove doctor profiles.
• Availability Management: Set and update doctor availability for appointments.
• Specialization Information: Manage and display doctors' areas of specialization.

Components:
• Doctor Profile Form
• Availability Scheduler
• Specialization Management Interface

6.1.5 Reporting and Analytics Module

Description:
The Reporting and Analytics Module provides detailed reports and analytics on system usage,
appointment statistics, and user interactions.

Key Features:
• Usage Reports: Generate reports on user activity and system usage.

36
• Appointment Statistics: Track and analyze appointment bookings, cancellations, and
rescheduling.
• Chatbot Interaction Logs: Monitor and analyze interactions with the AI chatbot for continuous
improvement.

Components:
• Report Generation Tool
• Analytics Dashboard
• Interaction Log Viewer

6.2 ALGORITHMS
Implementing the healthcare administration framework integrated with Google Dialog flow
involves several algorithms to handle various functionalities such as user authentication,
appointment scheduling, natural language processing, and data encryption. Here are the definitions
and details of key algorithms used in this system:

6.2.1 User Authentication

Definition:
The user authentication ensures that only authorized users can access the system by verifying their
credentials.

PHP Implementation:
php
Copy code
<?php
function authenticateUser($username, $enteredPassword) {
$storedPasswordHash = getStoredPasswordHash($username);
$enteredPasswordHash = hashPassword($enteredPassword);

if ($enteredPasswordHash === $storedPasswordHash) {


return "Access Granted";
37
} else {
return "Access Denied";
}
}

function getStoredPasswordHash($username) {
// Replace with actual database query
$storedHash = ''; // Fetch from database
return $storedHash;
}
function hashPassword($password) {
return hash('sha256', $password);
}
?>

6.2.2 Appointment Scheduling

Definition:
This allows patients to schedule, reschedule, or cancel appointments with doctors, ensuring no
double bookings and maintaining an updated schedule.

PHP Implementation:
php
Copy code
<?php
function scheduleAppointment($patientId, $doctorId, $requestedTime) {
if (isDoctorAvailable($doctorId, $requestedTime)) {
addAppointmentToSchedule($patientId, $doctorId, $requestedTime);
sendNotification($patientId, $doctorId, "Appointment Scheduled");
return "Appointment Scheduled Successfully";
} else {
return "Requested time slot is unavailable";

38
}
}

function rescheduleAppointment($appointmentId, $newTime) {


$doctorId = getDoctorIdByAppointment($appointmentId);
if (isDoctorAvailable($doctorId, $newTime)) {
updateAppointmentTime($appointmentId, $newTime);
sendNotificationToParties($appointmentId, "Appointment Rescheduled");
return "Appointment Rescheduled Successfully";
} else {
return "New time slot is unavailable";
}
}

function cancelAppointment($appointmentId) {
removeAppointmentFromSchedule($appointmentId);
sendNotificationToParties($appointmentId, "Appointment Cancelled");
return "Appointment Cancelled Successfully";
}

// Implement database and notification functions as needed


?>

6.2.3 Natural Language Processing (NLP) Algorithm

Definition:
The NLP algorithm, powered by Google Dialog Flow, interprets and responds to patient queries
by identifying intents and extracting entities.

39
PHP Implementation using Google Dialog flow API:
php
Copy code
<?php
require 'vendor/autoload.php'; // Make sure to install the Google Cloud PHP library

use Google\Cloud\Dialogflow\V2\SessionsClient;
use Google\Cloud\Dialogflow\V2\QueryInput;
use Google\Cloud\Dialogflow\V2\TextInput;

function processPatientQuery($projectId, $sessionId, $query) {


$sessionsClient = new SessionsClient();
$session = $sessionsClient->sessionName($projectId, $sessionId);

$textInput = new TextInput();


$textInput->setText($query);
$textInput->setLanguageCode('en-US');

$queryInput = new QueryInput();


$queryInput->setText($textInput);

$response = $sessionsClient->detectIntent($session, $queryInput);

$fulfillmentText = $response->getQueryResult()->getFulfillmentText();

$sessionsClient->close();
return $fulfillmentText;
}
?>

40
6.2.4 Data Encryption Algorithm

Definition:
The data encryption algorithm protects sensitive information by encrypting data before storage and
decrypting it when needed.

PHP Implementation:
php
Copy code
<?php
function encryptData($data, $key) {
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
$encryptedData = openssl_encrypt($data, 'aes-256-cbc', $key, 0, $iv);
return base64_encode($encryptedData . '::' . $iv);
}

function decryptData($encryptedData, $key) {


list($encryptedData, $iv) = explode('::', base64_decode($encryptedData), 2);
return openssl_decrypt($encryptedData, 'aes-256-cbc', $key, 0, $iv);
}
?>

5.2.5 Context Management Algorithm for Chatbot

Definition:
The context management algorithm maintains the conversational context within the AI chatbot,
ensuring coherent multi-turn conversations.

PHP Implementation:
php
Copy code

41
<?php
require 'vendor/autoload.php';
use Google\Cloud\Dialogflow\V2\SessionsClient;
use Google\Cloud\Dialogflow\V2\QueryInput;
use Google\Cloud\Dialogflow\V2\TextInput;

function manageContext($projectId, $sessionId, $userQuery) {


$sessionsClient = new SessionsClient();
$session = $sessionsClient->sessionName($projectId, $sessionId);

$textInput = new TextInput();


$textInput->setText($userQuery);
$textInput->setLanguageCode('en-US');

$queryInput = new QueryInput();


$queryInput->setText($textInput);

$response = $sessionsClient->detectIntent($session, $queryInput);

$fulfillmentText = $response->getQueryResult()->getFulfillmentText();

// Save the context if needed, based on $response->getQueryResult()->getOutputContexts()

$sessionsClient->close();
return $fulfillmentText;
}
?>

These PHP implementations provide the necessary algorithms for user authentication, appointment
scheduling, natural language processing with Dialogflow, data encryption, and context
management for the chatbot within the healthcare administration framework.

42
CHAPTER 7
CONCLUSION AND FUTURE ENHANCEMENT

7.1 CONCLUSION

The healthcare administration framework integrated with Google Dialog flow represents a
significant milestone in enhancing healthcare services through advanced technology. Developed
using PHP and MySQL, this system leverages the natural language processing capabilities of
Dialog flow to create an intuitive and user-friendly interface. The integration facilitates efficient
appointment scheduling, robust user authentication, and seamless information retrieval, thus
improving the overall user experience for both patients and healthcare providers. One of the core
strengths of this framework is its ability to handle sensitive data securely through encryption
techniques, ensuring patient data privacy and compliance with healthcare regulations.

The system is designed to streamline various administrative tasks, thereby reducing the workload
on healthcare staff and minimizing the potential for human error. By enabling patients to interact
with the system through natural language queries, it enhances patient engagement and provides
timely responses to their queries. This not only improves patient satisfaction but also helps in
building a stronger patient-provider relationship. Additionally, the system’s modular design
ensures that each component, from user management to appointment scheduling and AI chatbot
integration, works cohesively to deliver a seamless user experience.

The AI chatbot, powered by Google Dialog flow, plays a crucial role in making the system
interactive and responsive. It can understand and process patient queries, providing accurate and
relevant information based on predefined intents and entities. While the current version of the
chatbot cannot book appointments, it efficiently handles a wide range of patient queries, directing
them to the appropriate resources or actions within the system. The chatbot’s ability to maintain
conversational context ensures that interactions are coherent and contextually relevant, further
enhancing user satisfaction.

43
7.2 FUTURE ENHANCEMENT

Looking ahead, there are several potential enhancements that can be made to this healthcare
administration framework to further improve its functionality and user experience. One significant
enhancement is expanding the capabilities of the AI chatbot to include direct appointment booking.
By enabling the chatbot to handle appointment scheduling, patients can benefit from a more
streamlined and efficient booking process, reducing the need for manual intervention.

Incorporating machine learning algorithms to analyze patient data can also be a valuable
enhancement. By analyzing patterns and trends in patient data, the system can provide personalized
healthcare recommendations, which can lead to improved patient outcomes. For instance, the
system could suggest preventive measures, lifestyle changes, or follow-up appointments based on
the patient’s medical history and current health status.

Telemedicine features represent another crucial area for future development. With the growing
demand for accessible healthcare services, integrating virtual consultations and remote patient
monitoring can significantly enhance the system’s utility. These features would allow patients to
receive medical advice and care from the comfort of their homes, reducing the need for in-person
visits and making healthcare more accessible, especially for those in remote or underserved areas.

Ensuring compliance with evolving healthcare regulations is essential for the continued success of
the system. Regular updates to the system’s security and compliance features will ensure that it
remains up-to-date with the latest regulations, such as HIPAA in the United States. Additionally,
adding multilingual support can broaden the system’s applicability, making it accessible to a more
diverse user base and improving inclusivity.

44
CHAPTER 8
APPENDICES

8.1 CODING

8.1.1 Index.php:

<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required Meta Tags -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

<!-- Page Title -->


<title>Hospital Management System</title>

<!-- Favicon -->


<link rel="shortcut icon" href="assets/images/logo/favicon.png" type="image/x-icon">

<!-- CSS Files -->


<link rel="stylesheet" href="assets/css/animate-3.7.0.css">
<link rel="stylesheet" href="assets/css/font-awesome-4.7.0.min.css">
<link rel="stylesheet" href="assets/css/bootstrap-4.1.3.min.css">
<link rel="stylesheet" href="assets/css/owl-carousel.min.css">
<link rel="stylesheet" href="assets/css/jquery.datetimepicker.min.css">
<link rel="stylesheet" href="assets/css/linearicons.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/style1.css">

45
</head>
<body>
<!-- Preloader Starts -->
<div class="preloader">
<div class="spinner"></div>
</div>
<!-- Preloader End -->

<!-- Header Area Starts -->


<header class="header-area">
<div id="header" id="home">
<div class="container">
<div class="row align-items-center justify-content-between d-flex">
<div id="logo">
<a href="index.php"></a>
</div>
<nav id="nav-menu-container">
<ul class="nav-menu">
<li class="menu-active"><a href="index.php">Home</a></li>
<li><a href="backend/doc/index.php">Doctor's Login</a></li>
<li><a href="backend/admin/index.php">Administrator Login</a></li>
</ul>
</nav><!-- #nav-menu-container -->
</div>
</div>
</div>
</header>
<!-- Header Area End -->

<!-- Banner Area Starts -->


<section class="banner-area">
<div class="container">

46
<div class="row">
<div class="col-lg-8">
<h4>
Welcome to Healthcare Administration Framework - Your Guide to Healthcare Administration
</h4>
<h1>Caring for better life, Leading the way in medical excellence</h1>
<p>At Healthcare Administration Framework, we understand the importance of navigating the
complexities of healthcare administration. Whether you're a patient seeking information or a
healthcare professional looking for resources, we're here to guide you every step of the way.
Patient Guidance
Understanding Your Healthcare Options: Learn about different healthcare plans, coverage options,
and how to make informed decisions about your healthcare.
Managing Your Health Records: Discover how to access, organize, and securely manage your
health records for better coordination of care.
Financial Assistance Programs: Explore available financial assistance programs, insurance support,
and tips for managing healthcare costs.
Telehealth and Digital Health Tools: Embrace the convenience of Telehealth services and digital
health tools for remote consultations, monitoring, and self-care.
<h4>AI Chatbot Health Search</h4>

Have a health-related question? Our AI-powered chatbot can help! Use the chatbox below to search
for information on symptoms, treatments, medications, and more<p>.</p>

</div>
</div>
</div>
<div class= "chat1">
<iframe
allow="microphone;"
src="https://console.dialogflow.com/api-client/demo/embedded/74111b7d-6260-492f-be65-
c412a723c539">
</iframe>

47
</div>
</section>
<!-- Javascript -->
<script src="assets/js/vendor/jquery-2.2.4.min.js"></script>
<script src="assets/js/vendor/bootstrap-4.1.3.min.js"></script>
<script src="assets/js/vendor/wow.min.js"></script>
<script src="assets/js/vendor/owl-carousel.min.js"></script>
<script src="assets/js/vendor/jquery.datetimepicker.full.min.js"></script>
<script src="assets/js/vendor/jquery.nice-select.min.js"></script>
<script src="assets/js/vendor/superfish.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>

8.1.2 Doctor.php

<?php
session_start();
include('assets/inc/config.php');//get configuration file
if(isset($_POST['doc_login']))
{
$doc_number = $_POST['doc_number'];
//$doc_email = $_POST['doc_ea']
$doc_pwd = sha1(md5($_POST['doc_pwd']));//double encrypt to increase security
$stmt=$mysqli->prepare("SELECT doc_number, doc_pwd, doc_id FROM his_docs WHERE
doc_number=? AND doc_pwd=? ");//sql to log in user
$stmt->bind_param('ss', $doc_number, $doc_pwd);//bind fetched parameters
$stmt->execute();//execute bind
$stmt -> bind_result($doc_number, $doc_pwd ,$doc_id);//bind result
$rs=$stmt->fetch();
$_SESSION['doc_id'] = $doc_id;
$_SESSION['doc_number'] = $doc_number;//Assign session to doc_number id

48
//$uip=$_SERVER['REMOTE_ADDR'];
//$ldate=date('d/m/Y h:i:s', time());
if($rs)
{//if its sucessfull
header("location:his_doc_dashboard.php");
}
else
{
#echo "<script>alert('Access Denied Please Check Your Credentials');</script>";
$err = "Access Denied Please Check Your Credentials";
}
}
?>
<!--End Login-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Hospital Management System -A Super Responsive Information System</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="" name="description" />
<meta content="" name="MartDevelopers" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="assets/images/favicon.ico">

<!-- App css -->


<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!--Load Sweet Alert Javascript-->

49
<script src="assets/js/swal.js"></script>
<!--Inject SWAL-->
<?php if(isset($success)) {?>
<!--This code for injecting an alert-->
<script>
setTimeout(function ()
{
swal("Success","<?php echo $success;?>","success");
},
100);
</script>
<?php } ?>

<?php if(isset($err)) {?>


<!--This code for injecting an alert-->
<script>
setTimeout(function ()
{
swal("Failed","<?php echo $err;?>","error");
},
100);
</script>
<?php } ?>
</head>
<body class="authentication-bg authentication-bg-pattern">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-5">
<div class="card bg-pattern">
<div class="card-body p-4">
<div class="text-center w-75 m-auto">

50
<a href="index.php">
<span><img src="assets/images/logo-dark.png" alt="" height="22"></span>
</a>
<p class="text-muted mb-4 mt-3">Enter your email address and password to access Doctor
panel.</p>
</div>

<form method='post' >


<div class="form-group mb-3">
<label for="emailaddress">Doctor Number</label>
<input class="form-control" name="doc_number" type="text" id="emailaddress" required=""
placeholder="Enter your doctor number">
</div>

<div class="form-group mb-3">


<label for="password">Password</label>
<input class="form-control" name="doc_pwd" type="password" required="" id="password"
placeholder="Enter your password">
</div>

<div class="form-group mb-0 text-center">


<button class="btn btn-success btn-block" name="doc_login" type="submit"> Log In </button>
</div>
</form>

<!--
For Now Lets Disable This
This feature will be implemented on later versions
<div class="text-center">
<h5 class="mt-3 text-muted">Sign in with</h5>
<ul class="social-list list-inline mt-3 mb-0">
<li class="list-inline-item">

51
<a href="javascript: void(0);" class="social-list-item border-primary text-primary"><i class="mdi
mdi-facebook"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-danger text-danger"><i class="mdi
mdi-google"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-info text-info"><i class="mdi mdi-
twitter"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-secondary text-secondary"><i
class="mdi mdi-github-circle"></i></a>
</li>
</ul>
</div>
-->
</div> <!-- end card-body -->
</div>
<!-- end card -->
<div class="row mt-3">
<div class="col-12 text-center">
<p> <a href="his_doc_reset_pwd.php" class="text-white-50 ml-1">Forgot your
password?</a></p>
<!-- <p class="text-white-50">Don't have an account? <a href="his_admin_register.php"
class="text-white ml-1"><b>Sign Up</b></a></p>-->
</div> <!-- end col -->
</div>
<!-- end row -->
</div> <!-- end col -->
</div>

52
<!-- end row -->
</div>
<!-- end container -->
</div>
<!-- end page -->
<?php include ("assets/inc/footer1.php");?>

<!-- Vendor js -->


<script src="assets/js/vendor.min.js"></script>
<!-- App js -->
<script src="assets/js/app.min.js"></script>
</body>
</html>

8.1.3 Admin.php

<?php
session_start();
include('assets/inc/config.php');//get configuration file
if(isset($_POST['admin_login']))
{
$ad_email=$_POST['ad_email'];
$ad_pwd=sha1(md5($_POST['ad_pwd']));//double encrypt to increase security
$stmt=$mysqli->prepare("SELECT ad_email ,ad_pwd , ad_id FROM his_admin WHERE
ad_email=? AND ad_pwd=? ");//sql to log in user
$stmt->bind_param('ss',$ad_email,$ad_pwd);//bind fetched parameters
$stmt->execute();//execute bind
$stmt -> bind_result($ad_email,$ad_pwd,$ad_id);//bind result
$rs=$stmt->fetch();
$_SESSION['ad_id']=$ad_id;//Assign session to admin id
//$uip=$_SERVER['REMOTE_ADDR'];
//$ldate=date('d/m/Y h:i:s', time());
if($rs)

53
{//if its sucessfull
header("location:his_admin_dashboard.php");
}

else
{
#echo "<script>alert('Access Denied Please Check Your Credentials');</script>";
$err = "Access Denied Please Check Your Credentials";
}
}
?>
<!--End Login-->
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<title>Hospital Management System -A Super Responsive Information System</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="" name="description" />
<meta content="" name="MartDevelopers" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="assets/images/favicon.ico">

<!-- App css -->


<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!--Load Sweet Alert Javascript-->

<script src="assets/js/swal.js"></script>

54
<!--Inject SWAL-->
<?php if(isset($success)) {?>
<!--This code for injecting an alert-->
<script>
setTimeout(function ()
{
swal("Success","<?php echo $success;?>","success");
},
100);
</script>
<?php } ?>

<?php if(isset($err)) {?>


<!--This code for injecting an alert-->
<script>
setTimeout(function ()
{
swal("Failed","<?php echo $err;?>","Failed");
},
100);
</script>
<?php } ?>
</head>
<body class="authentication-bg authentication-bg-pattern">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-5">
<div class="card bg-pattern">
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<a href="index.php">

55
<span><img src="assets/images/logo-dark.png" alt="" height="22"></span>
</a>
<p class="text-muted mb-4 mt-3">Enter your email address and password to access admin
panel.</p>
</div>
<form method='post' >
<div class="form-group mb-3">
<label for="emailaddress">Email address</label>
<input class="form-control" name="ad_email" type="email" id="emailaddress" required=""
placeholder="Enter your email">
</div>

<div class="form-group mb-3">


<label for="password">Password</label>
<input class="form-control" name="ad_pwd" type="password" required="" id="password"
placeholder="Enter your password">
</div>

<div class="form-group mb-0 text-center">


<button class="btn btn-primary btn-block" name="admin_login" type="submit"> Admin Log In
</button>
</div>
</form>

<!--
For Now Lets Disable This
This feature will be implemented on later versions
<div class="text-center">
<h5 class="mt-3 text-muted">Sign in with</h5>
<ul class="social-list list-inline mt-3 mb-0">
<li class="list-inline-item">

56
<a href="javascript: void(0);" class="social-list-item border-primary text-primary"><i class="mdi
mdi-facebook"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-danger text-danger"><i class="mdi
mdi-google"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-info text-info"><i class="mdi mdi-
twitter"></i></a>
</li>
<li class="list-inline-item">
<a href="javascript: void(0);" class="social-list-item border-secondary text-secondary"><i
class="mdi mdi-github-circle"></i></a>
</li>
</ul>
</div>
-->

</div> <!-- end card-body -->


</div>
<!-- end card -->

<div class="row mt-3">


<div class="col-12 text-center">
<p> <a href="his_admin_pwd_reset.php" class="text-white-50 ml-1">Forgot your
password?</a></p>
<!-- <p class="text-white-50">Don't have an account? <a href="his_admin_register.php"
class="text-white ml-1"><b>Sign Up</b></a></p>-->
</div> <!-- end col -->
</div>
<!-- end row -->

57
</div> <!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end container -->
</div>
<!-- end page -->
<?php include ("assets/inc/footer1.php");?>

<!-- Vendor js -->


<script src="assets/js/vendor.min.js"></script>

<!-- App js -->


<script src="assets/js/app.min.js"></script>
</body>
</html

58
8.2 SCREEN SHOTS

Admin Panel login

Fig 8.2.1 Admin Panel login

59
Doctor Panel Login

Fig 8.2.2 Doctor Panel login

60
Admin Panel:

Fig 8.2.3 Admin Panel

61
Add Employee Details

Fig 8.2.4 Add Employee Details

62
Add Patient Details

Fig 8.2.5 Add Patient Details

63
Surgical Equipment

Fig 8.2.6 Surgical Equipment

64
Payroll

Fig 8.2.7 payroll

65
Home Page

Fig 8.2.8 Home Page

66
Add Vendor Details

Fig 8.2.9 Add Vendor Details

67
Pharmaceutical inventory

Fig 8.2.10 Pharmaceutical inventory

68
Assets Inventory

Fig 8.2.11 Assets Inventory

69
Manage Payable Accounts

Fig 8.2.12 Manage Payable Accounts

70
AI Chatbot

Fig 8.2.13 AI Chatbot

71
BIBLOGRAPHY

[1] Adan, I.J.B.F., Vissers, J.M.H.: Patient mix optimisation in hospital admission planning: a
case study. International Journal of Operations and Production Management 22(4), 445–461
(2002)

[2] Akkerman, R., Knip, M.: Reallocation of beds to reduce waiting time for cardiac surgery.
Health Care Management Science 7(2), 119–126 (2004)

[3] Allen, A.O.: Probability, Statistics and Queueing Theory. Academic Press, London (1990)

[4] Altinel, I.K., Ulas, E.: Simulation modeling for emergency bed require ment planning. Annals
of Operations Research 67(1), 183–210 (1996)

[5] Anthony, R.N.: Planning and control systems: a framework for analy sis. Harvard Business
School Division of Research, Boston (1965)

[6] Ashton, R., Hague, L., Brandreth, M., Worthington, D.J., Cropper, S.: A simulation-based
study of a NHS walk-in centre. Journal of the Operational Research Society 56(2), 153–161
(2005)

[7] Ata, B., van Mieghem, J.A.: The value of partial resource pooling: Should a service network
be integratedor product-focused? Manage ment Science 55(1), 115–131 (2009)

[8] Bagust, A., Place, M., Posnett, J.W.: Dynamics of bed use in accom modating emergency
admissions: stochastic simulation model. British Medical Journal 319(7203), 155–158 (1999)

[9] Bailey, N.T.J.: A study of queues and appointment systems in hospital outpatient
departments,with special reference to waiting times. Journal of the Royal Statistical Society
14(2), 185–99 (1952)

[10] PHP MySQL Website Programming: Problem - Design – Solution byChris


Lea, Mike Buzzard, Dilip Thomas , Jessey White-Cinis

[11] Beginning PHP5, Apache, and MySQL Web Development (Programmer to


Programmer) by Elizabeth Naramore

[12] MySQL/PHP Database Applications, 2nd Edition by Brad Bulger

72

You might also like