You are on page 1of 120

PharmEase

Giving your health a new lift

Developed By

Kainat Niazi
3122-FBAS/BSSE/F16
Bushra Amjad
3041-FBAS/BSSE/F16

Supervised By
Panel 3

Department of Computer Science and Software Engineering


Faculty of Basic and Applied Sciences
International Islamic University, Islamabad
(2020)
Final Approval

Final Approval

It is certified that we have read the project report submitted by Kainat Niazi(3122-
FBAS/BSSE/F16/B) and Bushra Amjad(3041-FBAS/BSSE/F16/B) and it is our judgment
that this project is of sufficient standard to warrant its acceptance by the International Islamic
University, Islamabad for the BS degree in Software Engineering.

Dated: __________________

COMMITTEE

1. External Examiner

DCS&SE, FBAS IIUI

2. Internal Examiner

DCS&SE, FBAS IIUI

3. Supervisor
Panel 3
DCS&SE, FBAS IIUI

PharmEase iii
Abstract

ABSTRACT

Digital Health is the future of healthcare system. “Pharmease” is a system designed primarily
for customer and pharmacies. We have seen that a small number of Pharmacies are now
online in terms of providing the medicines but it is observed that these systems are not
allowing the user/ customer to search the nearby pharmacies or to find which pharmacy have
their required medicine. This system is beneficial in terms of locating the nearby pharmacies
or searching pharmacies according to the medicines and also in handling the order requests.
The objective is to design a system to answer all those queries that remain unanswered
before, that resulted in loss of time and human effort. Pharmease consist of a mobile
Application along with the Web Application for administrative support. It allows the users to
find all nearby pharmacies according to their current location, search a specific pharmacy by
entering either a medicine or pharmacy name and placing an order directly. If the user places
an order he will be notified about the progress of order through push notifications.

Pharmease reduces manual work and work load of users and administration, it saves time
which can be used in some other productive way. Today management is one of the most
essential features of all form. Management provides an ease to perform any kind of task in a
system provided.

PharmEase iv
Acknowledgement

ACKNOWLEDGEMET

My deepest gratitude goes to Allah Almighty who has provided all that was needed to
complete this project and the program for which it was undertaken for. Throughout this entire
degree, He took care of everything that would have stopped me in my ways and strengthened
me even through my most difficult times.

Our greatest regard also goes to our parents for their support, prayers and their love that leads
us to be the person who we are today. who thoroughly laid the foundation for our education
giving it all it takes. We are and will forever be grateful to them who has given everything
possible and even given up important things to make sure we achieve this feat. If it wasn’t for
them, we could not be able to stand firm in our lives. They are the only reason that we work
hard because we always want to make them proud.

We would like to express our gratitude to our kind Teachers for giving us support and
providing us the opportunity to learn and enhance our knowledge.

Kainat Niazi

3122-FBAS/BSSE/F16/B

Bushra Amjad

3041-FBAS/BSSE/F16/B

PharmEase v
Dedication

DECLARATION

I hereby declare that this system neither as a whole nor as a part has been copied out from any
source. It is further declared that I have developed this system entirely on the basis of my
personal efforts and learning made under the sincere guidance of my teachers and supervisor.
If any part of this report is proved to be copied out or found to be reported, I shall stand by
the consequences. No portion of the work presented in this report has been submitted in
support of any application for any other degree or qualification of this or any other university
or institute of learning.

Kainat Niazi

3122-FBAS/BSSE/F16/B

Bushra Amjad

3041-FBAS/BSSE/F16/B

PharmEase
vii
Dedication

DEDICATION

We dedicate this project especially to our Mama, Baba and rest of our family members who
are always been very supportive during this project and during our whole degree as well and
to each other because it would have been very difficult in this pandemic without having
someone who always have your back and also to all those who ever prayed for our success.
A special thanks to each other for being there throughout this entire program.

PharmEase
vii
Dissertation

DISSERTATION

A dissertation is submitted to the Department of Computer Science & Software Engineering,


International Islamic University Islamabad, as a partial fulfillment of requirements, for the
award of the degree.

BS in Software Engineering

PharmEase
viii
Project in Brief

PROJECT IN BRIEF

Project Title: PharmEase - Giving your health anew Lift

For Mobile App


 To provide an Application which will find desired medicines on
Objective:
pharmacies near us by detecting our location.
 To provide an Application which will locate our nearby pharmacies
 To provide an easier way to the user to directly place order from this
Application
For Web App
 To provide an Application to the Pharmacies to maintain their record
and handle orders.

Undertaken By: Bushra Amjad (3041-FBAS/BSSE/F16/B)

Kainat Niazi (3122-FBAS/BSSE/F16/B)

Supervised By: Panel 3, DCS & SE IIUI

Date Started: Feb-2020

Date Completed: July-2020

Mobile Application
Tools Languages Database Technologies

Android Studio Kotlin, Java, xml Firebase

Tools, Technologies Web Application


and Language Used:
Tools Languages Database Technologies

Visual Studio PHP, JavaScript, Firebase Bootstrap


Code, XAMPP CSS, HTML

Platform Used: Windows 10 Pro 64-bit

System Used: Core i3 1.80 GHz, Ram 8 GB

PharmEase
ix
Table of Contents

Table of Contents
4
4
4
4
4
4
6
10
14
10
10
10
10
11
11
11
11
11
11
11
11
11
11
11
11
12
12
12
12
12
12
12
12
12

PharmEase
xi
Table of Contents

12
12
12
12
12
12
12
13
13
13
13
13
13
13
13
13
13
13
13
13
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14

PharmEase
xi
Table of Contents

14
14
14
14
15
15
15
15
15
16
16
16
16
17
17
18
18
18
19
19
20
21
22
23

23
20
31
34
42
42
47
52
59
60
76

PharmEase
xi
Table of Contents

77
77
77
77
77
77
77
77
77
78
78
80
88
89
89
89
94
96
100
101
101
102
103
121

PharmEase
xi
Chapter 1

INTRODUCTION
Chapter 1 Introduction

1. Introduction
Digital Health is the future of healthcare system. Legitimate mail-order pharmacies are
somewhat similar to community pharmacies, one primary difference is the method by which
the medications are requested and received. Some customers consider this to be more
convenient than traveling to a Pharmacy, in the same way as ordering goods online rather
than going to a shop
Starting an Online Pharmacy is a wonderful way to serve Customers with Right Medicine on
time. Through this Business, you are nothing but bringing smiles to people’s faces as you are
indirectly caring health of Customers. It’s a best opportunity as everyone wants to live
healthy.
An Application is needed through which you can check
 Which Pharmacies are near our current locations.
 Is the medicine we are looking for available on that pharmacy or not.
 Also allows users to select from their local Pharmacies and are able to place orders via
their mobile application.

A solution is intended to develop a platform that will solve all the above-mentioned problems
by finding Pharmacies near us and searching on which store our desired medicine is available.
This Application will be used by
 Customers (Mobile App)
 Pharmacy operators (Web portal).

1.1 Project Motivation


Starting an Online Pharmacy is a wonderful way to serve Customers with Right Medicine on
time. Through this Business, you are nothing but bringing smiles to people’s faces as you are
indirectly caring health of Customers so this was basically the motivation for designing this
project. It is a best opportunity as everyone wants to live healthy.

1.2 Scope
PharmEase is a Mobile based application along with a Web portal. Its main aim is to simplify
and improve the efficiency of locating the medicines on different pharmacies by visiting each
one, minimize manual handling of record for Pharmacist and Admin and ensure data accuracy
and security during order placement process. Clients will be able locate medicines or nearby

PharmEase

2
Chapter 1 Introduction

