0% found this document useful (0 votes)
248 views109 pages

Pharmacy Management System For The Central Pharmacy - Pokunuwita

This document is a dissertation submitted for a Master's degree in Information Technology. It summarizes a pharmacy management system developed for the Central Pharmacy - Pokunuwita. The system aims to improve accuracy, safety, and efficiency by minimizing issues with the current manual process. It allows different users to perform tasks like managing inventory, generating reports, and checking drug availability online. The system was developed using the Laravel PHP framework and follows an MVC architecture with MySQL database. It addresses the needs of administrators, cashiers, and customers through a web-based interface.

Uploaded by

Usama Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
248 views109 pages

Pharmacy Management System For The Central Pharmacy - Pokunuwita

This document is a dissertation submitted for a Master's degree in Information Technology. It summarizes a pharmacy management system developed for the Central Pharmacy - Pokunuwita. The system aims to improve accuracy, safety, and efficiency by minimizing issues with the current manual process. It allows different users to perform tasks like managing inventory, generating reports, and checking drug availability online. The system was developed using the Laravel PHP framework and follows an MVC architecture with MySQL database. It addresses the needs of administrators, cashiers, and customers through a web-based interface.

Uploaded by

Usama Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 109

Pharmacy Management System for

The Central Pharmacy - Pokunuwita

A dissertation submitted for the Degree of Master of


Information Technology

W.D.W.T. Rathnayake
University of Colombo School of Computing
2018

i
Declaration

The thesis is my original work and has not been submitted previously for a degree at this or any
other university/institute.

To the best of my knowledge it does not contain any material published or written by another
person, except as acknowledged in the text.

Student Name: W.D.W.T. Rathnayake

Registration Number: 2015MIT042

Index Number: 15550421

_____________________ /09/2018

Signature: Date:

This is to certify that this thesis is based on the work of

Mr./Ms.

under my supervision. The thesis has been prepared according to the format stipulated and is of
acceptable standard.

Certified by:

Supervisor Name:

_____________________

Signature: Date:

i
Abstract

This project illustrates the designing and implementation of a web based Pharmacy
management system for the Central Pharmacy – Pokunuwita. The primary aim of is to improve
accuracy and enhance safety and efficiency in the pharmaceutical store by minimizing issues
occur in day to day operations.

Currently they are using a manual system which is very hard in handling. Managing the stock
with paper records based on the expiry dates and the quantity available in the stock are some
major problems identified in the problem domain. The system intends to minimize the workload
of the staff and increase the value of the business to gain the competitive advantages in the
pharmaceutical industry.

The system allows different tasks for different users. They are administrator, cashier, data entry
operator and normal user who can logging the system as different user roles to perform their
functions separately. Administrator has all privileges of the system. Create users, generate
reports for managerial decisions, manage employee attendance are some administrator tasks. In
addition, the system will show a notification about expiry dates of drugs and stock ending
details. It is easy to handle stock management through the software rather than working with
paper records.

Customers are the main asset of the business. So, the system will help to reduce waiting time
of the customers. They can check the availability of the items before they come to the pharmacy
by using the search facility provided in the pharmacy web site.

The system is developed using Laravel which is open-source PHP web framework and MySQL
database. Laravel supports the MVC architecture which is more efficient and attains perfect
design for the system. CSS, Bootstrap, Java Script are some other technologies used to develop
this system.

ii
Acknowledgement

First and foremost, I would like to express my sincere gratitude to my supervisor Dr. K.L.
Jayarathne for the continuous support he had gave me. His comments, encouragements,
patience, enthusiasm, knowledge and guidance helped me in all the time of this project and
writing of the thesis.

Besides my supervisor, I would like to thank the rest of my lecturers in the UCSC, who helped
me to improve my knowledge and professional qualifications throughout this MIT program. I
take this opportunity to respect them as well.

And also, the other staff members of the UCSC helped me in various ways. I am grateful for
their contribution and support.

I would like to express my gratitude to the staff of The Library, UOC, where I am currently
employed. There are various challenges when carrying out an individual project as an
employee. I thankfully remembered them for their patience and support in overcoming
numerous obstacles I have been facing through my Master programme.

In addition, I would like to thank my friends for helping me in various ways. When I had
problems in my implementation stage my friends always provided the guidelines to overcome
them. Without their guidance, the project could not have been successfully completed.

Finally, I must express my very profound gratitude to my mother and to my relations for
providing me with unfailing support and continuous encouragement throughout my years of
study and through the implementation of project and writing this thesis. This accomplishment
would not have been possible without them.

iii
Table of Contents

Declaration................................................................................................................................... i
Abstract .......................................................................................................................................ii
Acknowledgement .....................................................................................................................iii
List of Tables ............................................................................................................................vii
Table of Figures ......................................................................................................................... ix
Chapter 01: Introduction ............................................................................................................. 1
1.1 Project Background ...................................................................................................... 1
1.2 Problem definition ....................................................................................................... 1
1.3 Motivation .................................................................................................................... 2
1.4 Scope & Limitations .................................................................................................... 2
1.5 Objectives .................................................................................................................... 3
1.6 Structure of the Theses ................................................................................................ 3
Chapter 02: Background ............................................................................................................. 5
2.1 Introduction .................................................................................................................. 5
2.2 Current System ............................................................................................................ 5
2.3 Proposed System .......................................................................................................... 6
2.4 Analyses requirements ................................................................................................. 6
2.5 Similar Systems ........................................................................................................... 7
Chapter 03: Analysis and Design ............................................................................................. 11
3.1 Introduction ................................................................................................................ 11
3.2 Analysis of Existing System ...................................................................................... 11
3.3 Analysis of Proposed System .................................................................................... 12
3.4 Requirements Definition ............................................................................................ 12
3.4.1 Functional requirements ............................................................................................... 13
3.4.2 Non-Functional requirements ....................................................................................... 14
3.5 System Design ........................................................................................................... 15
3.6 System Modelling ...................................................................................................... 15
3.6.1 Data Flow Diagram ........................................................................................................ 16
3.6.2 Use Case Diagram.......................................................................................................... 17
3.6.3 Use Case Narratives....................................................................................................... 18
3.6.4 Activity Diagrams........................................................................................................... 20

iv
3.6.5 Entity Diagram ............................................................................................................... 22
Chapter 04: Implementation ..................................................................................................... 23
4.1 Introduction ................................................................................................................ 23
4.2 Implementation Challenges ....................................................................................... 23
4.3 Implementation methodology .................................................................................... 23
4.3.1 The waterfall method .................................................................................................... 24
4.4 Technology used ........................................................................................................ 24
4.4.1 PHP (version 7 or above) .............................................................................................. 24
4.4.2 Laravel Framework (5.5) ............................................................................................... 25
4.4.3 HTML ............................................................................................................................. 27
4.4.4 Java Script ...................................................................................................................... 27
4.4.5 CSS ................................................................................................................................. 28
4.4.6 MySQL ........................................................................................................................... 28
4.4.7 Bootstrap (version 4) ..................................................................................................... 29
4.5 Interface Design ......................................................................................................... 29
Chapter 05: Testing and Evaluation ......................................................................................... 31
5.1 Introduction ................................................................................................................ 31
5.2 Testing stages ............................................................................................................. 31
5.2.1 Unit testing .................................................................................................................... 31
5.2.2 Integration testing ......................................................................................................... 31
5.2.3 Sub-System and System Testing .................................................................................... 31
5.3 Test Plan .................................................................................................................... 32
5.3.1 Process of test plan ....................................................................................................... 32
5.4 Test Cases .................................................................................................................. 33
5.5 Evaluation .................................................................................................................. 33
5.6 Evaluation plan .......................................................................................................... 33
5.7 Evaluation Report ...................................................................................................... 34
Chapter 06: Conclusion ............................................................................................................ 45
6.1 Achievements ............................................................................................................. 45
6.2 Lessons Learnt ........................................................................................................... 45
6.3 Problems Encountered ............................................................................................... 45
6.4 Future Developments ................................................................................................. 46
References ................................................................................................................................ 47
Appendix A: System Documentation ....................................................................................... 48
v
Appendix B: Design Documentation........................................................................................ 54
Appendix C: User Documents .................................................................................................. 59
Appendix D: Report generation ................................................................................................ 67
Appendix E: Test Cases............................................................................................................ 70
Appendix F: Sample Codes ...................................................................................................... 85
Appendix G: User Evaluation .................................................................................................. 93

vi
List of Tables

Table 1: Use case narrative for Manage Users ......................................................................... 18


Table 2:Use case narrative for Manage Products ..................................................................... 18
Table 3: Use case narrative for Manage Product Order ........................................................... 19
Table 4: Test plan ..................................................................................................................... 32
Table 5: Results of Q07 ............................................................................................................ 35
Table 6: Computer ability according to age ............................................................................. 36
Table 7:Ability of use Internet ................................................................................................. 37
Table 8: Use case narrative for Manage Categories ................................................................. 54
Table 9: Use case narrative for Manage Subcategories ............................................................ 54
Table 10:Use case narrative for Generate Reports ................................................................... 55
Table 11: Use case narrative for Mark Attendance .................................................................. 56
Table 12:Use case narrative for Create Bill.............................................................................. 56
Table 13:Use case narrative for Upload Prescription ............................................................... 57
Table 14:Use case narrative for Search products via the web site ........................................... 57
Table 15: Test case - Login01 .................................................................................................. 70
Table 16: Test case - Login 02 ................................................................................................. 71
Table 17: Test case - Login03 .................................................................................................. 71
Table 18: Test case - Login04 .................................................................................................. 72
Table 19: Test case - Category01 ............................................................................................. 73
Table 20: Test case - Category02 ............................................................................................. 73
Table 21: Test case - Subcategory01 ........................................................................................ 74
Table 22: Test case - Subcategory02 ........................................................................................ 75
Table 23: Test case - Employee01 ............................................................................................ 75
Table 24: Test case - Employee02 ............................................................................................ 76
Table 25: Test case - Order01 .................................................................................................. 76
Table 26: Test case - Order02 .................................................................................................. 77
Table 27: Test case - Notification01......................................................................................... 78
Table 28: Test case - CustomerSearch01 ................................................................................. 78
Table 29: Test case - CustomerSearch02 ................................................................................. 79
Table 30: Test case - Search01 ................................................................................................. 79

