Pharmacy Information System With Cover Page v2
Pharmacy Information System With Cover Page v2
INTERGRATED PHARMACY
MANAGEMENT WITH REMINDER
AND FEEDBACK SYSTEM
Martin Mbithi
Belajar Mudah Pemrograman Web, Membuat Aplikasi Penjualan Pulsa dengan PHP dan AJAX
nuri pyd
Design and Implement at ion of a Web based St udent Host el Management Applicat ion Syst em for Muf…
Misheck Mut uzana
2
Abstract
This project illustrates the designing and implementation of an Intergrated
Pharmacy Management System With Reminder And Feedback System. The
primary aim of this system is to implement a channel of providing a fol-
lowup on clients and patients who are on prescriptions. Also, it is a tracking
platform where the pharmacists will be able to track how effectiveness their
prescriptions are to their patients and also is to improve accuracy, enhance
safety and efficiency in the pharmaceutical stores. Today management is one
of the most essential features of all form. Management provides sophisti-
cation to perform any kind of task in a particular form. This is pharmacy
management system; it is used to manage most pharmacy related activities
in the pharmacy.
3
Contents
1 INTRODUCTION 8
1.1 Background Study . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.1 Main Objective . . . . . . . . . . . . . . . . . . . . . . 10
1.3.2 Specific Objectives . . . . . . . . . . . . . . . . . . . . 10
1.4 Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Scope Of The Study . . . . . . . . . . . . . . . . . . . . . . . 11
1.6 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 LITERATURE REVIEW 12
2.1 Theoretical Review . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Similar Projects . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Intelligent Medical Software . . . . . . . . . . . . . . . 13
2.2.2 Rx30 The Pharmacy Management System . . . . . . . 14
2.2.3 McKesson Pharmacy Systems . . . . . . . . . . . . . . 14
➤
2.2.4 WellSky CareTend . . . . . . . . . . . . . . . . . . . . 15
2.2.5 SoftGroup SaTT Site Controller . . . . . . . . . . . 17
2.3 Conceptual framework . . . . . . . . . . . . . . . . . . . . . . 18
2.4 Explanation of the Framework . . . . . . . . . . . . . . . . . . 19
3 METHODOLOGY 20
3.1 Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Collection Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.1 Questionnaires . . . . . . . . . . . . . . . . . . . . . . 20
3.2.2 Face-to-Face Interviews . . . . . . . . . . . . . . . . . . 21
3.3 Architectural Framework . . . . . . . . . . . . . . . . . . . . . 21
3.4 Relationship Between System Design and Concep- tual Frame-
work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.5 Project Implementation . . . . . . . . . . . . . . . . . . . . . 23
3.5.1 System Database . . . . . . . . . . . . . . . . . . . . . 23
3.5.2 Data Manipulation and Management . . . . . . . . . . 23
3.5.3 User Interface . . . . . . . . . . . . . . . . . . . . . . . 23
3.6 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.6.1 System Database Test . . . . . . . . . . . . . . . . . . 23
3.6.2 Data Manipulation And Management Test . . . . . . . 24
3.6.3 User Interface Testing . . . . . . . . . . . . . . . . . . 24
4 IMPLEMENTATION 25
4.1 User Authentication . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 User Authentication Source Codes . . . . . . . . . . . . . . . . 25
4.3 Pharmacy Staffs Records Management . . . . . . . . . . . . . 29
4
4.4 Pharmacy Staffs Records Management Source Codes . . . . . 29
4.5 Clients Records Management . . . . . . . . . . . . . . . . . . 38
4.6 Clients Records Management Source Codes . . . . . . . . . . . 38
4.7 Clients Appointments Management . . . . . . . . . . . . . . . 48
4.8 Clients Appointments Management Source Codes . . . . . . . 48
4.9 Prescriptions Management . . . . . . . . . . . . . . . . . . . . 57
4.10 Prescriptions Management Source Codes . . . . . . . . . . . . 57
4.11 Feedbacks Management . . . . . . . . . . . . . . . . . . . . . . 63
4.12 Feedbacks Management Source Codes . . . . . . . . . . . . . . 63
4.13 Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.14 Reports Source Codes . . . . . . . . . . . . . . . . . . . . . . 67
5 User Manual 71
5.1 Installation Requirements. . . . . . . . . . . . . . . . . . . . . 71
5.1.1 Hardware Requirements . . . . . . . . . . . . . . . . . 71
5.1.2 Software Requirements . . . . . . . . . . . . . . . . . . 71
5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6 APPENDIX 72
6.1 Questionaire . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.2 Table Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.2.1 Appointment Table Design . . . . . . . . . . . . . . . . 73
6.2.2 Clients Table Design . . . . . . . . . . . . . . . . . . . 73
6.2.3 Feedbacks Table Design . . . . . . . . . . . . . . . . . 74
6.2.4 Login Table Design . . . . . . . . . . . . . . . . . . . . 74
6.2.5 Pharmacy Staff Table Design . . . . . . . . . . . . . . 75
6.2.6 Prescriptions Table Design . . . . . . . . . . . . . . . . 75
5
List of Figures
1 Intelligent Medical Software Screenshot . . . . . . . . . . . . . 13
2 Rx 30 Pharmacy Management System Screenshot . . . . . . . 14
3 McKesson Pharmacy System Screenshot . . . . . . . . . . . . 15
4 Wellsky CareTend Pharmacy System . . . . . . . . . . . . . . 16
5 SoftGroup SaTT Site Controller . . . . . . . . . . . . . . . . . 17
6 Conceptual Framework . . . . . . . . . . . . . . . . . . . . . . 18
7 Architectural Framework . . . . . . . . . . . . . . . . . . . . . 21
8 Login Screenshot . . . . . . . . . . . . . . . . . . . . . . . . . 25
9 Add Staff Screenshot . . . . . . . . . . . . . . . . . . . . . . . 29
10 Add Clients Screenshot . . . . . . . . . . . . . . . . . . . . . . 38
11 Clients Appointments Screenshot . . . . . . . . . . . . . . . . 48
12 Prescriptions Management Screenshot . . . . . . . . . . . . . . 57
13 Feedbacks Management Screenshot . . . . . . . . . . . . . . . 63
14 Reports Screenshot . . . . . . . . . . . . . . . . . . . . . . . . 67
15 Appointments Table . . . . . . . . . . . . . . . . . . . . . . . 73
16 Clients Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
17 Feedbacks Table . . . . . . . . . . . . . . . . . . . . . . . . . . 74
18 Login Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
19 Login Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
20 Prescriptions Table . . . . . . . . . . . . . . . . . . . . . . . . 75
6
List of Tables
1 System Database Test . . . . . . . . . . . . . . . . . . . . . . 24
2 Data Manipulation And Management Test . . . . . . . . . . . 24
3 User Interface Testing . . . . . . . . . . . . . . . . . . . . . . 24
7
1 INTRODUCTION
1.1 Background Study
Pharmacy is the clinical health science that links medical science with chem-
istry and it is charged with the discovery, production, disposal, safe and
effective use, and control of medications and drugs. The practice of phar-
macy requires excellent knowledge of drugs, their mechanism of action, side
effects, interactions, mobility and toxicity. At the same time, it requires
knowledge of treatment and understanding of the pathological process. [1]
The scope of pharmacy practice includes more traditional roles such as
compounding and dispensing of medications, and it also includes more mod-
ern services related to health care, including clinical services, reviewing medi-
cations for safety and efficacy, and providing drug information. Pharmacists,
therefore, are the experts on drug therapy and are the primary health pro-
fessionals who optimize the use of medication for the benefit of the patients.
As the technology era advances, the technology plays an important role
in all management scope in order to computerize most of people jobs in the
pharmacies on an effective manner[2]. Besides, the management of the paper
based services faced several complications in a specific directions that can be
summarized in time consuming accessibility, managing the store as well as
searching for a qualified staff that can match the requirements of employer
expectations[3]. In other words, most of time are lost in tracking, matching
or storing documentation in manual procedure.
A Pharmacology is the branch of biology deals with the properties of
chemicals and interests with the study of use, action, side effect of drug. One
of the promising strategy in medical side is the health care information tech-
nology which is used to reduce at most as possible several kind of medication
errors. The most common technologies are Bar-code verification, Electronic
prescribing technology and Computer-prescriber order entry (CPOE) [4].
The pharmacy management systems are considered as a computer sys-
tems which are used in managing and storing the medicines in the pharmacy.
these systems are replaced the manual systems with high efficient functions
such as: stock management and control, medicine labeling, knowing the med-
ication history of the patient and supporting the process of hospital’s phar-
macy[5].
Now a day’s Information and Communication Technology (ICT) plays
a great role in different fields and areas among thus Health Care System
belongs to this and as by Health Care System is the Pharmacies. This leads
to various studies and researches being conducted to selected health care
facilities. It is necessary to ensure a technologically appropriate, equitable,
affordable, efficient and environmentally adaptable and consumer friendly
system, designed to fully utilize the ICT for the maximum benefit in the
health care industry[6].
8
Here Computers have great relevant on storing data’s securely and ease
access on them in short period of time. In order to exploit the Information
Communication Technology in health care system, Pharmacy Management
System is being build. Pharmacy Management System is robust, integrated
technology [7]. Pharmacy Management System deals with the maintenance
with drugs and consumable in the pharmacy unit. The set-up of the Phar-
macy Management system will ensure availability of sufficient quantity of
drugs. Pharmacy Management System will design to detect drug interac-
tion. Also the Pharmacy Management System will allow pharmacists to
track their clients (customers or patients) presciptions, and it will notify
them about their prescriptions.
The Pharmacy Management System is a complete dispensing workflow
management system that is designed to improve accuracy, enhance safety and
efficiency. Most Pharmacies are still doing their whole work manually; this
manual system requires the pharmacist or workers to manually monitor all
the process and to check the presence of the each drug in Pharmacy. So when
the new drugs or new batches of the drug arrive in the Pharmacy the manual
entry is done in the register. And this also followed when the drug is given
to any patients. When the month is completed the workers in the Pharmacy
have to generate the list or report manually of the drugs in the Pharmacy.
This work is done to maintain require stock in the Pharmacy. This kind of
work may lead to mistake by workers and lead to a major problems.
In general the existing Pharmacy Management System is based on Com-
puter Technology that gives service for users, managed by the pharmacist
who gives implementation of function relatively in effective times as well as
resources utilization, easy medicinal and clients data access and confidential
clients’ information storage, but it lacks a feature that can allow the pharma-
cists to to track their clients (customers or patients) presciptions, also they do
not give pharmacists a chance to do a follow up on the drugs they prescribed
to clients and if the client is following up the prescription. This background
study was done to different existing Pharmacy Management System which
had been deployed in the past few years. The project studied its operations
on how it handles clients or patients medical prescriptions records.
9
1.2 Problem Statement
Many pharmacies do not perform a follow up on their clients to find out
if the drugs they prescribed to them are effective or not, also the clients
have a tendancy of deviating from normal prescriptions given by pharmacist.
The process of contacting each and every customer or client who ever visited
the pharmacy to do a follow up on the effectiness of the pharmaceuticals
prescribed is really tendius and almost impossible.
1.3 Objectives
1.3.1 Main Objective
The main objective of this project was to provide a platform where pharma-
cists can do a follow up on the drugs prescribed to their clients and if the
client is following up the prescription.
1. First the study conducted data collection which helped in the analysis
and design of the system during the system development.
2. Secondly the study created a system that fulfilled the user requirements
and be able to perform various function for example to provide a plat-
form that allowed pharmacists to do a follow up on the drugs prescribed
to their clients and if the client is following up the prescription.
3. The study also performed system testing to ensure the that the system
performed all the function effectively and in an efficient manner.
4. Finally the study implemented the system and perform all the post
implementation activities and maintainance of the system.
10
1.4 Justification
The project offered real time information management thus ensuring relia-
bility and efficiency in pharmacies. The system also ensured that there was
a platform for pharmacists to track and perform a follow up on how effective
their prescriptions to the clients are and also if clients are sticking to their
prescribed medications.
1.6 Limitations
The following are some of the limitations which came accross during the de-
velopment process of this system. The the cost of implementing the project
was expensive.The second limitation is that users - clients had to be trained
on how to use the platform which will be time consuming and tendious. An-
other limitation is that most clients tend to abardon their prescriptions ev-
erytime they felt they were recovering from their illness, this posed a difficult
way of tracking their prescriptions. Lastly the system depends on a internet
connection, if one is offline or in an area that has no internet connectivity, it
was difficult to do a follow up on the prescriptions.
11
2 LITERATURE REVIEW
2.1 Theoretical Review
The main goal of Pharmacy management systems is to manage all records and
transactions within the inventory and sales management. These Systems are
very effective tools for an organization to be efficient in business management.
The traditional way of managing sales and inventory is performed by using a
pen and a paper to write down the type and quantity of the stock. But errors
in inventory records still exist even when the management uses IT systems
and product data capturing technologies to improve the inventory systems.
Inventory managers have to face inaccuracy of inventory records either
at the store or at the warehouse level. In order to improve accuracy of
inventory checking, people started using Auto ID technologies. In EPC global
Report,Auto ID technologies are defined as the host of technologies that are
used to help machines to identify objects. It is about identifying items,
capturing all information about the items, sending and storing those data
into a computer with minimal human intervention.[8]
Over the past 40 years, information technology has had a major impact
on the working lives of millions of people. Many industries have embraced
computer technology because of the benefits of automated information pro-
cessing. These include enabling routine,repetitive and monotonous tasks to
be conducted with consistent accuracy; standardisation and consistent use
of terminology and nomenclature; and mass customisation (the capacity of
information technology to provide services to a large population, yet in a way
that can be customised to the individual). [9]
For prescribers and pharmacists, IT can enable the storage of structured
salesrecords, facilitate the electronic prescribing, customers and manage-
mentof medicines, automate the handling of medicines in thesupply chain
and provide tools for monitoring the efficacy and safety of medicines in the
inventory. IT can therefore improve pharmacy management, enable profes-
sionals to provide high quality servicesand help to provide accuracy data
through the system that will be able to handle all necessary activities in the
pharmacy E.g. sales and stock reports.
Although the existing pharmacy management systems have played a big
role in revolutionizing how drug prescriptions is done, there are missing gaps
which have not been addressed yet. The proposed system seeks to address
those missing gaps to produce optimum system which will be easier to use
by everyone in need of it despite their class or literacy levels, this system
will enable pharmacists to track how effective their prescriptions are to their
patients and it will allow pharmacist to do a follow up on the drugs prescribed
to their patients and if the client is following up the prescriptions too.
12
2.2 Similar Projects
2.2.1 Intelligent Medical Software
Intelligent Medical Software caters to every step of the patient care delivery
process, from patient engagement to Telehealth, practice analytics, auto-
mated check-in, care coordination, reporting, and more. Its multi-specialty
features, modules, and templates were built from the ground-up to adapt to
the exact needs of over 40 specialties. [10]
This software is is suited for practices of all sizes and specialties espe-
cially in practices that handle large volumes of eRx such as Allergy, Pain
Management, Pediatrics, and Primary Care.
13
2.2.2 Rx30 The Pharmacy Management System
Rx30 The Pharmacy Management System is designed for specialty phar-
macies, hospitals, compounding pharmacists, single or multiple pharmacy
stores, the solution that helps track and manage medical prescriptions.
Rx30 is a total Pharmacy Management Software application that acts
as the hub for all pharmacy management activities, including prescription
dispensing, fully automated refills and reminders, workflow management,
medication therapy management and STAR ratings management.
14
technology, medical supplies, and care management tools. [12] This system
has the following features: Pharmacy POS Solutions, McKesson Pharmacy
Systems turns real-time data into real insights with the help of our secure
solutions for single and multi-site pharmacies.
It also offers audit risk mitigation features that protect your pharmacy
from audit-triggering claims that can cost you time, money and the trust of
your patients.
15
Figure 4: Wellsky CareTend Pharmacy System
16
2.2.5 SoftGroup ➤ SaTT Site Controller
SoftGroup ➤ SaTT Site Controller is a centralized pharmacy information
management system for the management of the serialization process on phar-
maceutical packaging lines. [14]
17
2.3 Conceptual framework
The system needed a context model which was used to define the enclosing
environment of the system under study. The context was the surrounding
element for the system, and a model provided the mathematical interface
and a behavioral description of the surrounding environment. From the in-
formation which was obtained in the literature review formed the basis of a
theoretical framework in order to closely analyze all the variables and param-
eters that were vital to affordable and quality medical prescription services
delivery in health centers and hospitals. The following figure represented the
conceptual framework of the system.
18
2.4 Explanation of the Framework
The patients, customers and pharmacists were the main users of the system
and in order for any of them to login to the system, the system prompted
them to provide a username and a password. The system cross-refrenced
provided crentials to the one stored in the database. If the given credentials
match, it gave target user access else denied access because the username or
password given by the user is incorrect.
There was a pharmacy administrator who controlled how new users i.e
patients and customers were registered to the system for example pharma-
cists according to their qualifications and experiences. Also, pharmacists get
contact details of their patients and customers, thus creating an account for
them, this accounts were used to track certain patient’s medication history
and how effective drugs prescribed to them are.
There was a centralized database where all the patients, customers, phar-
macists details, medical records and prescriptions was to be securely stored.
19
3 METHODOLOGY
A qualitative research was done to determine how pharmaceutical prescrep-
tions have affected the public. It was done in the target town to random
group of people,the main aim is to gather qualitative data through three dif-
ferent data collection method. The data collected was used to come up with
an ideal system which was efficient to the end users and meet the objectives
of the proposed system.
3.2.1 Questionnaires
The project collected data on how prescriptions are effective through ques-
tionnaire survey, the target population for the clients that visit the phar-
macies to purchase drugs. The kind of questions that were asked in the
questionnaire included:
20
3.2.2 Face-to-Face Interviews
The project used face to face interviews to collect data from the customers
and clients when they visit the pharmacies. The type of data that was
collected included : How effective the prescription given is, Do patients drop
their dose after they heal, What do they do when they miss a dose.
21
The User Interface System was to be responsible for presentation to the
user the outputs from the database management system and from the model
managment system and for capturing and transmitting inputs from the user
to the database managment system and the model management system.
22
3.5 Project Implementation
The project implementation used a pilot implementation technique whereby
the project was implemented in a certain pharmacies in a given geographi-
cal region. During this phase, the project used the following programming
languages and tools:
3.6 Testing
3.6.1 System Database Test
System database involved creation and manipulation of diffrent database
tables in the project. Major operation included Create operation in which
the project used this operation to create new datatable in the database, the
Insert operation, under this operation, the project added a new data record
in the table, for example when inserting a certain data record for instance
a user phone number, by default attribute size should be char(10) if that is
passed the data record will be inserted successfully but if a varchar(11) name
is passed the data record was not be inserted as shown in the table below;
23
Table 1: System Database Test
24
4 IMPLEMENTATION
4.1 User Authentication
i f ( i s s e t ( ✩ POST [ ’ Login ’ ] ) ) {
✩ L o g i n e m a i l = ✩ POST [ ’ L o g i n e m a i l ’ ] ;
✩ Login Rank = ✩ POST [ ’ Login Rank ’ ] ;
✩ Login Password = sha1 (md5( ✩ POST [ ’ Login Password ’ ] ) ) ;
25
he ad er ( ” l o c a t i o n : dashboard . php ” ) ;
} e l s e i f ( ✩ r s && ( ✩ Login Rank == ’ Pharmacy S t a f f ’ ) ) {
he ad er ( ” l o c a t i o n : s t a f f d a s h b o a r d . php ” ) ;
} e l s e i f ( ✩ r s && ( ✩ Login Rank == ’ C l i e n t ’ ) ) {
he ad er ( ” l o c a t i o n : c l i e n t d a s h b o a r d . php ” ) ;
} else {
✩ e r r = ” Login F a i l e d , P l e a s e Check Your C r e d e n t i a l s And Login P
}
}
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
26
<l a b e l c l a s s =”fo
</div>
<d i v c l a s s =”mb❂2”>
<a h r e f =” r e s e t p
</div>
</div>
<d i v c l a s s =”input ❂group
<d i v c l a s s =”input ❂gr
<span c l a s s =”inp
</div>
<i n p u t r e q u i r e d type
<d i v c l a s s =”input ❂gr
<span c l a s s =”inp
<a h r e f=”#”
<i c l a s s
</a>
</span>
</div>
</div>
</div>
<d i v c l a s s =”form ❂group mb❂4”
<d i v c l a s s =”d❂ f l e x a l i g n
<div>
<l a b e l c l a s s =”fo
</div>
</div>
<d i v c l a s s =”input ❂group
<d i v c l a s s =”form ❂che
<i n p u t c l a s s =”fo
<l a b e l c l a s s =”fo
System A d m i
</ l a b e l >
</div>
</div>
<d i v c l a s s =”input ❂group
<d i v c l a s s =”form ❂che
<i n p u t c l a s s =”fo
<l a b e l c l a s s =”fo
Pharmacy S t
</ l a b e l >
</div>
</div>
<d i v c l a s s =”input ❂group
27
<d i v c l a s s =”form ❂che
<i n p u t c l a s s =”fo
<l a b e l c l a s s =”fo
Client
</ l a b e l >
</div>
</div>
</div>
<d i v c l a s s =”mt❂4”>
<button type=”submit ” na
<span c l a s s =”btn ❂i n n
<span c l a s s =”btn ❂i n n
</button>
</div>
</form>
</div>
<d i v c l a s s =”card ❂ f o o t e r px❂md❂5”><s m
<a h r e f =” c l i e n t s i g n u p . php” c l a s
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ?>
</body>
</html>
28
4.3 Pharmacy Staffs Records Management
/ ✯ Add S t a f f ✯ /
i f ( i s s e t ( ✩ POST [ ’ a d d s t a f f ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
29
✩ e r r = ” S t a f f Name Cannot Be Empty ” ;
}
i f ( i s s e t ( ✩ POST [ ’ S t a f f i d n o ’ ] ) && ! empty ( ✩ POST [ ’ S t a f f i d n o ’ ] ) ) {
✩ S t a f f i d n o = m y s q l i r e a l e s c a p e s t r i n g ( ✩ mysqli , t r i m ( ✩ POST [ ’ S
} else {
✩error = 1;
✩ e r r = ” S t a f f ID No Cannot Be Empty ” ;
}
i f (! ✩error ) {
// p r e v e n t Double e n t r i e s
✩ s q l = ”SELECT ✯ FROM P h a r m a c y S t a f f WHERE S t a f f p h o n e n o =’ ✩ S
”;
✩ r e s = m y s q l i q u e r y ( ✩ mysqli , ✩ s q l ) ;
i f ( mysqli num rows ( ✩ r e s ) > 0 ) {
✩ row = m y s q l i f e t c h a s s o c ( ✩ r e s ) ;
i f ( ✩ S t a f f p h o n e n o == ✩ row [ ’ S t a f f p h o n e n o ’ ] ) {
✩ e r r = ”A S t a f f With That Phone Number
Exists ”;
}
} else {
✩ query = ”INSERT INTO P h a r m a c y S t a f f ( S t a f f i d , S t a f f n a m e ,
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ query ) ;
✩ r c = ✩ stmt ❂>bind param ( ’ s s s s ’ , ✩ S t a f f i d , ✩ S t a f f n a m e , ✩ S t
✩ stmt ❂>e x e c u t e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ”Added” && h ea de r ( ” r e f r e s h : 1 ; u r l=s t a f f s . php ”
} else {
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
}
}
/ ✯ Update S t a f f ✯ /
i f ( i s s e t ( ✩ POST [ ’ a d d s t a f f ’ ] ) ) {
30
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
i f (! ✩error ) {
31
/✯ D e l e t e S t a f f ✯/
i f ( i s s e t ( ✩ GET [ ’ d e l e t e s t a f f ’ ] ) ) {
✩ i d = ✩ GET [ ’ d e l e t e s t a f f ’ ] ;
// ✩ auth = ✩ GET [ ’ auth ’ ] ;
✩ adn = ”DELETE FROM P h a r m a c y S t a f f WHERE S t a f f i d =?”;
// ✩ a u t h d e l e t e = ”DELETE FROM Login WHERE L o g i n i d = ? ” ;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ adn ) ;
// ✩ a u t h d e l = ✩ mysqli ❂>p r e p a r e ( ✩ a u t h d e l ) ;
✩ stmt ❂>bind param ( ’ s ’ , ✩ i d ) ;
// ✩ a u t h d e l ❂>bind param ( ’ s ’ , ✩ auth ) ;
✩ stmt ❂>e x e c u t e ( ) ;
// ✩ a u t h d e l ❂>e x e c u t e ( ) ;
✩ stmt ❂>c l o s e ( ) ;
// ✩ a u t h d e l ❂>c l o s e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” D e l e t e d ” && h ea de r ( ” r e f r e s h : 1 ; u r l=s t a f f s . php ” ) ;
} else {
// i n j e c t a l e r t t h a t t a s k f a i l e d
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
32
<h5 c l a s s =”h4 d❂ i n l i n e ❂b l o c k f o n t ❂weight
</div>
<!❂❂ A d d i t i o n a l i n f o ❂❂>
</div>
<d i v c l a s s =”c o l ❂md❂6 d❂ f l e x a l i g n ❂items ❂ c e n t e r j
<d i v c l a s s =” a c t i o n s a c t i o n s ❂dark d❂ i n l i n e ❂b l
<a h r e f=”#a d d s t a f f ” data ❂ t o g g l e =”modal ”
< i c l a s s =” f a r fa ❂u s e r ❂ p l u s mr❂2”></i
</a>
</div>
</div>
<!❂❂ Add S t a f f Modal ❂❂>
<d i v c l a s s =”modal f a d e ” i d=” a d d s t a f f ”>
<d i v c l a s s =”modal❂ d i a l o g modal❂ l g ”>
<d i v c l a s s =”modal❂c o n t e n t”>
<d i v c l a s s =”modal❂he ad er”>
<h4 c l a s s =”modal❂ t i t l e ”> F i l l A l l
<button type=”button ” c l a s s =” c l o
<span a r i a ❂hidden=”t r u e”>&t i
</button>
</div>
<d i v c l a s s =”modal❂body”>
<!❂❂ Form ❂❂>
<form method=”p o s t ” e n c t y p e=”m u
<d i v c l a s s =”card ❂body”>
<d i v c l a s s =”row”>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””> S
<i n p u t type=” t e x
<i n p u t type=”hid
</div>
33
</div>
<d i v c l a s s =”t e x t ❂ r i g h t ”>
<button type=”submit ” na
</div>
</form>
</div>
<d i v c l a s s =”modal❂ f o o t e r j u s t i f y ❂c o n
<button type=”button ” c l a s s =”btn
</div>
</div>
</div>
</div>
<!❂❂ End Add S t a f f Modal ❂❂>
</div>
</div>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”dt ❂1” c l a s s =” t a b l e a l i g n ❂items ❂ c e
<thead>
<t r >
<th s c o p e=” c o l ”> S t a f f Name</th>
<th s c o p e=” c o l ”> S t a f f N a t i o n a l I
<th s c o p e=” c o l ”> S t a f f Phone Num
<th s c o p e=” c o l ”>Manage S t a f f </th
</t r >
</thead>
<tbody>
<?php
✩ r e t = ”SELECT ✯ FROM
Pharmacy Staff ” ;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ s t a f f s = ✩ r e s ❂>f e t c h o b j e c t (
?>
<t r >
<th s c o p e=”row”>
<a h r e f=”#” c l a s s =”name
</th>
34
<td>
<?php echo ✩ s t a f f s ❂>S t a
</td>
<td>
<?php echo ✩ s t a f f s ❂>S t a f
</td>
<td c l a s s =””>
<!❂❂ A c t i o n s ❂❂>
<d i v c l a s s =” a c t i o n s ml❂3
<a h r e f =” v i e w s t a f f .
< i c l a s s =” f a r fa
</a>
<a h r e f=”#e d i t ❂<?php
< i c l a s s =” f a r fa
</a>
<!❂❂ Edit S t a f f Mod
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
modal❂ l g ”>
<d i v c l a s s =”
<d i v c l a
<h4
<but
</bu
</div>
<d i v c l a
<!❂❂
<for
35
</fo
</div>
<d i v c l a
<but
</div>
</div>
</div>
</div>
<a h r e f=”#d e l e t e ❂<?p
< i c l a s s =” f a r fa
</a>
<!❂❂ D e l e t e S t a f f M
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
<d i v c l a s s =”
<d i v c l a
<h5
<but
</bu
</div>
<d i v c l a
<h4>
Record ?</h4>
<br>
<but
<a h
</div>
</div>
</div>
</div>
</div>
</td>
</t r >
36
<?php } ?>
</tbody>
</t a b l e >
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
37
4.5 Clients Records Management
/ ✯ Add C l i e n t ✯ /
i f ( i s s e t ( ✩ POST [ ’ a d d c l i e n t ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
38
✩ e r r = ” C l i e n t Name Cannot Be Empty ” ;
}
i f ( i s s e t ( ✩ POST [ ’ C l i e n t p h o n e n o ’ ] ) && ! empty ( ✩ POST [ ’ C l i e n t p h o n e
✩ C l i e n t p h o n e n o = m y s q l i r e a l e s c a p e s t r i n g ( ✩ mysqli , t r i m ( ✩ POS
} else {
✩error = 1;
✩ e r r = ” C l i e n t Phone Number Cannot Be Empty ” ;
}
i f (! ✩error ) {
// p r e v e n t Double e n t r i e s
✩ s q l = ”SELECT ✯ FROM C l i e n t s WHERE C l i e n t e m a i l =’ ✩ C l i e n t e m a
| | Client phone no = ’ ✩Client phone no ’ ”;
✩ r e s = m y s q l i q u e r y ( ✩ mysqli , ✩ s q l ) ;
i f ( mysqli num rows ( ✩ r e s ) > 0 ) {
✩ row = m y s q l i f e t c h a s s o c ( ✩ r e s ) ;
i f ( ✩ C l i e n t e m a i l == ✩ row [ ’ C l i e n t e m a i l ’ ] ) {
✩ e r r = ”A C l i e n t Account With That Phone Number
Exists ”;
} else {
✩ e r r = ”A C l i e n t Account With That Email Address E x i s t s
}
39
} else {
✩ query = ”INSERT INTO C l i e n t s ( C l i e n t i d , Client name , C l i e n
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ query ) ;
✩ r c = ✩ stmt ❂>bind param ( ’ s s s s s s ’ , ✩ C l i e n t i d , ✩ Client name ,
✩ stmt ❂>e x e c u t e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ”Added” && h ea de r ( ” r e f r e s h : 1 ; u r l=c l i e n t s . php
} else {
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
}
}
/ ✯ Update C l i e n t ✯ /
i f ( i s s e t ( ✩ POST [ ’ u p d a t e c l i e n t ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
40
}
i f (! ✩error ) {
✩ query = ”UPDATE C l i e n t s SET C l i e n t n a m e =? , C l i e n t p h o n e n o =?
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ query ) ;
✩ r c = ✩ stmt ❂>bind param ( ’ s s s s s s ’ , ✩ Client name , ✩ C l i e n t p h o n e n o
✩ stmt ❂>e x e c u t e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” Updated ” && he ad er ( ” r e f r e s h : 1 ; u r l=c l i e n t s . php ”
} else {
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
}
/✯ D e l e t e S t a f f ✯/
i f ( i s s e t ( ✩ GET [ ’ d e l e t e c l i e n t ’ ] ) ) {
✩ i d = ✩ GET [ ’ d e l e t e c l i e n t ’ ] ;
✩ adn = ”DELETE FROM C l i e n t s WHERE C l i e n t i d =?”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ adn ) ;
✩ stmt ❂>bind param ( ’ s ’ , ✩ i d ) ;
✩ stmt ❂>e x e c u t e ( ) ;
✩ stmt ❂>c l o s e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” D e l e t e d ” && h ea de r ( ” r e f r e s h : 1 ; u r l=c l i e n t s . php ” ) ;
} else {
// i n j e c t a l e r t t h a t t a s k f a i l e d
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
41
}
}
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
42
</button>
</div>
<d i v c l a s s =”modal❂body”>
<!❂❂ Form ❂❂>
<form method=”p o s t ” e n c t y p e=”m u
<d i v c l a s s =”card ❂body”>
<d i v c l a s s =”row”>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>Na
<i n p u t type=” t e x
<i n p u t type=”hid
</div>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>Ph
<i n p u t type=” t e x
</div>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>G
< s e l e c t type=” t e
<o p t i o n >Male
<o p t i o n >Fem
</ s e l e c t >
</div>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>Em
<i n p u t type=”e m
</div>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>L
<t e x t a r e a r e q u i r
</div>
</div>
</div>
<d i v c l a s s =”t e x t ❂ r i g h t ”>
<button type=”submit ” na
</div>
</form>
</div>
<d i v c l a s s =”modal❂ f o o t e r j u s t i f y ❂c o n
<button type=”button ” c l a s s =”btn
</div>
</div>
</div>
43
</div>
<!❂❂ End Add S t a f f Modal ❂❂>
</div>
</div>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”dt ❂1” c l a s s =” t a b l e a l i g n ❂items ❂ c e
<thead>
<t r >
<th s c o p e=” c o l ”>Name</th>
<th s c o p e=” c o l ”>Phone No </th>
<th s c o p e=” c o l ”>Email </th>
<th s c o p e=” c o l ”>Gender</th>
<th s c o p e=” c o l ”>Location </th>
<th s c o p e=” c o l ”>Manage C l i e n t </t
</t r >
</thead>
<tbody>
<?php
✩ r e t = ”SELECT ✯ FROM
Clients ”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ c l i e n t s = ✩ r e s ❂>f e t c h o b j e c t
?>
<t r >
<th s c o p e=”row”>
<a h r e f=”#” c l a s s =”name
</th>
<td>
<?php echo ✩ c l i e n t s ❂>C l i
</td>
<td>
<?php echo ✩ c l i e n t s ❂>C l
</td>
<td>
<?php echo ✩ c l i e n t s ❂>C l i
</td>
44
<td>
<?php echo ✩ c l i e n t s ❂>C l
</td>
<td c l a s s =””>
<!❂❂ A c t i o n s ❂❂>
<d i v c l a s s =” a c t i o n s ml❂3
<a h r e f =” v i e w c l i e n t
< i c l a s s =” f a r fa
</a>
<a h r e f=”#e d i t ❂<?php
< i c l a s s =” f a r fa
</a>
<!❂❂ Edit C l i e n t Mo
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
modal❂ l g ”>
<d i v c l a s s =”
<d i v c l a
<h4
<but
</bu
</div>
<d i v c l a
<!❂❂
<for
45
</fo
</div>
<d i v c l a
<but
</div>
</div>
</div>
</div>
<a h r e f=”#d e l e t e ❂<?p
< i c l a s s =” f a r fa
</a>
<!❂❂ D e l e t e S t a f f M
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
<d i v c l a s s =”
<d i v c l a
<h5
<but
</bu
</div>
<d i v c l a
<h4>
<br>
<but
<a h
</div>
46
</div>
</div>
</div>
</div>
</td>
</t r >
<?php } ?>
</tbody>
</t a b l e >
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
47
4.7 Clients Appointments Management
/ ✯ Add C l i e n t Appointment ✯ /
i f ( i s s e t ( ✩ POST [ ’ add appointment ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
48
✩ e r r = ” C l i e n t ID Cannot Be Empty ” ;
}
i f ( i s s e t ( ✩ POST [ ’ A p p o i n t m e n t d e t a i l s ’ ] ) && ! empty ( ✩ POST [ ’ A p p o i n t m
✩ A p p o i n t m e n t d e t a i l s = ✩ POST [ ’ A p p o i n t m e n t d e t a i l s ’ ] ;
} else {
✩error = 1;
✩ e r r = ” Apointment D e t a i l s Cannot Be Empty ” ;
}
i f (! ✩error ) {
// p r e v e n t Double e n t r i e s
✩ s q l = ”SELECT ✯ FROM Appointments WHERE Appointment id =’ ✩ App
✩ r e s = m y s q l i q u e r y ( ✩ mysqli , ✩ s q l ) ;
i f ( mysqli num rows ( ✩ r e s ) > 0 ) {
✩ row = m y s q l i f e t c h a s s o c ( ✩ r e s ) ;
i f ( ✩ Appointment id == ✩ row [ ’ Appointment id ’ ] ) {
✩ e r r = ”A C l i e n t Appointment With That ID
Exists ”;
}
} else {
✩ query = ”INSERT INTO Appointments ( Appointment id , A p p o i n t
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ query ) ;
✩ r c = ✩ stmt ❂>bind param ( ’ s s s s ’ , ✩ Appointment id , ✩ A p p o i n t m e
✩ stmt ❂>e x e c u t e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ”Added” && h ea de r ( ” r e f r e s h : 1 ; u r l=appointmen
} else {
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
}
}
/ ✯ Update C l i e n t Appointment ✯ /
i f ( i s s e t ( ✩ POST [ ’ update appointment ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
49
✩error = 0;
i f (! ✩error ) {
✩ query = ”UPDATE Appointments SET A p p o i n t m e n t d e t a i l s =? , Appoin
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ query ) ;
✩ r c = ✩ stmt ❂>bind param ( ’ s s s ’ , ✩ A p p o i n t m e n t d e t a i l s , ✩ Appointm
✩ stmt ❂>e x e c u t e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” Updated ” && he ad er ( ” r e f r e s h : 1 ; u r l=appointments .
} else {
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
}
/ ✯ D e l e t e C l i e n t Appointment ✯ /
i f ( i s s e t ( ✩ GET [ ’ d e l e t e a p p o i n t m e n t ’ ] ) ) {
✩ i d = ✩ GET [ ’ d e l e t e a p p o i n t m e n t ’ ] ;
✩ adn = ”DELETE FROM Appointments WHERE Appointment id =?”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ adn ) ;
50
✩ stmt ❂>bind param ( ’ s ’ , ✩ i d ) ;
✩ stmt ❂>e x e c u t e ( ) ;
✩ stmt ❂>c l o s e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” D e l e t e d ” && h ea de r ( ” r e f r e s h : 1 ; u r l=appointments . php ”
} else {
// i n j e c t a l e r t t h a t t a s k f a i l e d
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
51
<!❂❂ Add Modal ❂❂>
<d i v c l a s s =”modal f a d e ” i d=”add modal”>
<d i v c l a s s =”modal❂ d i a l o g modal❂ l g ”>
<d i v c l a s s =”modal❂c o n t e n t”>
<d i v c l a s s =”modal❂he ad er”>
<h4 c l a s s =”modal❂ t i t l e ”> F i l l A l l
<button type=”button ” c l a s s =” c l o
<span a r i a ❂hidden=”t r u e”>&t i
</button>
</div>
<d i v c l a s s =”modal❂body”>
<!❂❂ Form ❂❂>
<form method=”p o s t ” e n c t y p e=”m u
<d i v c l a s s =”card ❂body”>
<d i v c l a s s =”row”>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””> C
< s e l e c t i d=”Clie
<o p t i o n >S e l e
<?php
✩ r e t = ”SELE
Clients ”;
✩ stmt = ✩ my
✩ stmt ❂>e x e c u
✩ r e s = ✩ stmt
while ( ✩ c l i e
?>
<o p t i o n >
<?php } ?>
</ s e l e c t >
<i n p u t type=”hid
<i n p u t type=”hid
</div>
<d i v c l a s s =”form ❂gro
<l a b e l f o r =””>A
<i n p u t type=”d a t
</div>
52
</div>
<d i v c l a s s =”t e x t ❂ r i g h t ”>
<button type=”submit ” na
</div>
</form>
</div>
<d i v c l a s s =”modal❂ f o o t e r j u s t i f y ❂c o n
<button type=”button ” c l a s s =”btn
</div>
</div>
</div>
</div>
<!❂❂ End Add Modal ❂❂>
</div>
</div>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”dt ❂1” c l a s s =” t a b l e a l i g n ❂items ❂ c e
<thead>
<t r >
<th s c o p e=” c o l ”>Appointment D e t
<th s c o p e=” c o l ”> Date </th>
<th s c o p e=” c o l ”>Manage </th>
</t r >
</thead>
<tbody>
<?php
✩ r e t = ”SELECT ✯ FROM
Appointments ” ;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ appointment = ✩ r e s ❂>f e t c h o b
?>
<t r >
<td>
<p>
<?php echo ✩ appointm
</p>
53
</td>
<td>
<?php echo ✩ appointment ❂
</td>
<td c l a s s =””>
<!❂❂ A c t i o n s ❂❂>
<d i v c l a s s =” a c t i o n s ml❂3
<a h r e f =”vi ew appoi n
< i c l a s s =” f a r fa
</a>
<a h r e f=”#e d i t ❂<?php
< i c l a s s =” f a r fa
</a>
<!❂❂ Edit C l i e n t Mo
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
modal❂ l g ”>
<d i v c l a s s =”
<d i v c l a
<h4
<but
</bu
</div>
<d i v c l a
<!❂❂
<for
54
</fo
</div>
<d i v c l a
<but
</div>
</div>
</div>
</div>
<a h r e f=”#d e l e t e ❂<?p
< i c l a s s =” f a r fa
</a>
<!❂❂ D e l e t e S t a f f M
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
<d i v c l a s s =”
<d i v c l a
<h5
<but
</bu
</div>
<d i v c l a
<h4>
<br>
<but
<a h
</div>
</div>
</div>
</div>
</div>
</td>
<!❂❂ CK E d i t o r ❂❂>
<s c r i p t >
CKEDITOR. r e p l a c e ( ’ <? php
</ s c r i p t >
</t r >
<?php } ?>
</tbody>
</t a b l e >
</div>
55
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
56
4.9 Prescriptions Management
i f ( i s s e t ( ✩ POST [ ’ u p d a t e p r e s c r i p t i o n ’ ] ) ) {
// E r r o r Handling and p r e v e n t i o n o f p o s t i n g do ub l e e n t r i e s
✩error = 0;
57
✩error = 1;
✩ e r r = ” P r e s c r i p t i o n ID Cannot Be Empty ” ;
}
i f (! ✩error ) {
/ ✯ D e l e t e C l i e n t Appointment ✯ /
i f ( i s s e t ( ✩ GET [ ’ d e l e t e ’ ] ) ) {
✩ i d = ✩ GET [ ’ d e l e t e ’ ] ;
✩ adn = ”DELETE FROM P r e s c r i p t i o n s WHERE P r e s c r i p t i o n i d =?”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ adn ) ;
✩ stmt ❂>bind param ( ’ s ’ , ✩ i d ) ;
✩ stmt ❂>e x e c u t e ( ) ;
✩ stmt ❂>c l o s e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” D e l e t e d ” && h ea de r ( ” r e f r e s h : 1 ; u r l=p r e s c r i p t i o n s . php
} else {
// i n j e c t a l e r t t h a t t a s k f a i l e d
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
58
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”dt ❂1” c l a s s =” t a b l e a l i g n ❂items ❂ c e
<thead>
<t r >
<th s c o p e=” c o l ”> P r e s c r i p t i o n </th
<th s c o p e=” c o l ”>Manage </th>
</t r >
</thead>
<tbody>
<?php
59
✩ r e t = ”SELECT ✯ FROM
Prescriptions ”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ p r e s = ✩ r e s ❂>f e t c h o b j e c t ( ) )
?>
<t r >
<td>
<?php echo ✩ p r e s ❂>P r e s c
</th>
</td>
<td c l a s s =””>
<!❂❂ A c t i o n s ❂❂>
<d i v c l a s s =” a c t i o n s ml❂3
<a h r e f=”#e d i t ❂<?php
< i c l a s s =” f a r fa
</a>
<!❂❂ Edit C l i e n t Mo
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
modal❂ l g ”>
<d i v c l a s s =”
<d i v c l a
<h4
<but
</bu
</div>
<d i v c l a
<!❂❂
<for
60
</fo
</div>
<d i v c l a
<but
</div>
</div>
</div>
</div>
<a h r e f=”#d e l e t e ❂<?p
< i c l a s s =” f a r fa
</a>
<!❂❂ D e l e t e S t a f f M
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
<d i v c l a s s =”
<d i v c l a
<h5
<but
</bu
</div>
<d i v c l a
<h4>
<br>
<but
<a h
</div>
</div>
</div>
</div>
</div>
</td>
<s c r i p t >
CKEDITOR. r e p l a c e ( ’ <? php
</ s c r i p t >
</t r >
<?php } ?>
</tbody>
</t a b l e >
61
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
62
4.11 Feedbacks Management
/ ✯ D e l e t e C l i e n t Appointment ✯ /
i f ( i s s e t ( ✩ GET [ ’ d e l e t e ’ ] ) ) {
✩ i d = ✩ GET [ ’ d e l e t e ’ ] ;
✩ adn = ”DELETE FROM Feedbacks WHERE F e e d b a c k i d =?”;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ adn ) ;
✩ stmt ❂>bind param ( ’ s ’ , ✩ i d ) ;
✩ stmt ❂>e x e c u t e ( ) ;
✩ stmt ❂>c l o s e ( ) ;
i f ( ✩ stmt ) {
✩ s u c c e s s = ” D e l e t e d ” && h ea de r ( ” r e f r e s h : 1 ; u r l=f e e d b a c k s . php ” ) ;
} else {
// i n j e c t a l e r t t h a t t a s k f a i l e d
✩ i n f o = ” P l e a s e Try Again Or Try L a t e r ” ;
}
}
63
r e q u i r e o n c e ( ’ . . / p a r t i a l s / head . php ’ ) ;
?>
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”dt ❂1” c l a s s =” t a b l e a l i g n ❂items ❂ c e
<thead>
<t r >
<th s c o p e=” c o l ”>Feedback </th>
<th s c o p e=” c o l ”>Manage </th>
</t r >
</thead>
<tbody>
<?php
64
✩ r e t = ”SELECT ✯ FROM
Feedbacks ” ;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ f e e d b a c k s = ✩ r e s ❂>f e t c h o b j e
?>
<t r >
<td>
<?php echo ✩ f e e d b a c k s ❂>F
</th>
</td>
<td c l a s s =””>
<!❂❂ A c t i o n s ❂❂>
<d i v c l a s s =” a c t i o n s ml❂3
<a h r e f =”v i e w f e e d b a
< i c l a s s =” f a r fa
</a>
<a h r e f=”#d e l e t e ❂<?p
< i c l a s s =” f a r fa
</a>
<!❂❂ D e l e t e S t a f f M
<d i v c l a s s =”modal f a
<d i v c l a s s =”mod
<d i v c l a s s =”
<d i v c l a
<h5
<but
</bu
</div>
<d i v c l a
<h4>
<br>
<but
<a h
</div>
</div>
</div>
</div>
</div>
65
</td>
</t r >
<?php } ?>
</tbody>
</t a b l e >
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
66
4.13 Reports
<body c l a s s =” a p p l i c a t i o n a p p l i c a t i o n ❂ o f f s e t ”>
<!❂❂ A p p l i c a t i o n c o n t a i n e r ❂❂>
<d i v c l a s s =”c o n t a i n e r ❂ f l u i d c o n t a i n e r ❂ a p p l i c a t i o n ”>
<!❂❂ Sidenav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s i d e n a v . php ’ ) ; ?>
<!❂❂ Content ❂❂>
<d i v c l a s s =”main❂c o n t e n t p o s i t i o n ❂ r e l a t i v e ”>
<!❂❂ Main nav ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / n a v i g a t i o n . php ’ ) ; ?>
67
<d i v c l a s s =”page ❂ t i t l e ”>
<d i v c l a s s =”row j u s t i f y ❂c o n t e n t ❂between a l i g n ❂items ❂
<d i v c l a s s =”c o l ❂md❂6 d❂ f l e x a l i g n ❂items ❂ c e n t e r j
<!❂❂ Page t i t l e + Go Back button ❂❂>
<d i v c l a s s =”d❂ i n l i n e ❂b l o c k”>
<h5 c l a s s =”h4 d❂ i n l i n e ❂b l o c k f o n t ❂weight
</div>
<!❂❂ A d d i t i o n a l i n f o ❂❂>
</div>
</div>
</div>
<!❂❂ L i s t i n g ❂❂>
<d i v c l a s s =”c a r d”>
<!❂❂ Table ❂❂>
<d i v c l a s s =”t a b l e ❂ r e s p o n s i v e ”>
<d i v c l a s s =”card ❂head”>
<br>
<h5 c l a s s =”t e x t ❂ c e n t e r ”> S t a f f s Records </h5>
</div>
<hr>
<d i v c l a s s =”card ❂body”>
<t a b l e i d=”e x p o r t ” c l a s s =” t a b l e a l i g n ❂items ❂
<thead>
<th s c o p e=” c o l ”> S t a f f Name</th>
<th s c o p e=” c o l ”> S t a f f N a t i o n a l ID Nu
<th s c o p e=” c o l ”> S t a f f Phone Number</
</thead>
<tbody>
<?php
✩ r e t = ”SELECT ✯ FROM
Pharmacy Staff ” ;
✩ stmt = ✩ mysqli ❂>p r e p a r e ( ✩ r e t ) ;
✩ stmt ❂>e x e c u t e ( ) ; // ok
✩ r e s = ✩ stmt ❂>g e t r e s u l t ( ) ;
w h i l e ( ✩ s t a f f s = ✩ r e s ❂>f e t c h o b j e c t (
?>
<t r >
<td s c o p e=”row”>
<a h r e f=”#” c l a s s =”name
</td>
<td>
68
<?php echo ✩ s t a f f s ❂>S t a
</td>
<td>
<?php echo ✩ s t a f f s ❂>S t a f
</td>
</t r >
<?php } ?>
</tbody>
</t a b l e >
</div>
</div>
</div>
69
<th s c o p e=”row”>
<a h r e f=”#” c l a s s =”name
</th>
<td>
<?php echo ✩ c l i e n t s ❂>C l i
</td>
<td>
<?php echo ✩ c l i e n t s ❂>C l
</td>
<td>
<?php echo ✩ c l i e n t s ❂>C l i
</td>
<td>
<?php echo ✩ c l i e n t s ❂>C l
</td>
</t r >
<?php } ?>
</tbody>
</t a b l e >
</div>
</div>
</div>
</div>
<!❂❂ F o o t e r ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / f o o t e r . php ’ ) ; ?>
</div>
</div>
<!❂❂ S c r i p t s ❂❂>
<?php r e q u i r e o n c e ( ’ . . / p a r t i a l s / s c r i p t s . php ’ ) ; ?>
</body>
</html>
70
5 User Manual
5.1 Installation Requirements.
In order for the system to run, the following hardware and software require-
ments was to be met.
71
6 APPENDIX
6.1 Questionaire
1. How do you know if this exactly what your doctor prescribed?
O I dont Know O I know less O I enquire for more explanation
72
6.2 Table Designs
6.2.1 Appointment Table Design
73
6.2.3 Feedbacks Table Design
74
6.2.5 Pharmacy Staff Table Design
75
References
[1] Donald G Bauer, Richard J Campero, Paul B Rasband, and Martin D
Weel. Inventory management system, November 27 2012. US Patent
8,321,302.
[2] Basit Chaudhry, Jerome Wang, Shinyi Wu, Margaret Maglione, Wal-
ter Mojica, Elizabeth Roth, Sally C Morton, and Paul G Shekelle.
Systematic review: impact of health information technology on qual-
ity, efficiency, and costs of medical care. Annals of internal medicine,
144(10):742–752, 2006.
[4] David M Cutler, Robert S Huckman, and Mary Beth Landrum. The
role of information in medical markets: an analysis of publicly reported
outcomes in cardiac surgery. American Economic Review, 94(2):342–
346, 2004.
[7] Cecilia Fagerström, Hanna Tuvesson, Lisa Axelsson, and Lina Nilsson.
The role of ict in nursing practice: an integrative literature review of the
swedish context. Scandinavian journal of caring sciences, 31(3):434–448,
2017.
[8] Jay W Forrester. System dynamics, systems thinking, and soft or. Sys-
tem dynamics review, 10(2-3):245–256, 1994.
[9] John R Hauser, Glen L Urban, Guilherme Liberali, and Michael Braun.
Website morphing. Marketing Science, 28(2):202–223, 2009.
[10] Saidi Mchumo and Hongmei Chi. A framework for access control model
in enterprise healthcare via saml. In Proceedings of the 48th Annual
Southeast Regional Conference, pages 1–2, 2010.
76
[12] Tushar Saha, Robiul Hasan Bhuiya, Zia Uddin Masum, Muham-
mad Rashedul Islam, and Jakir Ahmed Chowdhury. Hospital pharmacy
management system and future development approaches in bangladeshi
hospital. Bangladesh Pharmaceutical Journal, 20(2):180–187, 2017.
77