pharmacies according to their locations through Mobile App. Client will be able to place an
order in case if he does not want to visit the Pharmacy by himself. Pharmacy is able to
maintain the record of their medicines or Pharmacists and handle the orders places by the
customers through our Pharmease Mobile Application. The ultimate scope is to save time and
human effort. By this whole automated process, there is no need
 To move from pharmacy to pharmacy to find a medicine
 Asking from people about the nearby pharmacies
 Manually maintain the record of medicines and products
 Handling the orders manually by phone calls or any other medium

The things which are not in our scope are

 Order Tracking
 Online Payment
 Distance Calculation

1.3 Overview
Digital Health is the future of healthcare system. Legitimate mail-order pharmacies are
somewhat similar to community pharmacies, one primary difference is the method by which
the medications are requested and received. Some customers consider this to be more
convenient than traveling to a community pharmacy, in the same way as ordering goods
online rather than going to a shop.

Nearly everyone goes on a pharmacy and a PharmEase application would play an important
role in giving users the relaxation of visiting the pharmacies. Customer will have an option to
place order directly through the Application without even visiting the Pharmacy.

A Mobile Application is needed through which you can check that


 Which Pharmacies are near your current location
 Is the medicine you are looking for available on that Pharmacy or not.
 Also allow users to select from their local Pharmacies and are able to place orders via
their mobile application.

A Web Portal is needed through which

 Pharmacists will be able maintain the record of all medicines and orders

PharmEase

3
Chapter 1 Introduction

 Admin will be able to look after all the activity going on through the whole system

1.4 Objectives
The proposed system aims to facilitate the administration, pharmacists and users (Customers)
in order to save their effort on manual work. We are providing them facility to save time and
human effort.

The main objectives of this online system are:

1.4.1 Saves Time


As this whole system is automated. User can search medicines or place an order
through this application so it will be time saving.
1.4.2 Cost Effective
As most of the things will be performed online and whole searching process is
automated so it will save the money of users.
1.4.3 Reduce Human Effort
As mostly all of the things will be performed online and whole calculation process is
automated so it will save effort of administration and clients as well.
1.4.4 Improves Efficiency
This system will make things easier for both Administration and Customer.
1.5 Problem Statement

The problem of People are not able to know their required medicines
are available on which pharmacy without visiting and
which Pharmacies are near to their current location.

Affects Can be anyone (no specific age group or profession)

the impact of which is 1 Wastage of time and money,


2 Not in reach of distant users
3 difficulty in seeking help in emergency situations

PharmEase

4
Chapter 1 Introduction

a successful solution would A simple, mobile application with a low learning curve
be along with a Web Application for Administration
purpose that can be easily used by anyone.
 The product would provide users with means of
finding Pharmacies near them and searching on
which pharmacy their desired medicine is available.
 Customer will also have an option to place order
directly through the Application without even
visiting the Pharmacy.
Table 1 Problem statement

PharmEase

5
Chapter 2

BASIC CONCEPTS
Chapter 2 Problem Analysis

2.1 Existing System


The current system is to visit the Pharmacy manually and ask for the required medicine, but
in some cases, Pharmacy is running short of those medicines which are required. So, the
customer has to go to other Pharmacies in search of that medicine without knowing exactly
on which Pharmacy he will be successful to find that item and which pharmacies are near or
in that area. So, the current system has following drawbacks or disadvantages

 Time consuming – searching takes a lot of time


 Cost consuming
 Not in reach of distant users.

2.2 Problem Solution


A solution is intended to develop an Application that will solve all the above-mentioned
problems
 Finding Pharmacies near us by detecting our current location and displaying all the
pharmacies on the Map with markers as an Interface
 Searching on which store our desired medicine is available by querying the requested
medicine from database.
 Customer will also have an option to place order directly through the Application
without even visiting the Pharmacy.
 This Application will be used by
 Customers (Mobile App)
 Pharmacy operators (Web portal).
 Admin
2.3 Project Idea
The basic idea behind this project is to encounter the following problems
 Which Pharmacies are near our current location.
 Is the medicine we are looking for available on that Pharmacy or not.
 Also allows users to select from their local Pharmacies and are able to place orders via
mobile application.

PharmEase
Chapter 2 Problem Analysis

2.4 Proposed System

Modules / Roles

The system after careful analysis has been identified to be presented with the following
modules and roles.

The roles involved are:

 User / customer – Mobile Application


 Moderator – Web Portal at Pharmacy
 Administrator – Server

2.4.1 User / Customer (Mobile App)

A user is the one who will actually interact with the Mobile Application.

2.4.2 Moderator (System at Pharmacy – Web portal)

 A moderator is considered as a single Pharmacy (Web Portal) who can manage his
own products. Moderators can reduce the work load of Admin (super user).
 Moderator has all the privilege an Admin have, except managing other Moderators.

2.4.3 Administrator

The administrator is the super user of this application. Only admin have access into this
admin side. The administrator has all the information about all the Moderators, users and all
products.

2.5 Software Process Scope

The process followed for this project is research and development. The reason behind
choosing this process is that the features we introduced was totally new to work on, in field of
online business. New technique is also followed to review the project requirements and
accept the changes needed after each module is developed. The main goal is to ensure the
production of high-quality software that meets the user needs.

2.6 Operating Environment


It is necessary to consider the operating environment for the product been developed. By
doing this the development team and the end users are able to deal with product in a good
PharmEase
Chapter 2 Problem Analysis

way. Some of the major requirements for operating this system “PharmEase” are as
following:

 Good Internet connection to connect online.


 Operating systems – Minimum Windows 8 version
 A server with enough capability to deal with multiple client’s request.
 Hardware Specifications
 Processor of 2.0 GHz,
 RAM with 2 GB and a
 Hard Disk: 50 GB.
 Frameworks
 Android Studio
 Firebase
 XAMPP server
 Visual Studio code
 Bootstrap

PharmEase
Chapter 3

PROBLEM ANALYSIS
Chapter 3 System Analysis

3.1 Product Overview

Figure 1 Overview of PharmEase Architecture

3.2. Software Modules


Software modules are the division of project in order to distribute software requirements for
increments. The need of these modules is to get all the requirements done on the basis of
priority level. Following are the modules of Pharmease Application.
Mobile Application
Registration / Sign in

3.2.1. Registration / sign in

User can register himself in the application by adding email and password or through google
authentication and Facebook authentication.

3.2.2. Social Media Login


3.2.3. Nearest pharmacies

View nearest Pharmacies according to the location in a certain area graphically on the Map.

3.2.4. Medicine Search

User can search the medicines to know on which Pharmacy it is available.

PharmEase
Chapter 3 System Analysis

3.2.5. Add Prescription

User have to add prescription at the time of placing order so that the Pharmacist or Admin can
check the authenticity of the medicines requested otherwise the request will not be considered
or it is rejected.
3.2.6. Order Placement

User will be able to place an order for medicine. In this module, management of cart will be
done. This module will add the bought item to the cart, where all items that are to be
purchased can be reviewed once again after the item is bought from the cart.
3.2.7. Cart Management
 Add the desired product into the cart.
 View cart.
 Remove an item from the cart.
3.2.8. Amount Calculation

After adding the products in the cart, amount will be calculated and displayed to the user so
that user know how much he have to pay in case if he confirms order.

3.2.9. Notification

User will receive notification when pharmacist will update the order status.
3.2.10. Feedback

In the last step, if user will cancel the order then system will ask for feedback, why he cancels
order or so.

3.2.11. Payment

Payment will be done on Delivery of the items after verifying the prescription.
3.2.12. Settings
3.2.13. Sign out

Web Portal - Pharmacist

3.2.14. Registration/ Login/ sign-out


3.2.15. Search
3.2.16. Add/ Remove / Edit products
3.2.17. Handle Order Request

PharmEase
Chapter 3 System Analysis

3.2.18. Order status Updation


3.2.19. Invoice Generation

Web Portal - Admin

3.2.20. Login/ sign-out