vii
Table 31: Test case - Search02 ................................................................................................. 80
Table 32: Test case - UploadPrescription01 ............................................................................. 80
Table 33: Test case - UploadPrescription02 ............................................................................. 81
Table 34: Test case - Bill01 ...................................................................................................... 81
Table 35: Test case-Excel01 ..................................................................................................... 82
Table 36: Test case- Excel02 .................................................................................................... 82
Table 37: Test case- Excel03 .................................................................................................... 83

viii
Table of Figures

Figure 1: hhims.org web site ...................................................................................................... 7


Figure 2: ScriptPro Healthcare Solutions ................................................................................... 8
Figure 3: DigitalRX pharmacy management system .................................................................. 9
Figure 4: SPC Sri Lanka ........................................................................................................... 10
Figure 5: Data Flow Diagram (3.6.1)...................................................................................... 16
Figure 6: Use case diagram (3.6.2) ......................................................................................... 17
Figure 7: Activity diagram of Admin ....................................................................................... 20
Figure 8; Activity diagram of the Cashier ................................................................................ 20
Figure 9: Activity diagram of operator ..................................................................................... 21
Figure 10:Activity diagram of Employee ................................................................................. 21
Figure 11: Entity diagram (3.7.4) ............................................................................................ 22
Figure 12: Waterfall method (4.3.1) ........................................................................................ 24
Figure 13: MVC architecture (4.4.2.1) .................................................................................... 25
Figure 14: Home page .............................................................................................................. 29
Figure 15: Product tab .............................................................................................................. 29
Figure 16: System login – Pharmacy staff ............................................................................... 30
Figure 17: Idea of Manual Pharmacy System .......................................................................... 34
Figure 18: Idea of computerized pharmacy system .................................................................. 35
Figure 19: Computer ability of users ........................................................................................ 36
Figure 20: Computer ability according to age .......................................................................... 37
Figure 21: Ability of use Internet ............................................................................................. 38
Figure 22: Typing ability .......................................................................................................... 38
Figure 23: Hardware of knowledge .......................................................................................... 39
Figure 24: Analysis chart of Q11 to q20 .................................................................................. 39
Figure 25: Use friendliness of the system ................................................................................ 40
Figure 26: Analysis of Q12 ...................................................................................................... 40
Figure 27: Analysis of Q13 ...................................................................................................... 41
Figure 28:System functionality ................................................................................................ 41
Figure 29:Error message showing ............................................................................................ 42
Figure 30: User interfaces......................................................................................................... 42

ix
Figure 31: Searching option ..................................................................................................... 43
Figure 32:Report generation of the system............................................................................... 43
Figure 33:Finding stock details ................................................................................................ 44
Figure 34:Affecting of the income ........................................................................................... 44
Figure 35: download XAMPP .................................................................................................. 48
Figure 36: XAMPP download complete .................................................................................. 49
Figure 37: Run XAMPP setup .................................................................................................. 49
Figure 38: XAMPP setup steps ................................................................................................ 50
Figure 39: XAMPP in task bar ................................................................................................. 51
Figure 40: Start services in XAMPP ........................................................................................ 51
Figure 41: Open MySQL Administrator .................................................................................. 51
Figure 42: phpMyAdmin open ................................................................................................. 52
Figure 43: Create new database ................................................................................................ 52
Figure 44: Import database ....................................................................................................... 53
Figure 45: Paste project folder in to htdocs .............................................................................. 53
Figure 46: Admin sidebar ......................................................................................................... 59
Figure 47: System dashboard ................................................................................................... 59
Figure 48: View user ................................................................................................................ 61
Figure 49: Edit user .................................................................................................................. 61
Figure 50: Permissions ............................................................................................................. 62
Figure 51: Category table ......................................................................................................... 62
Figure 52: Admin manage attendance ...................................................................................... 63
Figure 53: Law quantity drug table .......................................................................................... 63
Figure 54: Upload excel form ................................................................................................... 64
Figure 55: Bill........................................................................................................................... 64
Figure 56: Notification ............................................................................................................. 65
Figure 57:Cashier notifications ................................................................................................ 65
Figure 58: Cashier side navbar ................................................................................................. 65
Figure 59:Operator notification ................................................................................................ 66
Figure 60:Operator side navbar ................................................................................................ 66
Figure 61:Employee side navbar .............................................................................................. 66
Figure 62: Low quantity Drug .................................................................................................. 67

x
Figure 63: Low quantity drug pdf ............................................................................................ 67
Figure 64: Highest sold product ............................................................................................... 68
Figure 65:Highest sold product pdf .......................................................................................... 68
Figure 66: Daily income ........................................................................................................... 69
Figure 67: Daily purchase......................................................................................................... 69
Figure 68: Error message - Login2 .......................................................................................... 71
Figure 69:Upload excel success message ................................................................................. 82
Figure 70:Excel file not import error ........................................................................................ 83
Figure 71: Invalid file type ....................................................................................................... 84

xi
Chapter 01: Introduction

1.1 Project Background


Technology plays a major role in different fields and areas that affects all the aspect of human
activities. Therefore, our societies get a lot of benefits from modern technology including the
medical field. The Central Pharmacy is a pharmaceutical store which is situated in Pokunuwita
area. At present, manual system is being utilized in the pharmacy. This usually leads to mistakes
as the workload of the pharmacist increases. Pharmacy management system is designed to
improve accuracy and to enhance safety and efficiency in the pharmacy. It is a computer-based
system which helps not only to the pharmacist but also the customers. The system involves
manual entry upon arrival of new batches of drugs and upon drug movement out of the
pharmacy for a certain period, e.g. every month. It will also give report showing the list of
products expiries after a specified date before the product eventually expires, the movement of
drugs in and out of the pharmacy, the list of stock ending details. The SMS and email facility
is available in the system. The customers can view the stock available details through the system
and they can upload a prescription after creating an account. By logging to the system, they can
view the status of their uploading.

1.2 Problem definition


Pharmacy management of The Central Pharmacy has kept paper record in filing cabinets.
Managing a pharmacy with records on papers will be tedious and difficult to keep track of
inventories with regards to the drugs in the store, expiry date, quantity of drugs available based
on the categories and their functions. The pharmacist has to order drugs to replenish the already
diminishing stock. In addition, ordering of drugs is being carried out manually. Significant
amount of time is allocated for writing the order as the pharmacist needs to go through the stock
balance and make rough estimate of the amount to order based on Figures. Drugs are not
supposed to be used after they have expired.

In addition, the pharmacist has to manage employees and their details such as their personal
information, employment details, and attendance manually.

In the aspect of customer, they need to physically be in pharmacy to purchase medicines and
finding the relevant medicine according to prescription is a time-consuming task.

1
1.3 Motivation
The automated pharmacy management system can be used for the sake of ensuring effective
and clear data saving and manipulating as well as neat work on the pharmacy medical products.
Highly minimize time and resource by which, searching the medicine data, can get the data in
quickest time. And almost the resources are wise used since most actions are done on the
pharmacy system. Some of the resources minimized include paper, manpower and related thing.
The other thing is for storing data's in secure way.

A summarized list of drugs dispensed to patient can be viewed for monitoring purposes. Also,
PMS will be able to generate report on the list of drugs dispensed in the polyclinic for the given
time period. And there is a message alert for the user if the stock holding quantity reaches a low
level. Thus, the pharmacist will need to replenish the drugs.

1.4 Scope & Limitations


The scope of this project is limited to the activities of the Central Pharmacy which includes will
improving health outcomes, enhance access and care in the surrounding communities and
ensuring best use of resources, the use of a computer based management system for improving
the efficiency of a pharmacy is needed and it is an essential part of any modern continuously
evolving society.

Because now a day’s Information and communication technology (ICT) plays a great role in
different fields or areas including the Health care systems. 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.

The system will not be able to handle drug to drug interaction, contraindication and
polypharmacy in a prescription; this implies that these services will be manually completed by
the pharmacist.

2
1.5 Objectives
Pharmacy management system is a user-friendly application which reduces the burden and
helps to manage all sections of pharmacy like medicine management and billing etc., which
improve the processing efficiency.

The aim of this project is to develop a user-friendly application for the effective management
of The Central Pharmacy which reduces the burden and helps to manage all sections of
pharmacy like medicine, store and billing etc. It will be able to achieve the following objectives:

• Ensuring effective policing by providing statistics of the products in stock.

• Maintaining correct database by providing an option to update the products in stock.

• Improving the efficiency of the system by ensuring effective monitoring of services


and activities.

• To provide optimal drug inventory management by monitoring the drug movement in


the pharmacy.

• To display Relevant messages of stock which are ending soon, expiry dates.

• To ensure that there exists a level of restricted access based on functionality and role.

• To ensure that the system is user friendly.

• To be able to generate various reports according to the requirements.

• Fast searching of medicine.

• The automating tasks of maintaining of bills.

• Customer can search the availability of a particular product by viewing the website.

• To manage employee records.

1.6 Structure of the Theses


The chapter layout of this project is outlined in a sequential manner starting with Chapter one
which consists of the Introduction, Motivation, Statement of the problem, Aims and objectives,
Scope, Limitation, and Structure of the thesis.

Chapter two consist of background, brief descriptions of current system and proposed system,
methods of gathering requirements, similar systems, tools and technologies that going to be
used for the proposed system.

3
Chapter three deals with the analysis of the existing system under which description of the
current system will be analyzed, problems of existing system, description of the proposed
system and the advantages of the proposed system, system design and model diagrams.

Chapter four consists of implementation details, methodology use to develop the project,
technology use, interface designs and some codes.

Chapter five describes about the importance of testing and test methods. Furthermore, it
includes the test plan and test cases which are going to be tested. The results of the test cases
may also include here.

Chapter six of this thesis has the information about project evaluation part. It mentions the
importance of the evaluation for a project.

Chapter seven consists of conclusion of the project. It describes project achievements within
the given time period, problems encounter when doing the project individually within short
period of time and future enhancements for increase the quality of the project

4
Chapter 02: Background

2.1 Introduction
Due to the size and quality service of the pharmacy, the pharmacy has a large customer base.
These customers tend to visit the pharmacy for services mostly when they close from work. At
this period, the number of customers that patronize the pharmacy is on the increase, thereby
making the workload of the pharmacists much more tedious. This case makes it difficult for the
pharmacist to attend to customers in a short period. Meanwhile the pharmacist has to ensure
satisfaction in services to keep their customers. The factors mentioned above, results in delay
of the services being rendered to the customers, thereby slowing down sales and risk losing
valuable customers in the long run.

2.2 Current System


At present, manual system is being utilized in The Central Pharmacy. It requires the pharmacist
to manually monitor each drug that is available in the pharmacy. Pharmacy management has
kept paper record in filing cabinets. Managing a very large pharmacy with records on papers
will be tedious and difficult to keep track of inventories with regards to the drugs in the store,
expiry date, quantity of drugs available based on the categories. This system also ensures that
there exists a level of restricted access based on functionality and role. This system also
provides optimal drug inventory management by monitoring the drug movement in the
pharmacy. Significant amount of time is allocated for writing the order as the pharmacist needs
to go through the stock balance and make rough estimate of the amount to order based on
Figures. There is no billing facility. Every calculation is done manually. Employee details such
as personal details, attendance, type of role is also done manually.

This implies that these services are manually completed by the pharmacist. This usually leads
to mistakes as the workload of the pharmacist increases. It is hard to do with large number of
employees.

5
2.3 Proposed System
The proposed project named “Pharmacy Management System”, is a client/server based
application.

An interactive application for managing stock, billing, manage employees, generate reports etc.
It helps in maintaining the records of medicine, the users and store details and also reduce the
work of searching the records of the medicine. The main aim of this application is applying
technology to reduce the human effort.

The project has been developed based on “Stock managing” and its “billing process” being
presently used in the medical stores for storing and retrieving the available information in the
store.

The user must get his username and password from the admin by providing the name, address,
phone no, id proof. And can get the access to the application. Without the username and
password, he cannot get access to the application.

Admin has almost all the permission to work with. The stock manager has permissions that less
than the admin. Cashier has the permission of handling of billing. Every user has permission of
mark their attendance and edit their profile data.

Anybody including the customer can search the availability of particular product through the
system. It is good for the customers who don’t want to waste their valuable time in queues for
non-stock items. Customer can upload a prescription to the system after creating a customer-
user account. Pharmacy users need to check the relevant details of the prescription and update
the state. Customer can see it by logging to their account.

The reports can be generated through the system. After generated relevant report it can be
download as a PDF or an Excel document.

Can insert data to the database directly, by uploading excel or csv.

SMS and email is available in the proposed system.

2.4 Analyses requirements


Collecting fact is the act of getting and gathering information from various sources in order to
be able to compose the project. Data used for designing of the system were gathered through
several means. Therefore, the method used in the design and collections of information from
various sources are as follows:

6
• Studying the current manual system in detail and the organizational style.
• Knowing and understanding the input and output processes of the existing system.
• Held meetings with the manager of the Central Pharmacy to know the equipment
needed, and the mode of operation of the old system.
• Make discussions with the current employees in the pharmacy and collect their opinions
abut the existing system they are working.
• And also discuss with the people who are living in this area about their problems when
going to buy something from the pharmacy.

• Collecting and analyzing existing materials on the project topic, written by different
experts.

• Analyzing the similar systems through the internet.

2.5 Similar Systems

• HHIMS.org

Figure 1: hhims.org web site

HHIMS [1] is a Free and Open Source Hospital Health Information Management System
designed for use in Sri Lanka government hospitals by ICTA (Information and
Communication Technology Agency of Sri Lanka). It includes a patient record system, a

7
pharmacy management system and a laboratory information system. This system is
designed to replace paper records.

There are many functionalities for this system in addition to pharmacy management such
as patient management, clinic management, consultation, laboratory information
management. This may not suitable for the Central Pharmacy Management System because
it contains more additional functionalities like above. PMS for Central pharmacy has been
developed for focusing on pharmacy functions management. But also, it has similarities
such as drug maintenance, reports, notifications and logs.

• ScriptPro

Figure 2: ScriptPro Healthcare Solutions

ScriptPro [2] is a technology company founded in 1994. Corporate headquarters are in the
Kansas City area. ScriptPro's SP Central Pharmacy Management System allows a
pharmacy to process, track, and dispense all prescriptions with the highest level of security,
accuracy, and efficiency. Followings are some key features of it:
• Barcode driven workflow tools to manage high volumes of dispensing and promote
safety at every step of the dispensing process
• Industry-leading drug database including visual drug verifications to minimize
dispensing errors

8
• Inventory management controls to efficiently manage pharmacy inventory and
minimize out-of-stock items
• Pharmacy reporting engine for monitoring financial and key performance indicators

ScriptPro pharmacy management system has some same functionalities with implemented PMS
such as stock maintenance, out of stock management, report generating. And it has more
additional functions rather than ScriptPro system such as upload prescriptions, search product
availability on web, employee management.

• DigitalRX – Pharmacy Management System

Figure 3: DigitalRX pharmacy management system

It is an online pharmacy management system. The system will pre-load all physicians and
drugs databases. It consists of many functionalities like mobile delivery, advanced search,
notification system, add/edit prescriber from database, windows-based software, online
billing, inventory control/re-order, various reports.

It has so many features to manage pharmacy operation. So, it is not suitable for medium
size pharmacy. The implemented software has more additional functionalities such as
prescription uploading facility for the customers, search product availability in stores,
employee attendance management facility. Online billing facility is not including the
implemented system but in the DigitalRX [3] system.

9
• State Pharmaceuticals Corporation (SPC)

SPC [4] has the facility to search product details such as price, supplier and description for
the customers via their website. Implemented PMS also has this feature including quantity
available detail too. It’s an extra advantage in the PMS for customers to check the
availability of a product before coming to the pharmacy. PMS can search product by its
name or a product id, SPC system can search product only by name. Various reports can
be generated in both systems.

Figure 4: SPC Sri Lanka

10
Chapter 03: Analysis and Design

3.1 Introduction
System is a collection of an interrelated components that works together to achieve a purpose.
System analysis is referred to the systematic examination or detailed study of a system in order
to identify problems of the system, and using the information gathered in the analysis stage to
recommend improvements or solution to the system. System design is an abstract representation
of a system component and their relationship and which describe the aggregated functionality
and performance of the system. System design is also the overall plan or blueprint for how to
obtain answer to the question being asked. The design specifies which of the various type of
approach.

3.2 Analysis of Existing System


Before analyses the design of the proposed system, need to carefully highlight the problems of
the existing system so as to avoid recurrence. This analysis serves as a pointer on how to embark
on building the proposed system. The problems of the current system should be outlined.

Followings are some of the problems associated with the existing system;

• Significant amount of time is allocated for writing the order as the pharmacist needs
to go through the stock balance and make rough estimate for the amount to order
based on Figures.

• The state of drugs in stock is manually checked.

• Mistake of selling expired drugs to customers.

• Too much workload on employees

• Filing cabinet in the pharmacy with paper record.

• Employee records are handled manually by the manager.

• Billing function is done manually, so the probability of occurring errors is high.

11
3.3 Analysis of Proposed System

The proposed system shall focus on;

• Users of the system having access to the proposed system.


• Can control user operations. (Different permissions for different users)
• Ensuring effective policing by providing statistics of the drugs in stock.
• Improving the efficiency of the system by ensuring effective monitoring of services and
activities.
• Generating report according to a purpose.
• Download reports as PDF or Excel type.
• Reducing the employees’ workload.
• Efficiently handle the billing system.
• Convenience of recording employee details in an efficient manner.
• Customer can search stock available details of particular product.
• Customer can upload prescription to the system after registering only.

3.4 Requirements Definition


Preliminary investigation plays an important role in developing a satisfactory requirement. Its’
as a result of thorough investigation of how the current or the

existing system works using the facts gathered at the preliminary investigation that leads to
focusing on the possibility of replacing the existing system or improving upon the existing
system. This task involves information gathering.

12
3.4.1 Functional requirements

Generate reports:

The pharmacy management system generates reports according to the purpose.

• Report on Medicines, products, companies, sells, inventory according to the time


period, weekly, monthly, annually
• Income of the pharmacy (daily, monthly, annual)
• Employee details
• Attendance of every employees
• The reports can be downloaded as a Pdf or Excel file.

Store the necessary information of the products:

The PMS (Pharmacy Management System), stores the detail information about each product
including the medicine. Since the information for each drug were required in some cases like
the use of drugs, when use drugs and for whom is given.

User can import data to the database by using an excel or csv file. It is an additional advantage
for the users, because it helps to insert large number of records at once to a table. Then time
and effort of the user may save.