3.2.21. Search
3.2.22. Add/ Remove / Edit Products
3.2.23. Add/ Remove / Edit Pharmacist
3.2.24. Add/ Remove / Edit Customers
3.2.25. Add/ Remove / Edit Order
3.2.26. Handle Order Request
3.2.27. Invoice generation

3.3 Product perspective


3.3.1 User Interfaces

The system will have a Graphical User Interface to enhance look and feel of the application
and to provide usability. All pages of the system will follow consistent layout and clear
structure. The amount of text input from user would be minimized through the use of
checkboxes which will also reduce the occurrence of errors.

Our Application have the following interfaces

 For User/ Customer


 Pharmacist
 Admin

3.3.2 Hardware Interface


 An android phone and laptop.
 Processor with 1.2 GHz, build in memory minimum 8GB and minimum 2GB RAM.

3.3. Software Interface


Software used Description
Operating System Android OS above version 4.1
Database Firebase
Tools Android Studio.
Languages Kotlin, java.
Table 2 Software Interface

PharmEase
Chapter 3 System Analysis

3.3.4 Communication Interface


This application uses Wi-Fi to communicate between different devices. We will use the
Internet to communicate between different users on Android devices as database is real time
and it requires internet to sync data across the application.

3.3.5 Design and Implementation Constraints


Category Mobile Application Web Application

System Dell, core i3, 3rd generation with Dell, core i3, 3rd generation with
8GB RAM. 8GB RAM.
Tools Android Studio 3.6.3, SDK, Visual Studio Code, Firebase
Android ADT, Firebase
Language Kotlin, Java PHP, JavaScript
Table 3 Design and Implementation Constraints

3.4 Functional Requirements


Functional requirements describe the specific behavior of the system that what a system
should do. It explains functions of a software system or its component. Functional
requirements are supported by non-functional requirements, which impose constraints on the
design or implementation (such as reliability, security or performance requirements).

3.4.1 Mobile Application


Following are the functional requirements of Mobile application

3.4.1.1. Registration
3.4.1.2. Nearest Pharmacies
3.4.1.3. Medicine Search
3.4.1.4. Add Prescription
3.4.1.5. Order Placement
3.4.1.6. Amount Calculation
3.4.1.7. Payment (Cash on Delivery)
3.4.1.8. Notifications
3.4.1.9. Login and profile Management
3.4.1.10. Sign Out

3.4.2. Pharmacist
3.4.2.1. Registration/ Login/ sign-out
3.4.2.2. Add/ Remove / Edit products

PharmEase
Chapter 3 System Analysis

3.4.2.3. Handle Order Request


3.4.2.4. Order status Updation
3.4.2.5. Invoice Generation

3.4.3. Admin
3.4.3.1. Login/ sign-out
3.4.3.2. Add/ Remove / Edit Products
3.4.3.3. Add/ Remove / Edit Pharmacy
3.4.3.4. Add/ Remove / Edit Pharmacist
3.4.3.5. Add/ Remove / Edit Customers
3.4.3.6. Add/ Remove / Edit Order
3.4.3.7. Handle Order Request
3.4.3.8. Invoice generation

3.5. Non-Functional Requirements


Nonfunctional requirement are requirements which shows the quality attribute of the system.
Nonfunctional requirement of our application are as follows:

3.5.1 Reliability
The capability to maintain the specified level of performance is what meant by reliability.
This application will run on any android phone.

3.5.2 Availability
The application will run 24 X 7 if internet connection is available. 

3.5.3 Usability:
The interface is easy to understand and user can easily navigate within application

 User friendly interface


 Easy to use.
 Navigation between screens is easy.

3.5.4. Security
Security requirements placed restrictions on the use of this application by the Pharmacist and
the Admin. Control access to the data, provide different kinds of Interfaces to different users,
require the use of passwords. It requires proper programming techniques. Total privacy

PharmEase
Chapter 3 System Analysis

indeed login security and data security. Security for the PharmEase includes authentication,
access control, data integrity, and data privacy.

3.5.5. Maintainability

Maintenance is one form of change that typically is done after the software development has
been completed. As the time change, so do the needs. It revolves around the understanding of
the existing s/w and the effects of the change. This application needs a timely updating of
information table of the database by the admin. Any other feature as per the requirement can
be added any time by the admin. 

3.5.6. Portability

The capability adapted for different specified environments without applying actions or
means other than those provided for this purpose in the product. Since, phones are portable,
so do the application.  

3.5.7. Performance Requirements:

The system should work according to the design and requirements of the user. The system
should give fast response to user.

 Minimal time between click and system response


 Minimal number of clicks.
 Minimal time for searching
 Minimal time required to deliver place order.

3.5.8. Responsiveness

The system should have performed all the tasks with fewer touches in fewer seconds or
instantaneous with user touch.

 System responds quickly to user requests or changes in the environment.


 System responds within 2 seconds on average to local user requests and changes in the
environment.
 System responds within 4 seconds on average to remote user requests and changes in
the environment.
3.6. Product Position Statement
PharmEase
Chapter 3 System Analysis

For Can be anyone (no specific age group or profession)

Who  Those who are in need of medicine


 Pharmacists

The PharmEase is a software application


That provides the user with means of finding Pharmacies
near them and searching on which pharmacy their
desired medicine is available, through a simple,
intuitive interface
Unlike current manual systems that is to visit the Pharmacy
manually one by one and ask for the required
medicine
Our product provides user with means of finding Pharmacies near them
and searching medicines.
Customer will also have an option to place order directly
through the Application without even visiting the
Pharmacy.

3.7. Stakeholders and User Description


3.7.1. Market Demographics

Mobile Application Web Portal


Age Any 23 and above
Gender Any Any
Location Islamabad Islamabad
Education Any Doctor of Pharmacy
Table 5 Market Demographics

3.7.2. User Summary

Name Description Responsibilities Stakeholde


r
Anyone Mobile application Uses application to search for Self
end user medicine or find pharmacies. Can
be used for placing order.

Pharmac
Table 4 Product Position Web application
Statement Uses application to maintain Self
ist end user record of pharmacy and manage
orders.
Table 6 User summary

3.7.3. User Environment

Pharmease is a mobile application with web portal support used by customers and
pharmacists, regardless of their age, gender or educational background. The users access this

PharmEase
Chapter 3 System Analysis

application remotely. Remote access is wireless (cell phone). This application support
Android OS from 4.1(Ice-cream sandwich) to Android 10 version.

3.7.4. Stakeholder and User Profile

The mobile app user

Description Any person who uses our application


Type This is a casual user who wants to check the medicine
availability
Responsibilities Uses the application to search for desired medicine or
wants to look for nearby pharmacies
Success Criteria The success is defined as the customers continuing to
use our system.
Involvement We will have sample customers to evaluate our system
which will guide our vision.
Deliverables None
Comments / Issues None
Table 7 User Profile

Pharmacist

Description A person who maintains the record of pharmacy


and manage orders.

Type A health professional who practice in pharmacy

Responsibilities  Ensures the quality of medicines supplied to customers


 Ensuring that the supply of medicines is within the law
 Ensuring that the medicines prescribed to patients
are suitable
Success Criteria The success is defined as the pharmacists continuing to
use our system.

Involvement We will have sample pharmacists to evaluate our


system which will guide our vision.
Deliverables None

Comments / Issues None


Table 8 Pharmacist Profile

3.7.5. Key Stakeholders and User needs

Need Priority Concerns Current Proposed


Solution Solution
Secured Access Moderate Management of See proposed Manage user

PharmEase
Chapter 3 System Analysis

private user access with user id


information and password.
Easy to use High Ability for users See proposed Provide user
with little to no friendly, highly
previous phone usage intuitive, help
to navigate easily. guided navigation
in application
Flexible High Ability to provide a See proposed Provide user with
truly customized user the facility to
experience. update record
Responsive Moderate Ability to rely on See proposed Create business
to High third party partnerships with
communication links third party
for prompt response providers to
times ensure prompt
response times
Table 9 Key Stakeholders and User needs

3.7.6. Summary of Capabilities

Customer Benefit Supporting Features


Enhanced ease of Private and Public chat features to discuss
Communication. academic issues of students.
Scalable Support the controlling and
monitoring of large number of
users by generating reports.

Convenient, flexible access to the system Wireless access (cell phones).

Secured access to the system Authentication, access control to the system

3.8. Assumptions and Dependencies


 It is assumed that the network on the user’s
Table 10 Summary of Capabilities
phone will be available every time a user
searches a medicine or pharmacy and even for placing order.
 It is assumed that the user’s location is always enable when using the application to
fetch the data accordingly
 In using the onscreen keyboard, it is assumed that the user is literate and can type.
 As application is dependent on Firebase (real time database) so it requires internet
connectivity to sync data across application.

3.9. Business opportunity

PharmEase
Chapter 3 System Analysis

Normally there is a tradition to visit the Pharmacy manually and ask for the certain medicine,
but in some cases, Pharmacy is running short of those medicines which are required. So, the
customer has to go to other Pharmacies in search of that medicine without knowing exactly
on which Pharmacy he will be successful to find that item and which pharmacies are near or
in that area. So, the it has following drawbacks or disadvantages. It is Time consuming –
searching takes a lot of time and another drawback is Cost consuming as it is not in reach of
distant users.

As the world is growing, development and technology industry is expanding too. Mobile
applications are easy to use so the thought for building up this application is to provide a
solution is intended to develop a platform that will solve all the problems by finding
Pharmacies near us and searching on which store our desired medicine is available.

3.10. Use Case Model


The use case model captures the requirements of a system. Use cases are a means of
communicating with users and other stakeholders what the system is intended to do.

A use case diagram shows the interaction between the system and entities external to the
system. These external entities are referred to as actors. Actors represent roles which may
include human users, external hardware or other systems. A use case is a single unit of

meaningful work. It provides a high-level view of behavior observable to someone or


something outside the system. The notation for a use case is an ellipse.

Use case diagram of Pharmease consist of 3 actors and fourteen use cases. Each use case is
linked with any of the three actors. It described the interaction between the system and actors.

Use Case Diagram


The use case diagram of Mobile App is shown in figure 4.1

PharmEase
Chapter 3 System Analysis

Mobile App Use Case Diagram

Figure 2 Mobile app use case diagram

The use case diagram of Web App for Pharmacist is shown in figure 4.2

PharmEase
Chapter 3 System Analysis

Pharmacist Use Case Diagram

Figure 3 Web App use case (Pharmacist)

PharmEase
Chapter 3 System Analysis

The use case diagram of Web App for Admin is shown in figure 4.3

Admin Use Case Diagram

Figure 4 Web App use case (Admin)

PharmEase
Chapter 3 System Analysis

3.10.1. Actor Goal List

User/ customer
Registration
Social Media Login
Nearest Pharmacies
Medicine Search
Add Prescription
Order placement and Transaction
Amount Calculation
Notifications
Login and Profile Management
Feedback
Settings
Help
Sign Out

Pharmacist
Registration/Login/Sign Out
Add/Remove/Edit Products
Handle Order Request
Order Status Updation
Invoice Generation

Admin
Login/Sign Out
Search
Add/Remove/Edit Products
Add/Remove/Edit Pharmacies
Add/Remove/Edit Pharmacists
Add/Remove/Edit Customers
Add/Remove/Edit Orders
Handle Order Request
Invoice Generation

PharmEase
Chapter 3 System Analysis

3.11. Detailed expanded format

Fully Dressed use cases for Mobile application are as follow

3.11.1. Sign up

UC-001 Sign Up
Scope PharmEase
Primary Actor Customer, Pharmacist
Stakeholder and Interests User wants to signup

Preconditions Allowed internet permission.


Success Guarantee/ Post Conditions Sign in Successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. User signup into application by
entering username and password.
2. Application validates and displays the
login page of mobile application.
Alternate Scenario
2a. If the user is already registered

3. Ask the user to Enter another email or try


logging in with same email.
Frequency High.
Non-Functional Requirements Security, Performance.
Table 11 Use case for sign up

3.11.2. Login
UC-002 Login
Scope PharmEase
Primary Actor Customer, Pharmacist, Admin
Stakeholder and Interests User wants to login
Preconditions: Sign up
Success Guarantee/ Post Conditions: Logged in successfully
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. User log in into application by

PharmEase
Chapter 3 System Analysis

entering username and password.


2. Application validates and logged into
the application.
Alternate Scenario
2a. User enters invalid details
3. Ask user to enter valid details
Frequency High.
Non-Functional Requirements Usability, Performance.
Table 12 Use case for login

3.11.3. Detect Current Location

UC-006 Detect Current Location


Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to detect exact location.

Preconditions User must be logged In.


Success Guarantee/ Post Conditions Location detected Successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. User launches the application.

2. Check if location is enabled or not.

3. Displays current location on the map


and place marker on it.
Alternate Scenario
2n. Location is not enabled

ask the user to turn on the location service.

Enable the location

Frequency Medium.

Non-Functional Requirements Security, Performance.


Table 13 Use case to detect current location

3.11.4. Find Nearest Pharmacies


UC-007 Find Nearest Pharmacies
Scope PharmEase

PharmEase
Chapter 3 System Analysis

Primary Actor User


Stakeholder and Interests User wants to find the nearest pharmacy.

Preconditions User must be logged In and its location is


enabled.
Success Guarantee/ Post Conditions User will get the nearest pharmacies and
the marker will be placed on the map.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. User launches the application.
2. Check if location is enabled or not.

3. Fetch nearest pharmacies according to


the current location.
4. Display pharmacies along with the
details.
Alternate Scenario

2n. Location is not enabled

ask the user to turn on the location service.


Enable the location
Non-Functional Requirements Security, Performance.
Table 14 Use case to find nearby pharmacies

3.11.5. Search Pharmacy via medicine name

UC-008 Search Pharmacy


Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to search medicine before
visiting in order to reduce time wastage.
Preconditions User must be Logged In.
Success Guarantee/ Post Conditions User will get the list of pharmacies having
that searched medicine.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. User add the medicine.

PharmEase
Chapter 3 System Analysis

2. System will search the pharmacy for


the required medicine.
3. Display the list of pharmacies having
that medicine.
Alternate scenario

2n. No pharmacy found in database.

No results will be displayed.

Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 15 Use case for searching pharmacy

3.11.6. Add to Cart

UC-003 Add to Cart


Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to add product into cart.

Preconditions: Login
Success Guarantee/ Post Conditions: Product added successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. User selects add option.

2. Adds product to the cart list and update


the quantity of product and cart.
3. Displays cart to the user.

Frequency: Medium.

Non-Functional Requirements Security, Performance, Serviceability.


Table 16 use case for adding item in cart

3.11.7. Remove from Cart

UC-004 Remove from Cart


Scope PharmEase
Primary Actor User

PharmEase
Chapter 3 System Analysis

Stakeholder and Interests User wants to remove product from cart.

Preconditions Login
Success Guarantee/ Post Conditions Product removed successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. User selects remove option.

2. Removes product from the cart list


and update the quantity of product.
3. Displays the cart to user.

Frequency Medium.
Non-Functional Requirements Security, Performance, Serviceability.
Table 17 Use case for Removing item from cart

3.11.8. Maintain Profile

UC-005 Maintain Profile


Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to maintain profile.

Preconditions Login.
Success Guarantee/ Post Conditions Profile maintained successfully/

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. User clicks Profile.

2. Fetch all the profile details from


database
3. Displays the information

Frequency Medium.
Non-Functional Requirements Security, Performance, Reliability.
Table 17 use case for fetching data for profile