Searching facility:

This facility is provided for all including the customers. The PMS has easily searching of
product, the behavior of the medicine, quantity remain etc. The searching process is based on
the name of the given data or the “id” of the item.

Billing facility:

In this system, automated billing facility is provided. It can calculate total price automatically
when entering the quantity of the product and “id”. It’s very accurate rather than manual
calculations.

Upload prescription:

The customer can upload a prescription after register with the system. He can view his
prescription status by logging to his profile. It will help to reduce waiting times in queues.

13
3.4.2 Non-Functional requirements

Portability:

Portability specifies the ease with which the software can be installed on all necessary
platforms, and the platforms on which it is expected to run.

Reliability:

Reliability specifies the capability of the software to maintain its performance over time.
Unreliable software fails frequently, and certain tasks are more sensitive to failure (for example,
because they cannot be restarted, or because they must be run at a certain time).

Availability:

A system's availability, or "uptime," is the amount of time that it is operational and available
for use. This is specified because some systems are designed with expected downtime for
activities like database upgrades and backups.

Robustness:

A robust system is able to handle error conditions gracefully, without failure. This includes a
tolerance of invalid data, software defects, and unexpected operating conditions.

Scalability:

Software that is scalable has the ability to handle a wide variety of system configuration sizes.
The nonfunctional requirements should specify the ways in which the system may be expected
to scale up (by increasing hardware capacity, adding machines, etc.).

Usability:

Ease-of-use requirements address the factors that constitute the capacity of the software to be
understood, learned, and used by its intended users.

Efficiency:

Specifies how well the software utilizes scarce resources: CPU cycles, disk space, memory,
bandwidth, etc.

14
3.5 System Design
System design is the process of defining the architecture, components, modules, interfaces, and
data for a system to satisfy specified requirements through system modeling. One could see it
as the application of systems theory to produce development. The design of the system should
be user friendly. It is designed in such a way that employees will be able to navigate easily
through the information supplied on the system. In other words, system design consists of
design activities that produce system specifications satisfying the functional requirements that
were developed in the system analysis process. System design specifies how the system will
accomplish. System design is the structural implementation of the system analysis.

3.6 System Modelling


During the system requirements and design activity, systems may be modelled as a set of
components and relationships between these components. These are normally illustrated
graphically in a system architecture model that gives the reader an overview of the system
organization. System modelling helps to give more detailed system specifications which are in
form of graphical representations that can describe problem to be solved or the system that is
to be developed. Because of the graphical representations used, models are often more
understandable than detailed natural language description of the system requirements.

15
3.6.1 Data Flow Diagram

Figure 5: Data Flow Diagram (3.6.1)

16
3.6.2 Use Case Diagram

Figure 6: Use case diagram (3.6.2)

17
3.6.3 Use Case Narratives
Followings are the use case narratives for use cases in the system. (Appendix B)
Table 1: Use case narrative for Manage Users

Use Case ID UID01


Name Manage Users
Actors Admin
Description Administrator can create new user, delete user or update user
details via ‘User Management’ interface
Pre-Conditions Login as administrator
Successful 1. Login to the system
Completion 2. Go to User Management in side navigation
3. Then go to Users
4. System will display user detail table
5. Select the relevant action (create, edit, delete user)
6. System will show the relevant form.
7. Fill the required fields
8. Click submit button
9. If success action, system will not show error message
Alternatives 8 a) If the form submits with empty field it is shown error
message
Post-Conditions Information will be saved to the database

Table 2:Use case narrative for Manage Products

Use Case ID UID02


Name Manage Products
Actors Admin, Data Entry Operator
Description Administrator and data entry operator can create new product,
delete product or update product details via ‘Product
Management’ interface
Pre-Conditions Login as administrator or Operator
Successful 1. Login to the system
Completion 2. Go to Product Management in side navigation

18
3. Then go to Product
4. System will display product detail table
5. Select the relevant action (create, edit, delete product)
6. System will show the relevant form.
7. Fill the required fields
8. Click submit button
9. If success action, system will not show error message
Alternatives 8 a) If the form submits with empty field it is shown error
message
Post-Conditions Information will be saved to the database

Table 3: Use case narrative for Manage Product Order


Use Case ID UID03
Name Manage Product Order
Actors Admin, Data Entry Operator
Description Administrator and data entry operator can create, delete or
update product_order details via ‘Product Order Management’
interface
Pre-Conditions Login as administrator or Operator
Successful 1. Login to the system
Completion 2. Go to Product Management in side navigation
3. Then go to Product Orders
4. System will display product order detail table
5. Select the relevant action (create, edit, delete product
order)
6. System will show the relevant form.
7. Fill the required fields
8. Click submit button
9. If success action, system will not show error message
Alternatives 8 a) If the form order submits with empty field it is shown
error message

19
3.6.4 Activity Diagrams

Activity diagram of Admin

Figure 7: Activity diagram of Admin

Activity diagram of the Cashier

Figure 8; Activity diagram of the Cashier

20
Activity diagram of Data operator

Figure 9: Activity diagram of operator

Activity diagram of Employee

Figure 10:Activity diagram of Employee

21
3.6.5 Entity Diagram

Figure 11: Entity diagram (3.7.4)

22
Chapter 04: Implementation

4.1 Introduction
This chapter focuses on the implementation part of the Pharmacy management system. The act
of transforming the detailed design which mentioned in the design chapter, into a valid program
in some programming language, together with all its supporting activities is referred to as
implementation. The ultimate goal of most software projects is to produce a working program.
There are some challenges faced by the developers while implementing the software.

4.2 Implementation Challenges

Code-reuse: Programming interfaces of present-day languages are very sophisticated and are
equipped huge library functions. Still, to bring the cost down of end product, the organization
management prefers to re-use the code, which was created earlier for some other software.
There are huge issues faced by programmers for compatibility checks and deciding how much
code to re-use.

Version Management: Every time a new software is issued to the customer, developers have
to maintain version and configuration related documentation. This documentation needs to be
highly accurate and available on time.

Target-Host: The software program, which is being developed in the organization, needs to be
designed for host machines at the customers end. But at times, it is impossible to design a
software that works on the target machines.

4.3 Implementation methodology


For implement of this project I have used waterfall method which is a sequential model, used
to create different kinds of software, where project development is seen as flowing steadily
downwards (like a waterfall) through the phases of software development requirements
analysis, UI design, software implementation, project verification, and software maintenance.

23
4.3.1 The waterfall method

Figure 12: Waterfall method (4.3.1)

The diagram above is a system development life cycle that illustrates how the design of the
project is broken down into five different phases, which are Project Planning, Requirement
Gathering, Project Implementation and Interface Design, Implementation and System Testing,
Maintenance and System Upgrading. The proposed Pharmacy Management System for The
Central Pharmacy starts with project planning by determining the users of the system, aims and
objectives of the project. After these, extensive research has done to determine how to design
an effective system, as well as to review the current system. Then, the design is with an initial
prototype of the system, and then refined it based on their suggestions. Phases of analysis,
design and implementation are performed iteratively until users and designers agreed on a final
system specification. At this point, the project could move to the final implementation phase.

4.4 Technology used

4.4.1 PHP (version 7 or above)

PHP is a powerful server – side scripting language designed for creating dynamic and
interactive websites. It is perfectly suited for web development and can be embedded directly
into the HTML code. It can be deployed on most web servers and on almost every operating
system and platform free of charge.

24
Server support

PHP generally runs on a web server like apache.

Database support

PHP supports many databases like MySQL, Oracle, Solid, PostgreSQL, etc. Most popular used
is MySQL.

4.4.2 Laravel Framework (5.5)


Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for
the development of web applications following the ‘model–view–controller’ (MVC)
architectural pattern. Laravel framework is powered with many outs of the box features
including view templating, built in authentication, routing, database access, file management,
caching, etc. [5]

4.4.2.1 MVC architecture

Figure 13: MVC architecture (4.4.2.1)

MVC represents Model, View, Controller. This methodology typically splits the architecture of
the website into 3 distinct parts which are kept operationally separate but interact with each
other to deliver all aspects of the website and the administration system. The main aim of the
MVC architecture is to separate the business logic and application data from the presentation
data to the user. Adhering to MVC architecture benefits you in attaining a perfect design for an
enterprise web application.

25
The Model

The model is responsible for managing the data of the application. It responds to the request
from the view and it also responds to instructions from the controller to update itself.

The View

It means presentation of data in a particular format, triggered by a controller's decision to


present the data. They are script-based templating systems like JSP, ASP, PHP and very easy
to integrate with AJAX technology.

The Controller

The controller is responsible for responding to the user input and perform interactions on the
data model objects. The controller receives the input, it validates the input and then performs
the business operation that modifies the state of the data model.

4.4.2.2 Laravel Features

Database Access

Database migrations enable you to easily design and modify a database in a platform-
independent way. The migrations can then be run against any of the database types that Laravel
supports (MySQL, PostgreSQL, MSSQL, and SQLite). Laravel’s Active Record
implementation is called Eloquent. Interacting with a database in an object-oriented way is the
modern standard. With Eloquent, we can create, retrieve, update, and delete the database
records without needing to write a single line of SQL. In addition to this, Eloquent provides
powerful relationship management and it can even handle pagination automatically.

Command Line Tool

Laravel also ships with a command-line interface tool called Artisan. With Artisan, a developer
can interact with their application to trigger actions such as running database migrations,
executing unit tests, and schedule a job. Another beauty of Artisan is that, it is completely
extensible so that can add a new command to perform any type of functionality that we’d like.

Routing

Laravel allows to organize all website URLs through routers. If we want to change the link of
some website or API, we need to change it at one file and the website should work as expected.