3.11.9. Place Order

PharmEase
Chapter 3 System Analysis

UC-009 Place Order


Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to place order for the medicine
instead of visiting the pharmacy manually.
Preconditions User must be logged in.
Success Guarantee/ Post Conditions Order placed successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. User selects the cart option.
2. Displays the list of items placed in a
cart.
3. Selects place order option.
4. Ask details for confirmation of order.
5. Fill in the details.
6. Confirm order.
7. Order placed successfully.
Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 18 Use case to Place order

3.11.10. Add Prescription

UC-010 Add Prescription

Scope PharmEase
Primary Actor User
Stakeholder and Interests User wants to add prescription of successful
placement of order.
Preconditions Cart should be maintained.
Success Guarantee/ Post Conditions: Add prescription successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Asks for prescription.

PharmEase
Chapter 3 System Analysis

2. Upload prescription.

3. Upload to the server.

Frequency Medium.

Non-Functional Requirements Security, Performance.

Table 19 Use case to add prescription

Fully Dressed Use Cases for Web Portal

Fully Dressed use cases for web portal are as follow:

3.11.14. Add Products/Medicines

UC-003 Add Products/Medicines


Scope PharmEase
Primary Actor Pharmacist
Stakeholder and Interests Pharmacist wants to add product.

Preconditions Login
Success Guarantee/ Post Conditions Product added successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
4. Pharmacist clicks add option.

5. Product added successfully.

6. Pharmacist clicks add option again.

7. The quantity of that item will be updated


instead of making a new entry.
Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 20 Use case for adding medicines

3.11.15. Remove Products/Medicines

UC-004 Remove Products/Medicines

PharmEase
Chapter 3 System Analysis

Scope PharmEase
Primary Actor Pharmacist
Stakeholder and Interests Pharmacist wants to remove product.

Preconditions: Login
Success Guarantee/ Post Conditions: Product removed successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
4. Pharmacist clicks remove option.

5. Product removed successfully.

6. User clicks remove option again.


7. The quantity of that item will be updated
instead of removing a new entry.
Frequency Medium.

Non-Functional Requirements Security, Performance.


Table 21 Use case for removing medicine

Fully Dressed Use Cases for Administrator (Super Admin)

Fully Dressed use cases for administrator are as follow:

3.11.17. Add Pharmacist

UC-002 Add Pharmacist


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to add Moderator.

Preconditions: Login
Success Guarantee/ Post Conditions: Moderator added successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility

PharmEase
Chapter 3 System Analysis

1. Admin clicks add option.

2. Enter all the required details.

3. Moderator added successfully.

4. Admin clicks add option again.

5. The new entry of Moderator will be


added.
Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 22 Use case for adding pharmacist

3.11.18. Remove Pharmacist

UC-003 Remove Moderator


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to remove Moderator.

Preconditions Login
Success Guarantee/ Post Conditions Moderator removed successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Admin clicks remove option.
2. Asks for confirmation.
3. Confirms the action.
4. Delete and update in database.

Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 23 Use case for removing pharmacist

3.11.19. Edit Pharmacist information

PharmEase
Chapter 3 System Analysis

UC-004 Edit Moderator


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to update Moderator.

Preconditions Login
Success Guarantee/ Post Conditions Moderator updated successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Admin clicks edit option.
2. Displays all the details of moderator.

3. Admin edit all the information.

4. Update all the changes in the database.

Frequency Medium.

Non-Functional Requirements Security, Performance, Reliability.


Table 24 Use case for editing pharmacist info

3.11.20. Add User

UC-005 Add Moderator


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to add User.

Preconditions Login
Success Guarantee/ Post Conditions User added successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. Admin clicks add option.

2. Admin enter all the required details.

3. User added successfully.

4. Admin clicks add option again.

PharmEase
Chapter 3 System Analysis

5. The new entry of User will be added.

Frequency Medium.
Non-Functional Requirements Security, Reliability.
Table 25 Use case to add user

3.11.21. Remove User

UC-006 Remove User


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to remove User.

Preconditions: Login
Success Guarantee/ Post Conditions: User removed successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Admin clicks remove option.

2. Asks for confirmation.


3. Confirms the action.
4. Delete and update in database.
Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 26 Use case to remove user

3.11.22. Edit User

UC-007 Edit User


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to update User.

Preconditions Login
Success Guarantee/ Post Conditions User updated successfully.

Main Success Scenario

PharmEase
Chapter 3 System Analysis

Actor’s Action and Intention System Responsibility


1. Admin clicks edit option.

2. Displays all the details of User.

3. Admin edit all the information.

4. Update all the changes in the


database.
Frequency Medium.

Non-Functional Requirements Security, Performance.


Table 27 Use case to edit user info

3.11.23. Add Products / Medicines

UC-008 Add Products


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to add Products.

Preconditions Login
Success Guarantee/ Post Conditions Products added successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Admin clicks add option.

2. Admin enter all the required details.

3. Product added successfully.


4. Admin clicks add option again.

5. The new entry of Product will be


added.
Frequency Medium.
Non-Functional Requirements Reliability, Performance.
Table 28 Use case for adding medicines

3.11.24. Remove Products / Medicines

PharmEase
Chapter 3 System Analysis

UC-009 Remove Products


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to remove Products.

Preconditions Login
Success Guarantee/ Post Conditions Product removed successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. Admin clicks remove option.

2. Asks for confirmation.


3. Confirms the action.
4. Delete and update in database.
5. User clicks remove option again.

6. The quantity of product will be


reduced.
Frequency High.
Non-Functional Requirements Security, Performance.
Table 29 Use case for removing medicine

3.11.25. Edit Products

UC-010 Edit Products


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to update Products.

Preconditions Login
Success Guarantee/ Post Conditions Product updated successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. Admin clicks edit option.

2. Displays all the details of Product.

PharmEase
Chapter 3 System Analysis

3. Admin edit all the information.


4. Update all the changes in the database.

Frequency Medium.
Non-Functional Requirements Security, Performance, Usability.
Table 30 Use case for editing the medicine info

3.11.26. Add Orders

UC-011 Add Orders


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to add Orders.

Preconditions Login
Success Guarantee/ Post Conditions Orders added successfully.

Main Success Scenario


Actor’s Action and Intention System Responsibility
1. Admin clicks add option.
2. Admin enter all the required details.
3. Order added successfully.
4. Admin clicks add option again.

5. The new entry of Order will be added.


Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 31 Use case to add Order

3.11.27. Remove Order

UC-012 Remove User


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to remove Order.

Preconditions Login
Success Guarantee/ Post Conditions Order removed successfully.
Main Success Scenario

PharmEase
Chapter 3 System Analysis

Actor’s Action and Intention System Responsibility


1. Admin clicks remove option.
2. Asks for confirmation.
3. Confirms the action.
4. Delete and update in database.

Frequency Medium.
Non-Functional Requirements Security, Performance.
Table 32 Use case to remove order

Figure 41 Use case for remove Order.

3.11.28 Update Order Status

UC-013 Update Order


Scope PharmEase
Primary Actor Admin
Stakeholder and Interests Admin wants to update Orders.

Preconditions Login
Success Guarantee/ Post Conditions Orders updated successfully.
Main Success Scenario
Actor’s Action and Intention System Responsibility
1. Admin clicks edit option.
2. Displays all the details of Orders.
3. Admin edit all the information.
4. Update all the changes in the database.

Frequency Medium.
Non-Functional Requirements Usability, Performance.
Table 33 Use case to update order status

3.12. System Sequence Diagram


A system sequence diagram (SSD) is a sequence diagram that shows, for a particular scenario
of a use case, the events that external actors generate their order, and possible inter-system
event. System sequence diagrams are visual summaries of the individual use cases.

PharmEase
Chapter 3 System Analysis

3.12.1. Login (Customer, Pharmacist, Admin)

Figure 5 Login Sequence diagram

PharmEase
Chapter 3 System Analysis

3.12.1.2. Sign Up (Customer, Pharmacist)

``Figure 6 Sign up

Figure 43 Sign Up

3.12.1.3. Detect Current Location

Figure 7 Detect current location

PharmEase
Chapter 3 System Analysis

3.12.1.4. Locate Nearby Pharmacies

Figure 8 Locate nearby pharmacies

3.12.1.5. Add Prescription

Figure 9 Add Prescription

PharmEase
Chapter 3 System Analysis

3.12.1.6. Search Medicine

Figure 10 Search medicine

3.12.1.7. Add to Cart

Figure 11 Add to cart

PharmEase
Chapter 3 System Analysis

3.12.1.9. Place Order

Figure 13 Place Order

3.12.1.11. Logout

Figure 15 Logout

PharmEase
Chapter 3 System Analysis

3.12.2.3. Add Product

Figure 18 Add Product

3.12.2.4. Edit Product

Figure 19 Edit Product

PharmEase
Chapter 3 System Analysis

3.12.2.5. Remove Product

Figure 20 Remove Product

3.12.2.6. Update Order

PharmEase
Chapter 3 System Analysis

Figure 21 Update Order

PharmEase
Chapter 3 System Analysis

3.12.2.7. Remove Order

Figure 22 Remove Order

3.12.3.5. Add User

PharmEase
Chapter 3 System Analysis

Figure 28 Add User

3.12.3.6. Edit User

Figure 29 Edit User

3.12.3.7. Remove User

PharmEase
Chapter 3 System Analysis

Figure 30 Remove User

3.12.3.8. Add Pharmacist

Figure 31 Add Pharmacist

PharmEase
Chapter 3 System Analysis

3.12.3.9. Edit Pharmacist

Figure 32 Edit Pharmacist

3.12.3.10. Remove Pharmacist

Figure 33 Remove Pharmacist

PharmEase
Chapter 3 System Analysis

3.13. Domain Model


The Domain Model represent the vocabulary and key concepts of the problem
domain and it identify the relationships among all of the entities within the
scope of the domain.

Figure 36 Domain Model of PharmEase Application

PharmEase
Chapter 4

SYSTEM DESIGN
4.1 System design
Systems design is the process of defining the architecture, components, modules, interfaces,
and data for a system to satisfy specified requirements. Systems design could be seen as the
application of systems theory to product development.

4.2Design Model
4.2.1. Interaction Diagrams (Sequence Diagram)

4.2.1.1. Login
User have to provide a valid email and password in order to successfully log in to the system.
We will first validate the data, if it is according to our requirements or format or not. Then we
pass it to database for further authentication of User.
In the following diagram
 Login and Validate are interfaces
 Database is a class

Figure 37 Login
Chapter 5 Implementation

4.2.1.2. Search Pharmacy by medicine / Pharmacy name


The main functionality of our system is to search the required pharmacy. User is able to
search the pharmacy by entering the name of the medicine. The system will check the data
and format and then pass it to database to get the required results if found any.
User is also able to search the pharmacy by entering the name of the pharmacy. The system
will check the data and format and then pass it to database to get the required results if found
any.
In the following diagram
 Search, Result and Resultpage are interfaces
 Pharmacies is a class

Figure 37 Search Pharmacy by medicine/ pharmacy name

PharmEase
Chapter 5 Implementation

4.2.1.4. Add to cart and Place Order


User is able to add the items (medicines) in the cart. The system will calculate the total
amount of medicine present in the cart and shows it to User, so that the user knows how much
he have to pay once the medicines will arrive. After placing items in the cart user will add
the required order details like Address and Phone number. The system will validate the data
provided and ask for confirmation. On confirmation from the user, the system passes this data
to the Database for further processing by the Pharmacist or the Admin.
In the following diagram
 Cart, order, Medicines and Database are classes

Figure 39 Place Order

PharmEase
Chapter 5 Implementation

4.2.1.5. Add, Remove or Update Pharmacist, Order and Medicines


This sequence diagram is for Admin to Add, Remove or Update the data of Pharmacist. As
the Admin have full control over the system, he is allowed to make any change to the stored
data.
In the following diagram
 Webapp UI and Browser are interfaces
 Database is a class

Figure 40 Add, Remove, Update pharmacist, Order and Medicines

PharmEase
Chapter 5 Implementation

4.2.2 Class Diagram


Class diagram is a type of static structure diagram that describes the structure of a system by
showing the system's classes, their attributes, operations (or methods), and the relationships
among objects or classes.

PharmEase Figure 44 Class Diagram of PharmEase


Chapter 5 Implementation

4.3 Activity Diagram


Activity diagrams are Graphical representations of workflows of stepwise activities and
actions with the support for choice, iteration and concurrency. In the Unified Modeling
Language, activity diagrams can be used to describe the business and operations step by step
workflows of components in a system.
4.3.1. User / Customer

PharmEase

Figure 45 Activity Diagram of Mobile application


Chapter 5 Implementation

Figure 46 Activity Diagram of Mobile Application

PharmEase
Chapter 5 Implementation

4.3.2 Activity Diagram 1  Pharmacist

Figure 47 Activity Diagram of Pharmacist

PharmEase
Chapter 5 Implementation

4.3.3 Activity Diagram 1  Admin

Figure 48 Activity Diagram of Admin

PharmEase
Chapter 5 Implementation

4.4 Data Model

4.4.1. Entity Relationship Diagram:

An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships


between entities in a database. ER diagrams often use symbols to represent different types of
information. Boxes are commonly used to represent entities. Diamonds are normally used to
represent relationships.
Figure 49 ERD of PharmEase

PharmEase
Chapter 5 Implementation

Figure 48 Entity Relationship Diagram of Pharmease

PharmEase
Chapter 5 Implementation

5.3. Component Diagram:


In an integrated modeling language, a component diagram depicts how the components
are put together to create large components or software systems. They are used to describe
the structure of spontaneously complex systems

Figure 50 Component Diagram PharmEase

5.4. Deployment Diagram


Deployment charts are important for visualizing, specifying, documenting embedded, client /
server and distributed systems, and managing systems that can be run by forward and reverse
engineering. Deployment diagram is a special type of class diagram that focuses on the edges
of an organization. Graphically, a deployment map is a set of vertices and curves.

PharmEase
Chapter 5 Implementation

Figure 51 Deployment Diagram PharmEase

PharmEase
Chapter 5

IMPLEMENTATION
Chapter 5 Implementation

5. Implementation
Implementation of the project is given below:
5.1 Development Tools
5.1.1 Mobile Application
The tool used for implementation is:
• Android Studio
• Firebase

5.1.2 Web Application


The tool used for implementation is:
• VS Code
• XAMPP
• Firebase
• Bootstrap

5.2. Reasons for using the above-mentioned Tools

5.2.1. Android Studio

 Reason for using Android Studio is that our application was purely android based and
Android studio is specially made for making an android application.
 Android studio gives you facility to show demo of your xml design.

 Easy connection and integration with dedicated assistants with Firebase, Kotlin and
Google Cloud.

5.2.2. VS Code

 Traditionally, editors have been used to support Windows or Linux or Mac systems.
But the Visual Studio Code is cross-platform. So, it can work on all three platforms.
Also, the code works on all three sites, otherwise the open source and proprietary
software codes are different
 Visual Studio Code has Git integration built-in, which makes it really easy to instantly
see the changes you’re making in your project.
 One of the key features of Visual Studio Code is its great debugging support. VS
Code’s built-in debugger helps accelerate your edit, compile and debug loop.

5.2.3. XAMPP

 You can start and stop the webserver and database with one click.

PharmEase
Chapter 5 Implementation

 Php error reporting is enabled by default, which helps when debugging scripts.