26
View Template Engine

The Blade templating engine cleans up views by providing aesthetically pleasing replacements
for inline PHP and by including powerful new features.

Job Scheduling

Introduced in Laravel 5.0, is an addition to the Artisan that allows programmatic scheduling of
periodically executed tasks. Internally, Scheduler relies on the cron daemon to run a single
Artisan job that, in turn, executes the configured tasks.

File System

There is a file system abstraction layer that allows local file systems and cloud-based storage
services provided by Amazon S3 and Rackspace Cloud to be used transparently and in the same
way.

4.4.3 HTML

Hypertext Markup Language (HTML) is the standard markup language for creating web pages
and web applications.

HTML consists of a series of short codes typed into a text-file by the site author — these are
the tags. The text is then saved as a html file, and viewed through a browser, like Internet
Explorer or Netscape Navigator. This browser reads the file and translates the text into a visible
form, hopefully rendering the page as the author had intended. Writing your own HTML entails
using tags correctly to create your vision. You can use anything from a rudimentary text-editor
to a powerful graphical editor to create HTML pages.

The purpose of 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.

4.4.4 Java Script


“JavaScript is a dynamic computer programming language. It is lightweight and most
commonly used as a part of web pages, whose implementations allow client-side script to
interact with the user and make dynamic pages. It is an interpreted programming language with
object-oriented capabilities.”

27
4.4.5 CSS
“Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to
simplify the process of making web pages presentable.

CSS handles the look and feel part of a web page. Using CSS, you can control the color of the
text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out,
what background images or colors are used, layout designs, variations in display for different
devices and screen sizes as well as a variety of other effects.”

4.4.6 MySQL
“MySQL is a freely available open source Relational Database Management System (RDBMS)
that uses Structured Query Language (SQL). SQL is the most popular language for adding,
accessing and managing content in a database. It is most noted for its quick processing, proven
reliability, ease and flexibility of use.”

Reasons for use MySQL,

• MySQL is released under an open-source license. So, you have nothing to pay to
use it.
• MySQL is a very powerful program in its own right. It handles a large subset of the
functionality of the most expensive and powerful database packages.
• MySQL uses a standard form of the well-known SQL data language.
• MySQL works on many operating systems and with many languages including
PHP, PERL, C, C++, JAVA, etc.
• MySQL works very quickly and works well even with large data sets.
• MySQL is very friendly to PHP, the most appreciated language for web
development.
• MySQL supports large databases, up to 50 million rows or more in a table. The
default file size limit for a table is 4GB, but you can increase this (if your operating
system can handle it) to a theoretical limit of 8 million terabytes (TB).
• MySQL is customizable. The open-source GPL license allows programmers to
modify the MySQL software to fit their own specific environments.

28
4.4.7 Bootstrap (version 4)
“Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly
prototype your ideas or build your entire app with our Sass variables and mixins, responsive
grid system, extensive prebuilt components, and powerful plugins built on jQuery.”

4.5 Interface Design

Figure 14: Home page

Customer can search products in the pharmacy by using the given search bar in
“Home/ Product”

Figure 15: Product tab


29
Figure 16: System login – Pharmacy staff

The system mainly has four user roles.

• Administrator
• Cashier
• Data entry operator
• Other employee

Admin can handle user permissions. System accessibility is changed according to their user
role. They are given different user names and passwords to log in to the system.

Other than that, the customer has another login.

(See Appendix C)

30
Chapter 05: Testing and Evaluation

5.1 Introduction
Software testing is a process that ensures the quality of the product to its stakeholders with
information about the quality of the product or service under test.

The testing process has two goals

• To demonstrate to the developer and the customer that the software meets its
requirements.

• To discover situations in which the behavior of the software is incorrect, undesirable,


or does not conform to its specification.

5.2 Testing stages

5.2.1 Unit testing


This is a type of testing which is done by software developers in which the smallest testable
module of an application - like functions, procedures or interfaces - are tested to ascertain if
they are fit to use.

5.2.2 Integration testing


This involves testing how well the various modules and components are integrated within the
developed software. The integration is checked both ways that is top-down as well as bottom-
up, so as to bring out the design, construction and architectural defects in the software. It’s at
this stage that most of the basic design flaws of the software will become obvious. The various
interfaces will also be tested for defects at this stage.

5.2.3 Sub-System and System Testing


This stage focuses on validating and analyzing that the software and all its sub-systems comply
with the requirements as specified by the client. It’s at this stage the software is tested as a
whole.

31
5.3 Test Plan
The software test plan is designed to prescribe the scope, approach, resources and schedule of
testing activities. The plan identifies items to be tested, features to be tested, the types of testing
to be performed and schedule required to complete testing.

5.3.1 Process of test plan


• Identify the requirements to be tested.

• Identify the expected results for each test.

• Perform the test.

• Note down the test data, test cases used during the testing process.

Table 4: Test plan

Test Area Test Cases Status


1. Login Login01 True

Login02 True

Login03 True

Login04 True
2. Add Category details Category01 True

Category02 True

3. Add Subcategory details Subcategory01 True

Subcategory02 True

4. Add Employee details Employee01 True

Employee02 True
5. Add Order details Order01 True

Order02

32
6. Notification Notification01 True

7. Customer Search CustomerSearch01 True


CustomerSearch02 True
8. Search Search01 True

Search02 True
9. Upload Prescription UploadPrescription01 True

UploadPrescription02 True
10. Bill Bill01 True

11. Upload Excel/Csv sheet Excel01 True

Excel02 True

Excel03 True

Excel04

5.4 Test Cases


(See Appendix E)

5.5 Evaluation

Evaluation is a process that critically examines a programme. It involves collecting and


analyzing information about a program’s activities, characteristics and outcomes. Its purpose is
to make judgments about a programme, to improve its effectiveness, and/or to inform
programming decisions (Patton, 1987).

5.6 Evaluation plan


To have a successful evaluation of the project, it is essential to apply correct methodology.
There are several methods of perform an evaluation. For this project I have used a questioner
to gather user evaluation of this system. The system has two types of basic users, customers and

33
the pharmacy staff members. The system was demonstrated to the system users and their
feedback was gathered using the following questionnaire. This questionnaire is focused on few
key areas, concept, performance, functionality, interfaces and usefulness of the system.

(The questionnaire – Appendix G)

5.7 Evaluation Report

Analysis of Q1 to Q4.

Idea of manually handled system on point of customers view.

Result - It’s very clearly shown that the customers do not have good intention of manually
handled system.

Idea of Manually Handeld Pharmacy System


8

5
count

0
Q1 Q2 Q3 Q4
Question number

V. Poor Poor Fair Good V.Good

Figure 17: Idea of Manual Pharmacy System

Analysis of Q05 & Q06.


Idea of the computerized pharmacy management system.
Result - Most of them like to have a computerize PMS.

34
Idea about computerized pharmcy system
7

4
Count

0
Q05 Q06
Question Number

Strongly disagree Disagree Neither agree nor disagree Agree Strongly agree

Figure 18: Idea of computerized pharmacy system

Analysis of Q07
Result - Computer knowledge of the system users is positive.
Table 5: Results of Q07

Count

Never 0

Seldom 1

2 to 4 times a month 2

Weekly 5

Daily 2

Total 10

35
How Often Do The Pharmacy Employees Use The
Computer?

10%
20%

20%

50%

Never Seldom 2 to 4 times a month Weekly Daily

Figure 19: Computer ability of users

Computer ability of employees according to their age.


Result – The age of using computer mostly is 20 -40.
Table 6: Computer ability according to age

20 - 30 31 - 40 41 - 50 51 - 60 Total

Never 0

Seldom 1 1

2 to 4 times a month 1 1 2

Weekly 3 2 5

Daily 1 1 2

Total 3 4 2 1 10

36
Computer ability of employees according to age

20 - 30 31 - 40 41 - 50 51 - 60
4

3
No of employees

0
Never Seldom 2 to 4 times a month Weekly Daily

Computer usage

Figure 20: Computer ability according to age

How often do the pharmacy employees use the Internet?


Result –Everybody use the internet at least one time. Most people use the it daily or weekly.
There is one seldom user here.

Table 7:Ability of use Internet

Count

Never 0

Seldom 1

2 to 4 times a month 0

Weekly 4

Daily 5

37
Ability To Use Internet

0%
10%
0%

50%

40%

Never Seldom 2 to 4 times a month Weekly Daily

Figure 21: Ability of use Internet

Keyboard typing ability of pharmacy employees?

Result – Most of them have good typing ability. No one is bad for use key board.

Ability To Usekeyboard

0%
10%

30%

60%

Very bad Bad Average Good Very Good

Figure 22: Typing ability

38
Hardware knowledge of employees.

Result -Overall knowledge of computer hardware is good of the employees.

Hardware Knowledge

0%
10%

40%

50%

Very bad Bad Average Good Very Good

Figure 23: Hardware of knowledge

Analysis of Q11 to Q20 about the system.


Result – Overall feedback of the system is good.

5
count

0
Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20
Questions

Strongly disagree Disagree Neither agree nor disagree Agree Strongly agree

Figure 24: Analysis chart of Q11 to q20

39
User friendliness of whole system
Result – The system is user friendly according to the results.
Disagree
Strongly disagree 0% Average
0% 0%

Strongly agree
30%

Agree
70%

Figure 25: Use friendliness of the system

Q12.It is easy to work with computerized system rather than manual system
Result – Most of are agree with the easiness of the computerized system and few of them have
average idea of it.
Strongly disagree Disagree
0% 0%

Average
9%

Strongly agree
27%

Agree
64%

Figure 26: Analysis of Q12