5.2.4. Bootstrap

 Consistency was the fundamental reason for using bootstrap.


 Bootstrap is equipped with responsive layout and it made our web portal quite responsive.
 It facilitates abundant customization.

5.2.5. Firebase
 It is a NoSQL database. Firebase database is fast. Data updates take place in real-time.
 One can sync data offline and store it on NoSQL Firebase real-time database.
 It reduces the cost of app development. It has many free products.

5.5. Pseudo code

Pseudo code is a kind of structured English, written in natural language to describe a set of
rules for the step by step process and operations for problem solving or other calculations.
Pseudo code is considered as planning stage, written ahead of the syntax of corresponding
computer language.

5.5.1 Pseudo code for Register/signup:

BEGIN
IF (first time entry)
{
Open registration form
Fill all fields
Check all fields filled in required format.
IF (all check results == true)
{
connect to firebase(database).
pass queries to database.
DISPLAY “User registered successfully”.
}
ELSE
{
Load registration form
IF (user_name == false)
display retype name message
ENDIF

PharmEase
Chapter 5 Implementation

IF (user_email == false)
display retype a valid email message
ENDIF

IF (user_password == false)
display retype password message
ENDIF

IF (confirm_password == false)
display password is not matching message
ENDIF

IF (phoneno == false)
display retype phone no.
ENDIF
}
ELSE
Login to the application.
END

5.5.2 Pseudo code for Login:


BEGIN
GET Email

GET Password

READ (Entered Email)

READ (EnteredPassword)

IF (Username == EnteredEmail && Password == EnteredPassword)

THEN

PharmEase
Chapter 5 Implementation

Login Successful

ELSE

IF (EnteredEmail is empty)

Error message: “Please enter an email address”

ENDIF

IF (EnteredPassword is empty)

Error message: “Please enter a password”

ENDIF

IF (Username != EnteredEmail)

Error message: “Please enter valid email address”

ENDIF

IF (Password != EnteredPassword)

Error message: “Please enter valid Password”

ENDIF

PRINT Login Failed

ENDIF

END

5.5.3. Pseudo code for Find Nearest Pharmacies:


PharmEase
Chapter 5 Implementation

BEGIN
SELECT home.

DISPLAY home page.

SELECT search pharmacy.

DISPLAY nearest pharmacies details.


IF(islocationEnable || locationPermission)

DISPLAY error message.

ELSE

Fetch pharmacies details from database.

DISPLAY “Successfully pharmacies fetched”.

END

5.5.4. Pseudo code for Search Medicines:

BEGIN
SELECT home.

DISPLAY home page.

SELECT add medicine.

SELECT search pharmacy.

DISPLAY pharmacies having that medicine.


IF(isEmpty )

PharmEase
Chapter 5 Implementation

DISPLAY error message.

ELSE

Fetch pharmacies details from database.

DISPLAY “Successfully pharmacies fetched”.

END

5.5.5. Pseudo code for Place Order:

BEGIN
SELECT cart button.

DISPLAY list of items in cart.

SELECT place order option

GET product name.

GET product id.

GET product price.

GET product quantity.

GET product code.

GET product location.

GET product supplier.

SELECT confirm order option.

DISPLAY order placed successfully message.

PharmEase
Chapter 5 Implementation

IF(invalidentry || isempty)

DISPLAY error message.

ELSE

Store order data in database.

DISPLAY “Successfully data added”.

END

5.5.6. Pseudo code for Add to Cart:

BEGIN
SELECT add.

DISPLAY products page.

GET product name.

GET product id.

GET product price.

GET product quantity.

GET product code.

GET product location.

GET product supplier.

PharmEase
Chapter 5 Implementation

SELECT add button.


IF(invalidentry)

DISPLAY error message.

ELSE

Store product data in database.

DISPLAY “Successfully added product to cart”.

END

5.5.7. Pseudo code for Remove from Cart:

BEGIN
SELECT remove.

DISPLAY products page.

GET product name.

GET product id.

GET product price.

GET product quantity.

GET product code.

GET product location.

GET product supplier.

SELECT remove button.

PharmEase
Chapter 5 Implementation

IF(invalidentry)

DISPLAY error message.

ELSE

Remove product data from database.

DISPLAY “Successfully removed product from cart”.

END

5.5.8. Pseudo code for Logout:


BEGIN
SELECT logout option.

DISPLAY confirmation message.

IF (clickNo)
{

DISPLAY home page.

IF (click yes)

DISPLAY login page.

END

PharmEase
Chapter 6

TESTING
Chapter 6 Testing

6.1 Testing

Software testing is an analysis conducted to provide information about quality of product with
respect to the context in which it is intended to operate. Testing is the process of executing
program with the intent of finding an error.

6.2 Test Cases


A test case is a set of conditions or variables under which a tester determine whether an
application or software is working correctly or not.

6.2.1. LOGIN

Test Case ID: TC-001

Associated Use Case UC-001 Login

Functionality to be Successful Login


Tested:
Actor: Customer, Pharmacist, Admin

Pre-Conditions Customer, Pharmacist or Admin must be registered.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. User click on login System will not System does not Pass.
button, and types its allow the user to allow the user to
right email and wrong login. login.
password.
2. User enters wrong email System will not System does not Pass.
with right password. allow the user to allow the user to
login. login.
3. User enter wrong email System will not System does not Pass.
and wrong password. allow the user to allow the user to
login. login.
4. User enters right email System will not System does not Pass.
and right password. allow the user to allow the user to
login. login.
Post-condition: User logged into system successfully.
Table 38 Test Case for Login

6.2.2. SIGN UP

Test Case ID: TC-002

PharmEase
Chapter 6 Testing

Associated Use Case UC-002 Sign Up

Functionality to be Tested: Successful Sign Up

Actor: Customer, Pharmacist

Pre-Conditions: System must be connected to internet

Sr. No. Action Expected Results Actual Results Pass/Fail

1. User click on sign System will not System will display Pass.
up button, user show the user login the error message
enters existing screen and display that email already
email. error message. exists.
2. User click on sign System will not System will display Pass.
up button, user show the user login the error message
enters email only. screen and display that enter all the
error message. fields to sign up.
3. User click on sign System will show System will show Pass.
up button, user the user login the user login
enters email and screen. screen.
password according
to the format.
Post-condition: User registered into system successfully.
Table 39 Test Case for Sign Up

6.2.3. DETECT CUREENT LOCATION

Test Case ID: TC-003

Associated Use Case UC-003 Detect current location.

Functionality to be Location detected successfully.


Tested:
Actor: User / Customer

Pre-Conditions: User must be logged into system.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Location is not enabled System will not be System will ask Pass.
on the device by the able to detect the user to enable
user. location. location.

2. User did not give the System will not be System will Pass.
permission to access able to detect display the error
current Location. location. message that

PharmEase
Chapter 6 Testing

allow permission
to access the
location.
3. Location in enabled and System will be able System will Pass.
User gave the to detect location. access the
permission to access location.
current Location.
Post-condition: Current location detected successfully.
Table 40 Test Case for Detect Current Location

6.2.4. FIND NEAREST PHARMACIES

Test Case ID: TC-004

Associated Use Case UC-004 Find nearest pharmacies.

Functionality to be Nearest pharmacy found.


Tested:
Actor: User / Customer

Pre-Conditions: User must be logged into system.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Location is not enabled System will not be System will ask Pass.
on the device by the user. able to find nearest the user to enable
pharmacy. location.

2. User did not give the System will not be System will Pass.
permission to access able to detect location display the error
current Location. and could not find the message that allow
nearest pharmacy. permission to
access the location.
3. Location is enabled System will be able to System will access Pass.
and User gave the detect location. the location and
permission to access find the nearest
current Location. pharmacy.
Post-condition: Nearest pharmacy found successfully.
Table 41 Test Case for Find nearest pharmacies

6.2.5. SEARCH MEDICINE

Test Case ID: TC-005

Associated Use Case UC-005 Search medicine.

PharmEase
Chapter 6 Testing

Functionality to be Tested: Medicine found successfully.

Actor: User / Customer

Pre-Conditions: User must be logged into system.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Medicine is not System will display System will Pass.


available on the error message display error
pharmacy. message.

2. Medicine is System will be able to System will be Pass.


available on the search medicine and able to search
pharmacy. display the result. medicine and
display the result.
Post-condition: Medicine found successfully.
Table 42 Test Case for Search Medicine

6.2.6. PLACE ORDER

Test Case ID: TC-006

Associated Use Case UC-005 Order placed.

Functionality to be Order placed successfully.


Tested:
Actor: User / Customer

Pre-Conditions: User must be logged into system.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. User left the fields System will not be System will display Pass.
empty and the able to place order. error message and ask
prescription is the user to place order
uploaded. again.
2. User filled all the System will not be System will display Pass.
fields but the able to place order. error message and ask
prescription is not the user to place
uploaded. order.
3. User filled all the System will be able System will display Pass.

PharmEase
Chapter 6 Testing

fields and the to place order. the message that


prescription is order is placed
uploaded. successfully.
Post-condition: Order placed successfully.
Table 43 Test Case for Place Order

6.2.12. ADD MODERATOR

Test Case ID: TC-002

Associated Use Case UC-002 Add Moderator

Functionality to be Tested: Moderator added Successfully.

Actor: Admin

Pre-Conditions: Admin must be logged in.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Admin click on add System will not allow System will Pass.
button, and left the the admin to add display the error
fields empty. product. message to enter
all the fields.
2. Admin click on add System will allow theSystem will add Pass.
button, and fills all admin to add the the product and
the fields. product. quantity will be
updated.
Post-condition: Moderator added into system successfully.
Table 49 Test Case for Add Moderator

6.2.13. ADD USER

Test Case ID: TC-003

Associated Use Case UC-003 Add User

Functionality to be Tested: User added Successfully.

Actor: Admin

Pre-Conditions: Admin must be logged in.

Sr. No. Action Expected Results Actual Results Pass/Fail

PharmEase
Chapter 6 Testing

1. Admin click on add System will not System will display Pass.
button, and left the allow the admin to the error message to
fields empty. add product. enter all the fields.

2. Admin click on add System will allow System will add the Pass.
button, and fills all the admin to add the product and quantity
the fields. product. will be updated.
Post-condition: User added into system successfully.
Table 50 Test Case for Add User

6.2.14. ADD PRODUCTS

Test Case ID: TC-004

Associated Use Case UC-004 Add Products

Functionality to be Products added Successfully.


Tested:
Actor: Admin, Pharmacist

Pre-Conditions: Admin must be logged in.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Admin click on add System will not allow System will display Pass.
button, and left the the admin to add the error message to
fields empty. product. enter all the fields.

2. Admin click on add System will allow the System will add the Pass.
button, and fills all admin to add the product and quantity
the fields. product. will be updated.
Post-condition: Products added into system successfully.
Table 51 Test Case for Add Products

6.2.15. ADD ORDER

Test Case ID: TC-005

Associated Use Case UC-005 Add Order

Functionality to be Tested: Order added Successfully.

Actor: Admin

Pre-Conditions: Admin must be logged in.

PharmEase
Chapter 6 Testing

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Admin click on add System will not System will display Pass.
button, and left the allow the admin to the error message to
fields empty. add product. enter all the fields.

2. Admin click on add System will allow System will add the Pass.
button, and fills all the the admin to add product and
fields. the product. quantity will be
updated.
Post-condition: Order added into system successfully.
Table 52 Test Case for Add Order

6.2.16. LOGOUT

Test Case ID: TC-006

Associated Use Case UC-006 Logout.

Functionality to be Tested: Logged out of the application successfully.

Actor: Admin, Customer, pharmacist

Pre-Conditions: Admin must be logged into system.

Sr. No. Action Expected Results Actual Results Pass/Fail

1. Admin rejects the Admin will not be able System will redirect Pass.
confirmation of to logged out of the the admin to same
logout system. page.

2. Admin accepts the Admin will be able to System will redirect Pass.
confirmation of logged out of the the admin to login
logout system. page.
Post-condition: Logged out of application successfully.
Table 53 Test Case for Logout

PharmEase
Chapter 6 Testing

PharmEase
Chapter 7

CONCLUSION
Chapter 7 Conclusion

7.1 Conclusion
The following results have been achieved after completing the system and relate back to the
system’s objective. The primary goal we have achieved by doing this project is "learning".
Now we are capable of overcoming problems which we face during making of a system. In
this final year project, I have practiced everything which I have learned during four-year
degree program. This project has built confidence that in future I will never face similar
mistakes to those I face in this project. Pharmease has made possible and easier to find
pharmacies according to their own choice and also it becomes comfortable for administration
regarding manual Pharmacy handling or maintaining the stock and responding to each
customer request.

7.2 Future Enhancements

The scope for future will involve adding more features for customers i.e. online payment,
order tracking, distance calculation between different pharmacies. Yet we are dealing with
pharmacies only within Islamabad, in future we can also take into different cities as per
request.

PharmEase
APPENDIX A

USER MANUAL
Appendix A User Manual

Snapshot 1 Splash screen and home screen

Snapshot 2 1Login and Login with Facebook screen

PharmEase
Appendix A User Manual

Pharmease Mobile Application

PharmEase
Appendix A User Manual

Snapshot 2 Login with Google and Sign up screen

Snapshot 4 Signup and enable location screen

PharmEase
Appendix A User Manual

Snapshot 7 Drawer and registered pharmacies screen

Snapshot 8 Pharmacy's medicines and cart screen


PharmEase
Appendix A User Manual

Snapshot 9 Order details and Signing out confirmation screen

Snapshot 3 Notifications

PharmEase
Appendix A User Manual

Pharmease Pharmacist Panel

Snapshot 12 Pharmacist Dashboard

Snapshot 10 Pharmacist Login

Snapshot 11 Pharmacist Signup

PharmEase
Appendix A User Manual

Snapshot 13 Dashboard Side menu

PharmEase
Appendix A User Manual

Snapshot 14 Pharmacist all medicines page

Snapshot 15 Pharmacist edit medicine page

PharmEase
Appendix A User Manual

Snapshot 16 Pharmease add medicine page

Snapshot 17 Pharmacist all orders page

PharmEase
Appendix A User Manual

Snapshot 18 Pharmacist generate invoice and printing plus downloading

Snapshot 19 Contact information of developers of Pharmease Application

PharmEase
Appendix A User Manual

Generated invoices

Snapshot 20 Invoice for order 1

Snapshot 21 Invoice for order 2

PharmEase
Appendix A User Manual

Web App welcome Page

Snapshot 22 Welcome home page for Pharmease Web Application

Pharmacy Registration

Snapshot 23 Pharmacy registration page

PharmEase
Appendix A User Manual

Admin Portal

PharmEase
Appendix A User Manual

Snapshot 25 Admin Dashboard

Snapshot 26 Admin side panel

PharmEase
Snapshot 27 Admin all medicines page

Snapshot 28 Admin confirmation for deleting a record


Appendix B References

PharmEase
Appendix B References

PharmEase
Appendix B References

Snapshot 5 Admin contact information of developers

PharmEase
Appendix B References

APPENDIX B

REFERENCES

PharmEase
Appendix B References

Reference Websites:
 https://online.visual-paradigm.com
 https://creately.com/blog/diagrams/activity-diagram-tutorial/
 https://firebase-php.readthedocs.io/en/5.6.0/
 https://kotlinlang.org/
 https://firebase.google.com/
 https://developer.android.com/kotlin

PharmEase

You might also like