40
Q13. Can work with the system without any others help
Result – Working with the system is easy for most of them without any help. 20% of them need
some guide or help.
Strongly disagree Disagree
0% 0%

Average
Strongly agree 20%
20%

Agree
60%

Figure 27: Analysis of Q13

Q14. System functionalities are easy to understand.


Result – System functionalities are well understood.
Strongly disagree Disagree
0% 0%

Strongly Average
agree 10%
10%

Agree
80%

Figure 28:System functionality

41
Q15. System provided relevant error messages when needed
Result – Showing error messages when needed is good in the system.
Strongly agree Strongly disagree Disagree
0% 0% 0%

Average
20%

Agree
80%

Figure 29:Error message showing

Q16. Interface design is user friendly


Result – The system has user friendly interfaces.
Strongly Disagree Average
disagree 0% 0%
0%

Strongly agree
20%

Agree
80%

Figure 30: User interfaces

42
Q17. Can quickly search products

Strongly disagree Disagree


0% 0%

Average
10%
Strongly agree
20%

Agree
70%

Figure 31: Searching option

Q18. Report generation is easy to handle

Strongly disagree Disagree Average


0% 0% 0%

Agree
40%

Strongly agree
60%

Figure 32:Report generation of the system

43
Q19. Easy to find stock details quickly

Strongly Disagree Average


disagree 0% 0%
0%

Strongly agree Agree


50% 50%

Figure 33:Finding stock details

Q20. Pharmacy income will increase

Strongly disagree Disagree


0% 0%

Strongly agree
Average
20%
30%

Agree
50%

Figure 34:Affecting of the income

44
Chapter 06: Conclusion

6.1 Achievements
Today management is one of the most essential features of all form. Management provides
sophistication 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. The primary aim
of is to improve accuracy and enhance safety and efficiency in the pharmaceutical store. In this
system the pharmacist can manage stock details accurately and efficient manner without using
papers. And also administrator will get notifications about expiry dates about medicine and out
of stock details for a particular drug. System will automatically generate the bill for particular
transaction. Every employee work in the pharmacy can mark their attendance by logging to the
system. Customers can check the availability of a medicine or item before coming to the
pharmaceutical store. User friendly interfaces are uses in this system, so the staff of the
pharmacy can easily work with them.

6.2 Lessons Learnt


The basic achievement of doing this project is, can improve my programming knowledge. The
reason of selecting Laravel is, to learn new technology for developing the web based systems.
Because it is valuable for my career life and also help to increase the value of the degree. So
the total part of project can be mentioned as a big lesson learnt as a learner of Laravel.

How to deal with people, how to write reports are some other things that learnt.

6.3 Problems Encountered


• Difficult to learn new technologies within the given short period of time

As I said earlier, every and each simple thing regarding the framework had to learn. Within the
given time period it was difficult to do.

• Continuous communication with the client

It is difficult to maintain continuous communication with the client. Because we both are
busy with our careers and sometimes he had migrated when I tried to contact him.

45
6.4 Future Developments
The pharmacy industry is unfavorably affected by a wide range of problems such as serious
social conflicts on miss-use of drugs, quality issues and government initiatives on drugs.
Quality issues have a prominent effect on pharmaceutical trade.

Suggestions for further development also include the expansion of the functionalities and
techniques in order to address competitiveness of the current system.

• Develop mobile application for the system


• Integrate payment gateway to purchase directly by paying online rather than cash on
delivery method.
• Generate more reports
• Online ordering facility

46
References

[1] HHIMS.org, 2005. [Online]. Available: http://www.hhims.org/.

[2] ScriptPro, "ScriptPro Pharmacy Management Software," ScriptPro, [Online]. Available:


https://www.scriptpro.com/Products/Pharmacy-Management-Software/.

[3] Digital-RX, "Digitalrx: Pharmacy Management System," Digital Business Solutions,


[Online]. Available: http://www.digital-rx.com/Home/digitalrx.

[4] S. P. C. Sri Lanka, "State Pharmaceuticals Corporation of Sri Lanka," State


Pharmaceuticals Corporation of Sri Lanka, [Online]. Available:
http://www.spc.lk/index.php.

47
Appendix A: System Documentation

The system documentation includes the necessary hardware and software requirements to run
the system accurately. It provides step by step guidance to how to install the system properly.
Follow the steps according to the given order in the following images.

Step1: Install the XAMPP server

2
Figure 35: download XAMPP

1: Go to https://www.apachefriends.org/download.html site.

2: Download latest version of XAMPP for windows.

3: Downloading XAMPP

4: Downloaded successfully. Then open the setup.

48
3
4

Figure 36: XAMPP download complete

5: Run the setup.

Figure 37: Run XAMPP setup

49
7
6

8 9

10

Figure 38: XAMPP setup steps

6: Select components

7: Select location to install and go next. (Better to keep its default position in C:/)

8,9: Running the setup

10: Finished. Installation completed. Now you can start the XAMPP server.

50
Step2: Import the Database

11: To start double click on XAMPP icon on the task bar.

11
Figure 39: XAMPP in task bar

12

Figure 40: Start services in XAMPP

12: Start the services


13: After starts it looks green.
14: Now go to MySQL Admin

13 14

Figure 41: Open MySQL Administrator

51
15

Figure 42: phpMyAdmin open

15: To create a new database click on new button.

16

Figure 43: Create new database

16: Type Database name as “pms” and click create.


17: Go to ‘import’ and choose database file (pms.sql) from your computer. Then click ‘Go’
button on the bottom of the page.

52
17

Figure 44: Import database

Step3: Place the project folder

18: Go to “C:\xampp\htdocs“ and paste your project folder.

Figure 45: Paste project folder in to htdocs

Step4: Run the project in your browser

19: Go to your web browser and type http://127.0.0.1/pms/ or http://localhost/pms/

53
Appendix B: Design Documentation

Use case Narratives

Table 8: Use case narrative for Manage Categories

Use Case ID UID04


Name Manage Categories
Actors Admin, Data Entry Operator
Description Administrator and data entry operator can create, delete or
update category details via ‘Category Management’ interface
Pre-Conditions Login as administrator or Operator
Successful 1. Login to the system
Completion 2. Go to Product Management in side navigation
3. Then go to Categories
4. System will display category detail table
5. Select the relevant action (create, edit, delete category)
6. System will show the relevant form.
7. Fill the required fields
8. Click submit button
9. If success action, system will not show error message
Alternatives 8 a) If the form submits with empty field it is shown error
message

Table 9: Use case narrative for Manage Subcategories

Use Case ID UID05


Name Manage Subcategories
Actors Admin, Data Entry Operator
Description Administrator and data entry operator can create, delete or
update subcategory details via ‘Subcategories Management’
interface

54
Pre-Conditions Login as administrator or Operator
Successful 1. Login to the system
Completion 2. Go to Product Management in side navigation
3. Then go to Subcategories
4. System will display subcategory detail table
5. Select the relevant action (create, edit, delete
subcategory)
6. System will show the relevant form.
7. Fill the required fields
8. Click submit button
9. If success action, system will not show error message
Alternatives 8 a) If the form submits with empty field it is shown error
message

Table 10:Use case narrative for Generate Reports

Use Case ID UID06


Name Generate Reports
Actors Admin
Description Administrator can generate the reports to analyze the
information
Pre-Conditions Login as administrator
Successful 1. Login to the system
Completion 2. Go to Reports in side navigation
3. Select the relevant report type
4. System will display the selected report
Alternatives 7 a) Some graphs are displayed

55
Table 11: Use case narrative for Mark Attendance

Use Case ID UID07


Name Mark Attendance
Actors All employees
Description All employees in the pharmacy including the admin can mark
& view their daily attendance
Pre-Conditions Login to the system
Successful 4 Login to the system
Completion 5 Go to attendance in side navigation
6 Mark attendance (sign in / sign out)
Alternatives 3 a) View attendance

Table 12:Use case narrative for Create Bill

Use Case ID UID08


Name Create Bill
Actors Admin, Cashier
Description Create a bill for purchased order
Pre-Conditions Login to the system
Purchased product
Successful 1. Login to the system
Completion 2. Go to ‘Billing’ in side navigation
3. Select quantity of particular product
4. Click Add button
5. Print the bill
Alternatives 4 a) Bill is created automatically

56
Table 13:Use case narrative for Upload Prescription

Use Case ID UID09


Name Upload Prescription
Actors Customer
Description Customer can upload prescriptions
Pre-Conditions Go to the web site
Successful 1. Log in to the system.
Completion 2. Go to prescription upload tab.
3. Upload the prescription as an image type
4. Click the submit button
Alternatives 1 a) If not registered yet click signup button to create an
account.
b) Fill the form given and submit it.
c) Then the system asks to confirm the email address
that you provided.
d) After confirming email system will logged you in.
e) Confirm email address given by logging to the
email account.

4 a) If the form submits with empty field it is shown


error message
Post-Conditions Information will be saved to the database including the
prescription
Prescription status is display in the system.

Table 14:Use case narrative for Search products via the web site

Use Case ID UID10


Name Search products via the web site
Actors Customer
Description Customer can search product by using the search bar provided
in the web site
Pre-Conditions Go to the web site
Successful 1. Go to the website
Completion 2. Then go to Product tab

57
3. Enter product name in the given search bar
4. Click the search button
Alternatives 4 a) If the given name is not in the database system will
display none.
Post-Conditions System will display the relevant product details if available

58
Appendix C: User Documents

User Interfaces

Administer View

Figure 46: Admin sidebar

Figure 47: System dashboard

59
Crete, Edit, View and delete functions can be done.
As an example, “User” details interface is given.

Figure 30: Users

Figure 31: Create user

60
Figure 48: View user

Figure 49: Edit user

61
Admin can give difference permissions to difference users. Following table displays the
types of permissions.

Figure 50: Permissions

Can upload data from an excel or csv data sheet to the table.
And also the table data can download as excel or csv format.

Figure 51: Category table

62
Admin can view the attendance of every employee in the table.

Figure 52: Admin manage attendance

When quantity < 100 then is categorized as law quantity drug.


Report can download as PDF.

Figure 53: Law quantity drug table

63
Excel or csv upload interface.

Figure 54: Upload excel form

Automatically Generated bill.

Figure 55: Bill

64
Law quantity drugs and expire date near items are shown here as notification. Only admin
can see.

Figure 56: Notification

Cashier View

Figure 57:Cashier notifications

Figure 58: Cashier side navbar

65
Data entry operator view

Figure 59:Operator notification

Figure 60:Operator side navbar

Other employee view

Other employees except admin, cashier, data entry operator can only mark and see their
attendance.

Figure 61:Employee side navbar

66
Appendix D: Report generation

Low quantity drug

Figure 62: Low quantity Drug

Figure 63: Low quantity drug pdf

67
Highest sold product

Figure 64: Highest sold product

Figure 65:Highest sold product pdf

68
Daily income

Figure 66: Daily income

Daily purchase

Figure 67: Daily purchase

69
Appendix E: Test Cases

Login

Test Case ID: Login01


Test Title: Login01 - Login with valid username and password
Test Priority (Low/Medium/High): High
Purpose: To verify login with valid username and password

Table 15: Test case - Login01


Step Description Test Data Expected Results Actual Results

1 Go to login Load the login form True


page

2 Give valid Username: username


user name is an email of the user
eg:
adminwasana@gmail.
com

3 Give valid Password: 1qaz2wsx


password

4 Click Login User should be able to True


button login

Test Case ID: Login02


Test Title: Login02 - Login with invalid username and valid password
Test Priority (Low/Medium/High): High
Purpose: To verify login with invalid username and valid password

70
Table 16: Test case - Login 02

Step Description Test Data Expected Results Actual Results

1 Go to login Load the login form True


page

2 Give invalid Username: user123


user name

3 Give valid Password:


password 1qaz2wsx

4 Click Login System will show an True


button error message.

Figure 68: Error message - Login2

Test Case ID: Login03


Test Title: Login03 - Login with valid username and invalid password
Test Priority (Low/Medium/High): High
Purpose: To verify login with valid username and invalid password

Table 17: Test case - Login03

Step Description Test Data Expected Results Actual Results

1 Go to login page Load the login form True

2 Give valid user Username:


name username is an
email of the user
eg:

71
adminwasana@
gmail.com

3 Give invalid Password:


password user123456

4 Click Login System must redirect to True


button login page

Test Case ID: Login04


Test Title: Login04 - Login with invalid username and invalid password
Test Priority (Low/Medium/High): High
Purpose: To verify login with invalid username and invalid password

Table 18: Test case - Login04

Step Description Test Data Expected Results Actual Results

1 Go to login page Load the login form True

2 Give invalid user Username:


name username is an
email of the user
eg:
adminwasana@g
mail.com

3 Give invalid Password:


password user123456

4 Click Login System must redirect to True


button login page and show an
error message

72
Add Category details

Test Case ID: Category01


Test Title: Category01 – Add a category successfully
Test Priority (Low/Medium/High): High
Purpose: To verify adding a category successfully

Table 19: Test case - Category01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Category’ category’ form

2 Fill the form According to given


correctly data in form

3 Click submit System should send True


button data to the database
without any error

Test Case ID: Category02


Test Title: Category02 – Submitted form with empty field
Test Priority (Low/Medium/High): High
Purpose: To verify submitting form with invalid data/ empty required field

Table 20: Test case - Category02

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Category’ category’ form

2 Submit the empty field


form with
empty field

3 Click submit System should redirect True


button the page with relevant

73
error message
‘Required field’

Add Subcategory details

Test Case ID: Subcategory01


Test Title: Subcategory01– Add a subcategory successfully
Test Priority (Low/Medium/High): High
Purpose: To verify adding a subcategory successfully

Table 21: Test case - Subcategory01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Subcategory’ Subcategory’ form

2 Fill the form According to given


correctly data in form

3 Click submit System should send True


button data to the database
without any error

Test Case ID: Subcategory02


Test Title: Subcategory02 – Submitted form with empty field
Test Priority (Low/Medium/High): High
Purpose: To verify submitting form with empty field

74
Table 22: Test case - Subcategory02

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Subcategory’ Subcategory’ form

2 Fill the form Submit form with


with error empty field
format or
empty
required field

3 Click submit System should display True


button relevant error message
‘Required field’

Add new employee

Test Case ID: Employee01


Test Title: Employee01– Add new employee successfully
Test Priority (Low/Medium/High): High
Purpose: To verify adding new employee successfully

Table 23: Test case - Employee01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Employee’ Employee’ form

2 Fill the form As mention test data


correctly in the form

3 Click submit System should upload True


button new employee details
without any error

75
Test Case ID: Employee02
Test Title: Employee02– Add new employee without filling the form correctly
Test Priority (Low/Medium/High): High
Purpose: To verify adding new employee without filling the form correctly

Table 24: Test case - Employee02

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Employee’ Employee’ form

2 Fill the form Empty required field


with error
format or
empty
required field

3 Click submit System should redirect True


button the page with relevant
error message
‘Required field’

Add new order

Test Case ID: Order01


Test Title: Order01– Add new order successfully
Test Priority (Low/Medium/High): High
Purpose: To verify adding new order successfully

Table 25: Test case - Order01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Order’ Order’ form

76
2 Fill the form Fill the form with
correctly correct data

3 Click submit System should upload True


button new Order details
without any error

Test Case ID: Order02


Test Title: Order02– Add new order without filling the form correctly
Test Priority (Low/Medium/High): High
Purpose: To verify adding new order without filling the form correctly

Table 26: Test case - Order02

Step Description Test Data Expected Results Actual Results

1 Go to ‘Add Load the ‘Add new True


Order’ Employee’ form

2 Fill the form Empty field of


with error ‘Order_ID’and
format or duplicate IDs
empty
required field

3 Click submit System should redirect True


button the page with relevant
error message
‘Required field’
‘Duplicate ID’

Notification

Test Case ID: Notification01


Test Title: Notification01– Successfully display notifications
Test Priority (Low/Medium/High): High

77
Purpose: To verify of displaying the notification successfully

Table 27: Test case - Notification01

Step Description Test Data Expected Results Actual Results

1 Login as Successfully log in to True


admin the system

2 See the Change the particular Notifications should True


notifications data: display on top right
Low quantity, Near hand side of the
date for Expiry date system. Admin can be
able to click on
notification icon. In
notification
information related to
particular product
such as expiry date,
Stock details should
be mentioned.

Customer Search

Test Case ID: CustomerSearch01


Test Title: CustomerSearch01– Successfully search data
Test Priority (Low/Medium/High): High
Purpose: To verify search with valid input through the web

Table 28: Test case - CustomerSearch01

Step Description Test Data Expected Results Actual Results

1 Go to web Load the site True


site. Here is a
facility to
search drugs

78
2 Type valid ‘Product0001’ System should display
input in search search results with the
bar provided price

Test Case ID: CustomerSearch02


Test Title: CustomerSearch02– Customer search fails
Test Priority (Low/Medium/High): High
Purpose: To verify search with invalid input through the web

Table 29: Test case - CustomerSearch02

Step Description Test Data Expected Results Actual Results

1 Go to web Load the site True


site. Here is a
facility to
search drugs

2 Type invalid Invalid drug name System should not True


input in search display any product
bar provided

Search as user

Test Case ID: Search01


Test Title: Search01– Successfully search data as a user
Test Priority (Low/Medium/High): High
Purpose: To verify search with valid input

Table 30: Test case - Search01

Step Description Test Data Expected Results Actual Results

1 Login to the Successfully log in to True


system the system

79
2 Search with Product 001 Should display data True
valid input with price, quantity,
and other relevant
information

Test Case ID: Search02


Test Title: Search02– Fail to search data as a user
Test Priority (Low/Medium/High): High
Purpose: To verify search with invalid input

Table 31: Test case - Search02

Step Description Test Data Expected Results Actual Results

1 Login to the Successfully log in to True


system the system

2 Search with Invalid name System should display True


invalid input nothing

Upload Prescription

Test Case ID: UploadPrescription01


Test Title: UploadPrescription01– Successfully upload the prescription
Test Priority (Low/Medium/High): High
Purpose: To verify uploading of prescription

Table 32: Test case - UploadPrescription01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Upload
prescription’
on home page

80
2 Upload valid Fill form correctly Upload with out an True
document error

Test Case ID: UploadPrescription02


Test Title: UploadPrescription02– Upload invalid prescription format
Test Priority (Low/Medium/High): High
Purpose: To verify uploading of prescription form incorrectly
Table 33: Test case - UploadPrescription02

Step Description Test Data Expected Results Actual Results

1 Go to ‘Upload
prescription’
on home page

2 Upload Invalid form data System redirects True


invalid
document

Create Bill

Test Case ID: Bill01


Test Title: Bill01– Generate bill correctly
Test Priority (Low/Medium/High): High
Purpose: To verify creating bill correctly

Table 34: Test case - Bill01

Step Description Test Data Expected Results Actual Results

1 Create a bill Use some items to Correct bill with sub True
check the bill total
(Qty*UnitPrice)

81
Upload Excel sheet
Test Case ID: Excel01
Test Title: Excel01– Upload excel correctly
Test Priority (Low/Medium/High): High
Purpose: To verify upload data correctly to the table

Table 35: Test case-Excel01

Step Description Test Data Expected Results Actual Results

1 Go to ‘Upload
Excel’ page

2 Upload valid Correct file types Enter data correctly True


document type arexls, xlsx, csv and show success
message

Figure 69:Upload excel success message

Test Case ID: Excel02


Test Title: Excel02– Upload excel incorrectly
Test Priority (Low/Medium/High): High
Purpose: To verify no file uploaded error confirmation

Table 36: Test case- Excel02

Step Description Test Data Expected Results Actual


Results

82
1 Go to ‘Upload
Excel’ page

2 Submit without Submit without any System should show error True
uploading a file file uploading message

Figure 70:Excel file not import error

Test Case ID: Excel03


Test Title: Excel03– Upload invalid file format
Test Priority (Low/Medium/High): High
Purpose: To verify invalid type of file uploading

Table 37: Test case- Excel03

Step Description Test Data Expected Results Actual Results

1 Go to ‘Upload
Excel’ page

2 Upload Submit with invalid System should show True


invalid type of file error message
document type

83
Figure 71: Invalid file type

84
Appendix F: Sample Codes

Database Connection code

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pms
DB_USERNAME=root
DB_PASSWORD=

Category Management details code

Route for Category


Route::resource('admin/category', 'Admin\\CategoryController');

Controller for display Category details

public function index(Request $request)


{
$keyword = $request->get('search');
$perPage = 25;
if (!empty($keyword)) {
$category = Category::where('category_id', 'LIKE', "%$keyword%")
->orWhere('category_name', 'LIKE', "%$keyword%")
->paginate($perPage);
} else {
$category = Category::paginate($perPage);
}
return view('admin.category.index', compact('category'));

85
}

View Category interface (Category.blade.php)

@extends('layouts.app')
@section('sidebar')
@include('admin.sidebar')
@endsection
@section('content')
<div class="container">
<div class="row">
<div class="col-md-11">
<div class="panel panel-default">
<div class="panel-heading"><h3><b><i class="fa fa-fa fa-tag"></i>
Category</b></h3></div>
<div class="panel-body">
<form method="get" action="{{ url('admin/uploadexcel') }}">
<input type="hidden" name="tbname" value="category">
<a href="{{ url('/admin/category/create') }}" class="btn btn-success btn-
xs" title="Add New Category">
<i class="fa fa-plus" aria-hidden="true"></i> Add New
</a>
<button type="submit" class="btn btn-primary btn-xs" >
<i class="fa fa-upload" aria-hidden="true"></i> Upload Excel
</button>
<a href="{{
url('admin/downloadexcel',['type'=>'xlsx','tbname'=>'category']) }}" class="btn btn-info btn-
xs" >
<i class="fa fa-download" aria-hidden="true"></i> Download Excel
</a>

86
<a href="{{
url('admin/downloadexcel',['type'=>'csv','tbname'=>'category']) }}" class="btn btn-warning
btn-xs" >
<i class="fa fa-download" aria-hidden="true"></i> Download csv
</a>
</form>
<form method="GET" action="{{ url('/admin/category') }}" accept-
charset="UTF-8" class="navbar-form navbar-right" role="search">
<div class="input-group">
<input type="text" class="form-control" name="search"
placeholder="Search..." value="{{ request('search') }}">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<br/>
<br/>
<div class="table-responsive">
<table class="table table-borderless">
<thead>
<tr>
<th>#</th><th>Category Id</th><th>Category
Name</th><th>Actions</th>
</tr>
</thead>
<tbody>
@foreach($category as $item)
<tr>
<td>{{ $item->id }}</td>

87
<td>{{ $item->category_id }}</td><td>{{ $item->category_name
}}</td>
<td>
<a href="{{ url('/admin/category/' . $item->id) }}" title="View
Category"><button class="btn btn-info btn-xs"><i class="fa fa-eye" aria-
hidden="true"></i> View</button></a>
<a href="{{ url('/admin/category/' . $item->id . '/edit') }}"
title="Edit Category"><button class="btn btn-primary btn-xs"><i class="fa fa-pencil-
square-o" aria-hidden="true"></i> Edit</button></a>

<form method="POST" action="{{ url('/admin/category' . '/' .


$item->id) }}" accept-charset="UTF-8" style="display:inline">
{{ method_field('DELETE') }}
{{ csrf_field() }}
<button type="submit" class="btn btn-danger btn-xs"
title="Delete Category" onclick="return confirm(&quot;Confirm delete?&quot;)"><i
class="fa fa-trash-o" aria-hidden="true"></i> Delete</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="pagination-wrapper"> {!! $category->appends(['search'
=>Request::get('search')])->render() !!} </div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

88
Call Edit category (in controller)

public function edit($id)


{
$category = Category::findOrFail($id);
return view('admin.category.edit', compact('category'));
}
Category edit form (edit.blade.php)

<div class="container">
<div class="row">
<div class="col-md-11">
<div class="panel panel-default">
<div class="panel-heading"><h3><b><i class="fa fa-fa fa-tag"></i> Edit
Category (# {{ $category->category_id }})</b></h3></div>
<div class="panel-body">
<a href="{{ url('/admin/category') }}" title="Back"><button class="btn btn-
warning btn-xs"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back</button></a>
<br />
<br />
@if ($errors->any())
<ul class="alert alert-danger">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
<form method="POST" action="{{ url('/admin/category/' . $category->id)
}}" accept-charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
{{ method_field('PATCH') }}
{{ csrf_field() }}

89
@include ('admin.category.form', ['submitButtonText' => 'Update'])
</form>
</div>
</div>
</div>
</div>
</div>

Update product (in controller)

public function update(Request $request, $id)


{
$this->validate($request, [
'category_id' => 'required|min:1',
'category_name' => 'required|min:1'
]);
$requestData = $request->all();
$category = Category::findOrFail($id);
$category->update($requestData);
return redirect('admin/category')->with('flash_message', 'Category updated!');
}

Call Add new product form (in controller)

public function create()


{
return view('admin.category.create');
}

Create new Product form (create.blade.php)

90
<div class="container">
<div class="row">
<div class="col-md-11">
<div class="panel panel-default">
<div class="panel-heading"><h3><b><i class="fa fa-fa fa-tag"></i> Create
New Category</b></h3></div>
<div class="panel-body">
<a href="{{ url('/admin/category') }}" title="Back"><button class="btn btn-
warning btn-xs"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back</button></a>
<br />
<br />
@if ($errors->any())
<ul class="alert alert-danger">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
<form method="POST" action="{{ url('/admin/category') }}" accept-
charset="UTF-8" class="form-horizontal" enctype="multipart/form-data">
{{ csrf_field() }}
@include ('admin.category.form')
</form>
</div>
</div>
</div>
</div>
</div>

Insert new category details to category table (contrller)

91
public function store(Request $request)
{
$requestData = $request->all();
$id = $requestData['category_id'];
$query = "select * from categories where category_id='$id'";
$valdiate = DB::select($query);
if(sizeof($valdiate) > 0){
$request->session()->flash('alert-danger', 'duplicate category id!');
return view('admin.category.create');
die();
}
$model = Category::create($requestData);
return redirect('admin/category')->with('flash_message', 'Category added!');
}

92
Appendix G: User Evaluation

Questionnaire

01. Personal information:

Name (Opt): …………………………………… Age: ……………………………….

Designation: ………………………..……..…… Company/ Role (opt):……………...

Gender: Male Marital status: Single

Female Married

02. what do you think about following factors regarding the pharmacy which has a manually
handled system? (customer point of view)

(a) (b) (c) (d) (e)

Factors Very Poor Fair Good Very


poor good

Q1 Time taken to know a particular drug is


out of stock

Q2 Time taken to estimate the price for the


prescription

Q3 Time for generating the bill

Q4 Time taken to be served (to buy


medicine or other product)

93
03. Indicate whether you agree with the following statements.

(a) (b) (c) (d) (e)

Statements Strongly Disagree Neither Agree Strongly


disagree agree agree
nor
disagree

Q05 Computerized system is suitable


for a pharmacy

Q06 It helps to reduce waiting time in


queues

04. Answer the following questions: (to know employee’s computer ability)

Q07. How often do you use the computer?

a. Never use a computer


b. Seldom
c. Use computer 2 to 4 times a month
d. Use computer weekly
e. Use computer daily

Q08. How often do you use Internet?

a. Never used
b. Seldom
c. Use 2 to 4 times a month
d. Use weekly
e. Use Daily

94
Q09. How is your keyboard typing ability?

a. Very bad
b. Bad
c. Average
d. Good
e. Very good

Q10. How about hardware knowledge of you?

a. Very bad
b. Bad
c. Average
d. Good
e. Very good

05. Following questions are regarding this system.

(a) (b) (c) (d) (e)

Factors Strongly Disagree Average Agree Strongly


disagree agree

Q11 Whole System is user friendly

Q12 It is easy to work with


computerized system rather
than manual system

95
Q13 Can work with the system
without any others help

Q14 System functionalities are easy


to understand

Q15 System provided relevant error


messages when needed

Q16 Interface design is user


friendly

Q17 Can quickly search products

Q18 Report generation is easy to


handle

Q19 Easy to find stock details


quickly

Q20 Pharmacy income will


increase

Evaluation Results

96
(a) (b) (c) (d) (e)

Q01 6 3 1

Q02 7 3

Q03 5 5

Q04 7 2 1

Q05 4 6

Q06 5 5

Q07 1 2 5 2

Q08 1 4 5

Q09 1 3 6

Q10 1 5 4

Q11 7 3

Q12 1 6 3

Q13 2 6 2

Q14 1 8 1

Q15 2 8

Q16 8 2

Q17 1 7 2

Q18 4 6

Q19 5 5

Q20 3 5 2

97

You might also like