You are on page 1of 109

Final Year Project Report

PharmaDoc

PROJECT ADVISOR
Arifah Azhar

SUBMITTED BY:
M Adnan Akbar (Team Leader) S2016065025
M Nauman Nasir S2016065032
Asif Arif S2016065024
Jahanzaib Khalid S2016065030

SESSION: 2016-2020

University of Management and Technology


C-II Johar Town Lahore Pakistan
Abstract
PharmaDoc is a platform which guides people about medicines and provides them a facility to buy
medicines online. Customers can place orders of medicines which are important for their health.
This application provide the facility to add medicines in cart, show bills, orders history checkout to
buy medicines. We have developed web portal for admin and pharmacist. Pharmacist can maintain
all medicine records, he can see orders arrived, process them which result in making new sales for
specific order, pharmacist can view sales report against single searched medicine. And admin on
web panel can manage pharmacist. Admin can view sales report against single searched medicine
for weekly, monthly and specific date.
Final Approval

Panel of Examiners

 Head of Department ______________________


Department of Software Engineering
University of Management and Technology
Lahore

 Program Director ( Final Year Projects) ______________________


Department of Software Engineering
University of Management and Technology
Lahore

 Supervisor ______________________
Department of Software Engineering
University of Management and Technology
Lahore

 Co-Supervisor ______________________
(If any)
Acknowledgment

We are grateful to the Almighty ALLAH for the good health and wellbeing that we are working on
this project. A special thanks to the project advisor Miss Arifah Azhar and co-advisors for their
countless hours of guidance, motivation, encouragement and patience during the project. We would
like to acknowledge our department, head of department for proving us the platforms and facilities
required for this project.
Project Title
PharmaDoc
Objective
The main objectives of our project are:
 Customer can search a medicine
 Add medicine to cart
 Check out products form the cart
 Customer can see his order history
 Update profile
 Admin can generate sales reports
 Add new pharmacist
 Process orders
 Manage medicines
 Manage customer orders
Undertaken by
Muhammad Adnan Akbar
Muhammad Nauman Nasir
Jahanzaib Khalid
Asif Arif
Supervised by
Miss Arifah Azhar
Starting Date
15th –February-2019
Completion Date
19th –February-2020
Tools Used
Android studio, Firebase database, Draw.io, visual studio code
Operating System
Windows and Android Devices
Documentation
Microsoft word
Declaration Form

I have carefully examined the documentation of the Final Year Project titled
“PharmaDoc”; and I endorse that this documentation complies with the standards of an
undergraduate level Final Year Project report.

The document has been checked for plagiarism through Turnitin software available in
UMT Library. The similarities of the document are within acceptable range.

Moreover, the accompanying CDs contain PDF of the documentation, as well as the source
code and binaries with user manual and installation guide.

FYP Advisor Name: ______________________________

Signature: __________________ Date: ___________________


REVISION CHART

This section explain the revison and meeting with advisior to complete the project.
Table 1: Revision Chart Table
Version Primary Author(s) Description of Version Date Completed

Elicitation M Nauman Nasir Advice to start elicitation 25/2/18


M Adnan Akbar Read related research papers
Asif Arif To study related apps
Jahanzaib Khalid (MediPlus,OlaDoc) recommended
Advised to study
risks,benefits,difficulties for our
project.

Proposal M Nauman Nasir Advised to update proposal, add new 04//03/19


M Adnan Akbar features, to decide a platform that will
be used for implementation
Jahanzaib Khalid
tools and technologies
To study FLUTTER (a native app for
making application for different OS).
Questionnaire M Adnan Akbar Design questions to ask pharmacists 11/3/19
M Nauman Nasir and public:
Asif Arif
Jahanzaib Khalid After meeting advised to change 14/3/19
questions to add the questions for
groups with no/yes responses to usage
of apps.
Use M Adnan Akbar Use cases designed 9/04/19
cases(Revision 1) M Nauman Nasir After meeting advised to correct
Asif Arif pointed errors in use cases.
To add common and specialized
functionality.
use M Adnan Akbar use cases are redesigned 22/4/19
cases(Revision 2) M Nauman Nasir After meeting advised to find new use
Asif Arif cases and also advised to make high
fidelity prototype of PharmaDoc app.
jahanzaib khalid

Front end M Adnan Akbar Front end screens designed 6/5/19


M Nauman Nasir
Asif Arif
jahanzaib khalid
Version Primary Author(s) Description of Version Date Completed

Sequence M Adnan Akbar After meeting advised to make class 20/5/19


diagrams M Nauman Nasir diagrams
Asif Arif Also discussed different tools to make
diagrams.
jahanzaib khalid
DfD M Adnan Akbar Dfd 0 and 1 designed. 10/6/2019
Asif Arif
M numan Nasir
Revision 1 M Adnan Akbar Revised use extended use cases 23/09/2019
Asif Arif
M numan Nasir
Jahanzaib khalid
Revision 2 M Adnan Akbar Revised ERD diagram 30/08/2019
Asif Arif
Jahanzaib khalid
M numan Nasir
Revision 3 M Adnan Akbar Revised system architecture diagram 09/09/2019
M numan Nasir
Jahanzaib khalid
Revision 4 M Adnan Akbar Revised data dictionary 23/09/2019
Asif Arif
M numan Nasir
Revision 5 M Adnan Akbar Revised test cases 30/09/2019
M numan Nasir
Revision 6 M Adnan Akbar Revised test cases 20/11/2019
Asif Arif
M numan Nasir
Jahanzaib khalid
Revision 7 M Adnan Akbar Revised decision coverage table 18/12/2019
Asif Arif
M numan Nasir
Jahanzaib khalid
Revision 8 M Adnan Akbar Revised RID vs UCID 06/01/2020
M numan Nasir Revised RID vs TCID
Revised UCID vs TID
CONTENTS

Contents 1
Definitions and Acronyms 3
List of Figures 4
List of tables 6
1. Introduction 8
1.1 Motivation 8
1.2 Project Overview 8
1.3 Problem Statement 9
1.4 Objectives 9
2. Domain Analysis 10
2.1 Stakeholders 10
2.2 Affected Groups with social or economic impact 10
2.3 Reference Documents 11
2.3.1 Related Projects 11
2.3.2 Feature Comparison 11
3. Requirements analysis 13
3.1 Requirements 13
3.2 List of Actors 15
3.3 List of use cases 15
3.4 System use case diagram 16
3.5 Use Cases 17
3.6 User interfaces (Mobile end) 36
3.7 User interface (Web end) 40
4. Data flow diagram (optional) 44
4.1 Data Flow Diagram Level 0 44
4.2 Data Flow Diagram Level 1 45
5. System Design 46
5.1 System Architecture Diagram 46
5.2 Class Diagram 47
5.3 Sequence Diagrams 48
5.4 ERD 53
5.5 Data Dictionary 54
6. Implementation details 56
6.1 Development Setup 56

<PharmaDoc> Pharmacy Application V <1.0 > Page | 1


6.2 Deployment setup 56
6.3 Algorithms 57
6.4 Constraints 57
6.4.1 Assumptions 57
6.4.2 System constraints 57
6.4.3 Restrictions 57
6.4.4 Limitations 57
7. Testing 58
7.1 Test Cases 58
7.2 Decision Table 76
7.2.1 Code snippet (mobile end) 76
7.2.2 Code snippet (web end) 81
7.2.3 Decision coverage table 89
7.3 Traceability Matrix 93
7.3.1 RID vs UCID (requirements vs use cases) 93
7.3.2 Test Cases (RID vs TID) 94
7.3.3 Coverage (UCID vs TID) 95
8. Results/Output/Statistics 96
8.1 %completion 96
8.2 %accuracy 96
8.3 %correctness 96
9. Conclusion 97
10. Future work 98
11. Bibliography 99
11.1 Books 99
11.2 Journals 99
11.3 Google references 99
11.4 YouTube references 99
11.5 Designing References 99
12. Appendix 100
12.1 Glossary of terms 100
12.2 Pre-requisites 100

<PharmaDoc> Pharmacy Application V <1.0 > Page | 2


Definitions and Acronyms
Below are the definition of acronyms we have used in the documentation.
Table 2: Table of acronyms and definitions
Acronym Definition
UMT University of Management and Technology
PD PharmaDoc
Info Information
App Application
UC Use Case
TC Test Case
ERD Entity relation diagram
FB Firebase
GUI Graphical user interface
XML eXtensible Markup Language
DC Decision coverage
NA Not available
DB database

<PharmaDoc> Pharmacy Application V <1.0 > Page | 3


List of Figures
Figure 1: Overall system use case diagram ................................................................................... 16
Figure 2: Interface (login) ............................................................................................................. 36
Figure 3: Interface (signup) ........................................................................................................... 36
Figure 4: Interface (home screen).................................................................................................. 36
Figure 5: Interface (forgot password) ............................................................................................ 36
Figure 6: Interface (new password) ............................................................................................... 37
Figure 7: Interface (send email) .................................................................................................... 37
Figure 8: Interface (checkout) ....................................................................................................... 37
Figure 9: Interface (my cart).......................................................................................................... 37
Figure 10: Interface (medicine details).......................................................................................... 38
Figure 11: Interface (edit quantity)................................................................................................ 38
Figure 12: Interface (order history) ............................................................................................... 38
Figure 13: Interface (search medicine) .......................................................................................... 38
Figure 14: Interface (settings) ....................................................................................................... 39
Figure 15: Interface (my profile) ................................................................................................... 39
Figure 16: Interface (medicine details).......................................................................................... 39
Figure 17: Interface (about us) ...................................................................................................... 39
Figure 18: Pharmacist Dashboard page ......................................................................................... 40
Figure 19: Customers Orders page ................................................................................................ 40
Figure 20: Manage medicines page ............................................................................................... 41
Figure 21: Medicine stock report page .......................................................................................... 41
Figure 22: Process order page ...................................................................................................... 42
Figure 23: Total sales page ............................................................................................................ 42
Figure 24: Sale details page........................................................................................................... 43
Figure 25: DFD level 0.................................................................................................................. 44
Figure 26: DFD level 1.................................................................................................................. 45
Figure 27: System architecture diagram ........................................................................................ 46
Figure 28: Class diagram of our system ........................................................................................ 47
Figure 29: Login sequence diagram .............................................................................................. 48
Figure 30: Logout sequence diagram ............................................................................................ 48
Figure 31: Signup sequence diagram ............................................................................................ 49
Figure 32: Go to cart sequence diagram ........................................................................................ 49
Figure 33: Register pharmacist sequence diagram ........................................................................ 50

<PharmaDoc> Pharmacy Application V <1.0 > Page | 4


Figure 34: Search medicine sequence diagram ............................................................................. 50
Figure 35: Add new medicines sequence diagram ........................................................................ 51
Figure 36: Update medicine sequence diagram ............................................................................. 51
Figure 37: Delete medicine sequence diagram .............................................................................. 52
Figure 38: Checkout medicine sequence diagram ......................................................................... 52
Figure 39: System ERD diagram ................................................................................................... 53
Figure 40: Home Activity code snippet......................................................................................... 76
Figure 41: Cart Activity code snippet ........................................................................................... 76
Figure 42: Checkout Activity code snippet ................................................................................... 77
Figure 43: Login activity code snippet .......................................................................................... 77
Figure 44: My orders activity code snippet ................................................................................... 78
Figure 45: Medicine details activity code snippet ......................................................................... 78
Figure 46: User profile Activity code snippet ............................................................................... 79
Figure 47: Recover password activity code snippet ...................................................................... 79
Figure 48: Search medicine Activity code snippet ........................................................................ 80
Figure 49: Signup activity code snippet ........................................................................................ 80
Figure 50: View sale details code snippet ..................................................................................... 81
Figure 51: Update medicine code snippet ..................................................................................... 81
Figure 52: Stock report code snippet ............................................................................................. 82
Figure 53: Side bar code snippet ................................................................................................... 82
Figure 54: Manage medicine code snippet .................................................................................... 83
Figure 55: Pharmacist dashboard code snippet ............................................................................. 83
Figure 56: Firebase database connectivity code snippet ............................................................... 84
Figure 57: Get orders code snippet................................................................................................ 84
Figure 58: Get medicines code snippet ......................................................................................... 85
Figure 59: Generate sales code snippet ......................................................................................... 85
Figure 60: Create sale code snippet ............................................................................................... 86
Figure 61: Add medicines code snippet ........................................................................................ 86
Figure 62: Sales page code snippet ............................................................................................... 87
Figure 63: Update medicine code snippet ..................................................................................... 87
Figure 64: View medicines code snippet....................................................................................... 88
Figure 65: View sales code snippet ............................................................................................... 88

<PharmaDoc> Pharmacy Application V <1.0 > Page | 5


List of tables
Table 1: Revision Chart Table...........................................................................................................
Table 2: Table of acronyms and definitions .................................................................................... 3
Table 3: List of Stakeholders......................................................................................................... 10
Table 4: Feature Comparison ........................................................................................................ 11
Table 5: Functonal and Non-Functional Requirments .................................................................. 13
Table 6: Use Case 1: Customer signup.......................................................................................... 17
Table 7: Use Case 2: Login ........................................................................................................... 19
Table 8: Use Case 3: Search medicine .......................................................................................... 20
Table 9: Use Case 4: Checkout ..................................................................................................... 21
Table 10: Use Case 5: Upload prescription ................................................................................... 23
Table 11: Use Case 6: Add to cart ................................................................................................. 24
Table 12: Use Case 7: Logout ....................................................................................................... 25
Table 13: Use Case 8: Add new Pharmacist.................................................................................. 26
Table 14: Use Case 9: Process order ............................................................................................. 28
Table 15: Use Case 10: Cancel order ............................................................................................ 29
Table 16: Use Case 11: Delete sale ............................................................................................... 30
Table 17: Use Case 12: View sales ............................................................................................... 31
Table 18: Use Caes 13: Add new medicine................................................................................... 32
Table 19: Use Case 14: Update medicines .................................................................................... 33
Table 20: Use Case 15: Delete medicine ....................................................................................... 34
Table 21: Use Case 16: Generate sales reports.............................................................................. 35
Table 22: Data Dictionay............................................................................................................... 54
Table 23: Test Case 01: Signup button testing .............................................................................. 58
Table 24: Test Case 02: signin button testing ............................................................................... 60
Table 25: Test Case 03: Search medicine button testing ............................................................... 61
Table 26: Test Case 04: Checkout button testing .......................................................................... 62
Table 27: Test Case 05: Upload prescription button testing ......................................................... 63
Table 28: Test Case 06: Add to cart button testing ....................................................................... 64
Table 29: Test Case 07: Logout button testing .............................................................................. 65
Table 30: Test Case 08: Add new pharmacit button testing .......................................................... 66
Table 31: Test Case 09: Process order button testing.................................................................... 67
Table 32: Test Case 10: Cancel order button testing ..................................................................... 68
Table 33: Test Case 11: Delete sale button testing........................................................................ 69

<PharmaDoc> Pharmacy Application V <1.0 > Page | 6


Table 34: Test Case 12: View sale button testing ......................................................................... 70
Table 35: Test Case 13: Add medicines button testing ................................................................. 71
Table 36: Test Case 14: Update medicine button testing .............................................................. 73
Table 37: Test Case 15: Delete medicine button testing ............................................................... 74
Table 38: Test Case 16: Generate sales report button testing........................................................ 75
Table 39: Sign up coverage table .................................................................................................. 89
Table 40: Login coverage table ..................................................................................................... 90
Table 41: Checkout coverage table ............................................................................................... 91
Table 42: Add product coverage table........................................................................................... 92
Table 43: RID vs UCID................................................................................................................. 93
Table 44: RID VS TID .................................................................................................................. 94
Table 45: UCID VS TID ............................................................................................................... 95

<PharmaDoc> Pharmacy Application V <1.0 > Page | 7


1. INTRODUCTION

Chapter 1 describes the motivation, overview and problem about the project.

1.1 Motivation
Educating patients about their medications in palliative care could improve compliance to
medications and patients’ quality of life. The rapid increase in spread of deadly diseases in
the world need drastic steps to be taken in technological world to guide people about
medication. Primary healthcare and multidisciplinary models have been suggested as
approaches to deal with this challenge. Daily busy routine, heavy traffic on roads and
environmental factors sometime causes difficulty for people to buy medicines. Sometime
it is difficult to find a specific medicine on medical stores.
This motivated us to design a solution for peoples suffering in this situation. So we decided
to make a mobile application which will help people to buy medicine on single click on
their doorstep. The platform we choose is android mobile because android mobile so
common in today world. By using mobile phone anyone can order medicine anywhere
anytime. Pharmacy will gain economic benefits by attracting customer online using our
system.

1.2 Project Overview


Our application will provide its users about the essential information which a patient must
know before taking that medicine. Sometimes it happens that if a particular medicine is not
available to the patient then he has to make efforts to find that medicine so we have
medicine alternative which will give same results to patient health as with their desired
one. Sometimes its happen that patient forget to buy medicine which is important for their
health condition so our application will provide them a platform from where they can buy
medicine online. They just have to search medicine and mention the quantity of medicine
they want.

Our application customers are those who are conscious for their health. Those who
understands the importance of medicine for their health condition

Pharmacy admins those will have economic benefit from selling medicines online to their
customers.

Our system main goal is to provide patient with accurate information about medicines and
provide them with accurate medicines they like to purchase online.

Patients will be able to know about medicine details like side effects, warnings and
symptoms. Patients would be able to get alternative of medicines. Patients will be able to
buy medicine online from our application.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 8


1.3 Problem Statement

For the peoples who need to buy medicine online, wants home delivery of medicine and
wants to search about medicines to know their attributes likes (price, side effects, uses,
warnings, alternatives, expiry date, manufacturing date, manufacturer etc.) the PharmaDoc
is a mobile application that will provide single point of access to all the above features
unlike the current manual medicine retailing process, our product will generate all reports
required.

1.4 Objectives
Main objective of our system is to provide people with all important information related to
a medicine. Our objective is to make the manual process of retailing medicine online so
that people can buy medicine online without any problem.
 Buy medicine online
 Provide medicine information
 Upload prescriptions to buy medicines
 Process customers’ orders
 Provides sales reports to admin
 Provides orders details to pharmacist
 Provides the facility to manage pharmacists

<PharmaDoc> Pharmacy Application V <1.0 > Page | 9


2. DOMAIN ANALYSIS

Chapter 2 explain the stakeholders, affected groups and features comparisons.

2.1 Stakeholders
Following are the roles of our system those who will be interacting with our system
Table 3: List of Stakeholders
Stakeholder Role in System
Pharmacist He is responsible for managing medicine specifications in the
inventory.
Pharmacist will manage and verify medicine orders and make sales
against the medicine order from customer.
Pharmacy He is responsible to add new pharmacist, he can manage pharmacy sales
admin record, will be able to generate reports.
customer He can search about medicine details and can order medicine online
from pharmacy.

2.2 Affected Groups with social or economic impact


There will be reduced paperwork for them. Also they will be able to provide better
customer care as system will help them respond to queries quickly.
This may include users as well as support groups
● Patients
They will know more about medicine than those who don’t use our application
and they will be able to save their time and money by not going to pharmacy
directly to purchase medicines.
● pharmacy
When a pharmacy is able to deliver the ordered medicine online there will be
reduction in walk in customers in pharmacy which will result in reduction in cost
related to resources used by pharmacy.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 10


2.3 Reference Documents
These are the document and different application we have studied to choose our system features

2.3.1 Related Projects


In order to develop PharmaDoc, we looked up several similar systems. Their details are
given below
1. dawaai.pk
2. Oladoc
3. medicoz
4. Pharmedia.pk

2.3.2 Feature Comparison


Below is features comparisons between different pharmacy applications.
Table 4: Feature Comparison
Sr. Comparison pharmedia.pk oladoc medicoz dawaai remarks
No. Feature

1 Online PharmediaPk Medicine Not available Dawaai offers Online medicine


medicine does not have delivery feature the same delivery is an
delivery online is not available feature. important feature to
medicine in oladoc be added in the
purchase mobile application.
feature
2 Medicine Dose, Oladoc does not Overview, Primary use, Except oladoc all the
basic info overview, covers the indication, composition, application giving
indication, feature interactions, uses, side almost same
contraindicatio contradiction, effects, how attribute of
n, side effects, side effects, to take, medicines.
warnings, high risks, warnings
risk group warnings,
storage, dose

3 Alternatives Not available Not available Alternative of Available If searched medicine


drugs are is not available it is
available and important
feature to show the
alternative of
medicine.
4 Search Search for Search for Search by Search for Searching a
generic or doctors, brand name, medicine , medicine by its name
brand name specialist, generic drugs, disease, is not enough, give
hospital disease health product

<PharmaDoc> Pharmacy Application V <1.0 > Page | 11


user multiple to
search medicine.
5 Add to cart Not available Not available Not available Available Before checkout all
the medicine must be
added to cart. And
customer can edit
medicine in the cart
if needed.
6 Order history Not available Not available Not available Not Available This feature is
important to show
order status to
customers.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 12


3. REQUIREMENTS ANALYSIS

In Chapter 3 analyzed all the requirement for our system, figure out and elaborating all the use
cases.

3.1 Requirements
Following are the function and non-functional requirements of our system
Table 5: Functonal and Non-Functional Requirments
RID” Description Category Attribute Details

FR 1. User signup is Functional Sign up User must enter first & last
compulsory to use name email, password,
system functionality address and phone to get
Account

FR 2 User login is Functional Login User must enter email &


mandatory to use password to get logged in.
system functionalities
FR 3 Customer can search Functional Search Customer must enters
for medicines he wants medicine medicine name to search
to buy
FR 4 Customer buy Functional Check out Customer must have
medicine by checking medicine added in the cart
out from cart. and quantity selected to
check out

FR 5 Customer can buy Functional Upload Uploaded image must be


medicines buy Prescription fulfil the Image format
uploading medicines specified in our system.
prescription
FR 6 Customer can add Functional Add to cart Medicine quantity not null
products in the cart
FR 7 Customer can logout Functional Logout User session will be
form the system destroyed.

FR 8 Admin can register Functional Add new Admin must enter all the
new pharmacist Pharmacist detail needed for registration
process(name, Dob, cell#,
gender)

FR9 Pharmacist can process Functional Process order Order request is conformed
the orders given by the and authenticated.
customers.
FR10 Pharmacist can cancel Functional Cancel order After confirmation
medicine orders pharmacist can cancel order
given by customers

<PharmaDoc> Pharmacy Application V <1.0 > Page | 13


FR11 Pharmacist can delete Functional Delete sale Pharmacist enters sale id to
sale delete the sale

FR12 Pharmacist can view Functional View sale Pharmacist click on a sale to
sale view details.

FR13 Pharmacist can add Functional Add medicine Pharmacist fills the
new medicines to the medicine detail forms
inventory (name, expiry date etc.)

FR14 Pharmacist can Functional Update Pharmacist select a


updated medicines. medicine medicine and refill the form
with updated information

FR15 Pharmacist can delete Functional Delete Pharmacist select a


medicines form the medicine medicine from the searched
inventory result to delete medicine.

FR16 Admin can generate Functional Generate Admin select time interval
sale reports sales reports between which he wants to
generate reports

NFR17 Correctness Non- Medicines System will not allow to


functional stock check order those medicine which
are out of stock.

NFR18 Availability Non- Available System should be available


functional time of 24/7 for users.
system
NFR19 Adaptability Non- Android app Any mobile having android
functional adaptability kitkat or greater version can
run the application.

NFR20 Usability Non- Language People with no training and


functional understanding understanding of English
shall be able to use the
application

NFR21 Security Non- Not allowing Text that must be displayed


functional user to to user should not be modify
change the able by changing the source
text display to code.
him

<PharmaDoc> Pharmacy Application V <1.0 > Page | 14


3.2 List of Actors
3.2 Explains the list of main actor who will interact with our system.
System boundary.
Our application gives information about medicine and provide users to purchase medicine
online.
For example:
Pharmacist: this person will manage medicine in the pharmacy inventory and will process
orders, he will make new sales against orders and he will be responsible for order
confirmation from patient.
Pharmacy admin: he will be responsible for managing accounts and manage sales records,
responsible to add new pharmacists, can generate sales reports (monthly, weekly, between
specific time intervals).
Customer: will be able to search about medicine specifications and make medicine
purchase online

3.3 List of use cases


Following are the use case of our system
1. Customer Registration
2. Login world you have to follow the rules
3. Search medicine
4. Check out hello world you have to follow the rules
5. Upload prescription hello world you have to follow the rules
6. Add to cart hello world you have to follow the rules
7. Logout
8. Add new Pharmacist
9. Process Order
10. Search Order
11. Delete sale
12. View sale
13. Add medicine
14. Update medicine
15. Delete medicine
16. Generate sales reports

<PharmaDoc> Pharmacy Application V <1.0 > Page | 15


3.4 System use case diagram
3.4 shows the overall system use case diagram explaining the roles associated with actors.

Figure 1: Overall system use case diagram


Fig 1 shows the use case diagram for our system. Which actor is assigned which roles? Mandatory
and option use cased.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 16


3.5 Use Cases
3.5 Explains the extended use cases of our system in details.
Table 6: Use Case 1: Customer signup
Table 6 defines the use case how a customer can sign up
Use Case ID: UC 1
Use Case Name: Customer Signup
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer
Description: This use case describe how un-register customer can sign up for new
account.
Trigger: Sign up button on the bottom of login screen
Preconditions: Customer have application installed in mobile.
Post conditions: After successful registration customer would be able to redirect to
home screen.
Normal Flow: 1. Customer will enter first name.
2. Customer will enter last name.
3. Customer will enter Email address.
4. Customer will enter mobile number.
5. Customer will type password
6. Customer will choose gender
7. System registers the new user with the given parameters.
8. System redirects to the customer to Home page after
registration.
Alternative Flows: 1-2a. customer enters digits
[Alternative Flow 1 –
Not in Network] 1. System signal error to the customer
1-2b. customer enters special characters
1. System signal error to the customer.
1-2c. customer leaves the field empty
1. System signal error to the customer.
3a. customer email already exists
1. System signal error to the customer
3b. invalid email
1. System signal error to the customer
4a. invalid mobile number
1. System signal error to the customer

<PharmaDoc> Pharmacy Application V <1.0 > Page | 17


5a. password length less than 6 characters and greater than 10
characters.
1. System signal error to the customer
5b. password field is empty
1. System signal error to the customer
6a. gender not selected
2. System display toast “your gender is male”
Exceptions: Customer does not want to get register and he cancels registration
and use case gets ended.
Includes: NA
Frequency of Use: One time per new customer.
Special Requirements: NA
Assumptions: NA

Notes and Issues: By default selected gender is “male”

<PharmaDoc> Pharmacy Application V <1.0 > Page | 18


Table 7: Use Case 2: Login
Table 7 defines the use case of how a customer can log in
Use Case ID: UC 2
Use Case Name: Login
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer, Admin, Pharmacist
Description: This use case describe the actor’s login process to use system
functionalities.
Trigger: Login button at the bottom of login page.
Preconditions: Actors already register in the system
Post conditions: Actor is redirected to home page
Normal Flow: 1. User will enter email.
2. User will enter password.
3. User click on login button to submit credentials
4. System will redirect the user to the home screen.
Alternative Flows: 1a. invalid email
[Alternative Flow 1 – Not
in Network] 1. System signal error to the customer
1b. email field empty
1. System signal error to the customer
2a. password length less than 8 characters
1. System signal error to the customer
2b. password field is empty
1.System signal error to the customer
2c. password is incorrect
1. System signal error to the customer
Exceptions: User press the back button and use case gets ended.
Includes: Signup
Frequency of Use: Once per session
Special Requirements: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 19


Table 8: Use Case 3: Search medicine
Table 8 define the use case of how customer can search medicines
Use Case ID: UC 3
Use Case Name: Search Medicine
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer
Description: If customer wants to know about a particular medicine information
he needs to search the medicine and system will show the medicine
information to the customer
Trigger: Search medicine input field on home screen
Preconditions: Customer is logged in
Post condition System show medicine details to customer.
Normal Flow: 1. Customer will types medicine name.
2. Click on search button
3. System will search medicines against given details.
4. System will show medicine details in list view.
Alternative Flows: 1a. invalid medicine name
[Alternative Flow 1 –
Not in Network] 1. System signal error to the customer
1b. empty field
1. System signal error “enter medicine name”
Exceptions: Empty fields
Includes: NA
Frequency of Use: At least five times per order.
Special Requirements: NA
Assumptions: System will show medicine information in a time frame of less than
2 seconds.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 20


Table 9: Use Case 4: Checkout
Table 9 describes the use case of how a customer can checkout medicines
Use Case ID: UC 4
Use Case Name: Check out
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer
Description: This use case describes how customer can buy medicines.
Trigger: Checkout icon at top right corner in cart screen.
Preconditions: Medicines already added in cart.
Post conditions: After successful place order user must be notified against the order
he has placed and confirmation must be taken.
Normal Flow: 1. System redirect the customer to checkout screen.
2. System display total payable amount of order including
shipping charges.
3. Customer selects his province
4. Customer selects his city
5. Customer enter his street address
6. Customer enter comments about orders.
7. Customer click on submit order button.
8. System prompt the customer to conform the action.
*per pack or per strip
Alternative Flows: 1a. cart is empty
[Alternative Flow 1 – Not
in Network] 1. System signal error “cart is empty”
3a. province is not selected
1. System signal error to the customer.
4a. city is not selected
1. System signal error to the customer.
5a. street address is empty
1. System signal error to the customer.

Exceptions: Customer press the back button to place order so use case ends
there.
Includes: UC 6
Frequency of Use: One time per order
Special Requirements: NA
Assumptions: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 21


Notes and Issues: What are the Tax law variation on medicine prices?
Whether a customer is allowed to buy medicines without
prescription.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 22


Table 10: Use Case 5: Upload prescription
Table 10 describes the use case of how a customer can upload prescription.
Use Case ID: UC 5
Use Case Upload prescription
Name:
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer
Description: This use case describe the process of how customer can upload a
prescription to buy medicines.
Trigger: Upload prescription card at the bottom of home screen.
Preconditions: Customer must be logged in.
Post Customer order successfully submitted.
conditions:
Normal Flow: 1. Customer click on upload prescription card
2. System will display a dialog box to “open camera” or “choose form
gallery” or “cancel”
3. Customer will upload the prescription image.
4. System will display a toast to customer that “your order is submitted
successfully”
Alternative 2a.Camera not open due to internal system error.
Flows:
[Alternative 1. System signal error to the customer.
Flow 1 – Not in
Network] 2b.Gallery not opened
1. System signal error to the customer.
Exceptions: Hardware not found
Application does not have permission to use system resources
Includes: NA
Frequency of One time per new order
Use:
Special Customer must have camera working in device.
Requirements:Camera and storage permission must be granted to application.
Assumptions: Image size should not be grater then 2 MB

Notes and NA
Issues:

<PharmaDoc> Pharmacy Application V <1.0 > Page | 23


Table 11: Use Case 6: Add to cart
Table 11 describes the use case of how a customer can add medicine in cart
Use Case ID: UC 6
Use Case Add to cart
Name:
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer
Description: This use case describe how customer can add a medicine to cart.
Trigger: Add to cart button at the bottom of product details screen
Preconditions: Medicine is searched
Post Medicines will be successfully added to cart
conditions:
Normal Flow: 1. Customer click on searched medicine name from the list.
2. Customer click on add to cart button.
3. Medicine will be added to the cart.
4. System display toast “added to cart successfully” to customer.
Alternative 2a. medicine already in the cart.
Flows:
[Alternative 1. System signal error to the customer.
Flow 1 – Not in
Network]
Frequency of At least one time per order.
Use:
Includes: UC 3
Special NA
Requirements:
Assumptions: NA
Notes and NA
Issues:

<PharmaDoc> Pharmacy Application V <1.0 > Page | 24


Table 12: Use Case 7: Logout
Table 12 describes the use case of how a customer can logout
Use Case ID: UC 7
Use Case Logout
Name:
Created By: M Adnan Akbar Last Updated By: M Adnan Akbar
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Customer, Pharmacist, Admin.
Description: This use case describe how a use can logout form system.
Trigger: Logout button at the bottom of navigation drawer
Preconditions: User must be signed in
Post User successfully logged out from system and redirected to login page.
conditions:
Normal Flow: 1. User click on logout button
2. System clear user session
3. System redirect the user to login screen.

Alternative 2a. connection failed


Flows: 1.system signal error
[Alternative
Flow 1 – Not in
Network]
Exceptions: NA
Includes: UC 2
Frequency of One time per use session
Use:
Special NA
Requirements:
Assumptions: NA
Notes and NA
Issues:

<PharmaDoc> Pharmacy Application V <1.0 > Page | 25


Table 13: Use Case 8: Add new Pharmacist
Table 13 describes the use case of how admin can add new pharmacist
Use Case ID: UC 8
Use Case Add new pharmacist
Name:
Created By: M Nauman Nasir Last Updated By: M Nauman Nasir
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Admin
Description: This use case describe how admin can add new pharmacist to the system
Trigger: Add new pharmacist button in manage pharmacist tab.
Preconditions: Admin must be logged in
Post New pharmacist is registers successfully to the system
conditions:
Normal Flow: 1. Admin enters pharmacist’s first name
2. Admin enters pharmacist’s last name.
3. Admin enters pharmacist’s Email address.
4. Admin enters pharmacist’s mobile number.
5. Admin enters pharmacist’s address.
6. Admin types pharmacist’s password
7. Admin selects pharmacist’s gender.
8. System registers the new pharmacist with the given details.
Alternative 1-6. Empty fields
Flows:
[Alternative 1. System signals error to admin
Flow 1 – Not in
Network] 1-2a. customer enters digits
1. System signal error to the customer
1-2b. customer enters special characters
1. System signal error to the customer.
3a. customer email already exists
1. System signal error to the customer
3b. invalid email
1. System signal error to the customer
4a. invalid mobile number
1. System signal error to the customer
6a. password length less than 6 characters or greater than 10 characters.
6a. gender not selected
2. System signals error to admin

<PharmaDoc> Pharmacy Application V <1.0 > Page | 26


Exceptions: Admin leaves the page, close app then the use case ended
Includes: NA
Frequency of One time per new pharmacist.
Use:
Special NA
Requirements:
Assumptions: NA
Notes and No gender radio button is selected by default .
Issues:

<PharmaDoc> Pharmacy Application V <1.0 > Page | 27


Table 14: Use Case 9: Process order
Table 14 describes the use case of how a pharmacist can process order
Use Case ID: UC 9
Use Case Name: Process Order
Created By: M Nauman Nasir Last Updated By: M Nauman Nasir
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist
Description: This use case describes how a pharmacist process the orders.
Trigger: Orders link in side bar.
Preconditions: Al least one order is received from customer.
Post conditions: Sale is created and all the medicines will be added in the sale.

Normal Flow: 1. Pharmacist click on orders.


2. System will display all the orders received.
3. Pharmacist click on process order button.
4. System redirect the pharmacist to process order page and display
all the medicines and total in set format.
5. Pharmacist click on submit button.
6. System will generate a sale and add all the medicine in sales.

Alternative Flows: 3a. order already processed


[Alternative Flow 1
– Not in Network] 1. System signal warning “order already proceed”.
Exceptions: NA
Includes: UC 4
Frequency of Use: One time per new order.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 28


Table 15: Use Case 10: Cancel order
Table 15 describes the use case of how a pharmacist can cancel order
Use Case ID: UC 10
Use Case Name: Cancel order
Created By: M Nauman Nasir Last Updated By: M Nauman Nasir
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist
Description: When customer refused to buy order pharmacist can cancel the
order.
Trigger: The Use Case starts when the pharmacist has to cancel order.
Preconditions: Pharmacist must be logged in.
Post conditions: Order will be removed from order list.

Normal Flow: Pharmacist click on order link


System will display all the customer’s orders
Pharmacist click on cancel button to cancel the order.
System will send notification to customer about order status.
Alternative Flows: 1a. notification not send.
[Alternative Flow 1 –
Not in Network] 1. System signal error to pharmacist
Exceptions: Firebase not connected
Includes: UC4
Frequency of Use: One time per new order.
Notes and Issues: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 29


Table 16: Use Case 11: Delete sale
Table 16 describes the use case of how admin can delete a sale
Use Case ID: UC 11
Use Case Delete sale
Name:
Created By: Jahanzaib Khalid Last Updated By: Jahanzaib Khalid
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Admin
Description: This use case describes how admin can delete an existing sale.
Trigger: Delete sales button in sales page.
Preconditions: At least one sales exist in inventory
Post Sale is successfully deleted from the system
conditions:
Normal Flow: 1. Admin click on sale link in side bar
2. System redirect the admin to sale page.
3. Admin click on delete button.
4. System will delete the sale and update the inventory.
Alternative 2a. no sales exist
Flows:
[Alternative 1.System signal message to the admin
Flow 1 – Not in
Network]
Includes: UC 9
Frequency of One time per sale
Use:
Notes and NA
Issues:

<PharmaDoc> Pharmacy Application V <1.0 > Page | 30


Table 17: Use Case 12: View sales
Table 17 describes the use case of how a pharmacist or admin can view sales.
Use Case ID: UC 12
Use Case Name: View Sales
Created By: Jahanzaib Khalid Last Updated By: Jahanzaib Khalid
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist, admin
Description: This use case describe how pharmacist can view sales records.
Trigger: View sales button in sales page.
Preconditions: Al least one sales record exits
Post conditions: Sales detail will be displayed to actor.
Normal Flow: 1. Admin click on sale link in side bar
2. System redirect the admin to sale page.
3. Admin click on view button.
4. System will display the details of sale to the Admin.
Alternative Flows: 2 Records are not available.
[Alternative Flow 1 – Not
in Network] System signal message to the pharmacist.

Exceptions: NA
Includes: UC 9
Frequency of Use: At least one time per sale.
Notes and Issues: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 31


Table 18: Use Caes 13: Add new medicine
Table 18 describes the use case of how a pharmacist can add new medicine
Use Case ID: UC 13
Use Case Name: Add medicine
Created By: Jahanzaib Khalid Last Updated By: Jahanzaib Khalid
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist
Description: This use case describe how pharmacist can add new medicine
Trigger: Add medicine button in medicine tab.
Preconditions: Pharmacist must be logged in
Post conditions: New medicine has been added to the inventory.
Normal Flow: 1. Pharmacist click on add new medicine button.
2. Pharmacist will fill the add medicine form
3. Pharmacist click on add button.
4. System will add new medicine to inventory.

Alternative Flows: 2a. invalid data in fields


[Alternative Flow 1 – Not
in Network] 1.system signal error
2a. empty fields
1.system signal error
Exceptions: Firebase not connected
Frequency of Use: One time per new medicine
Notes and Issues: Free storage must be available in database

<PharmaDoc> Pharmacy Application V <1.0 > Page | 32


Table 19: Use Case 14: Update medicines
Table 19 describes the use case of how a pharmacist can update medicine
Use Case ID: UC 14
Use Case Name: Update medicine
Created By: Asif Arif Last Updated By: Asif Arif
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist
Description: This use case describes how pharmacist can update an existing
medicine
Trigger: Update button in every medicine row at medicine page.
Preconditions: Medicine already exist in inventory.
Post conditions: Medicine information is successfully updated in Inventory.
Normal Flow: 1. Pharmacist click on medicine tab in side bar
2. System will display all the medicine in set format
3. Pharmacist will click on update button.
4. UC 13 will start.
Alternative Flows: 2a. medicine details will not appear
[Alternative Flow 1 – Not
in Network] 1.system signal error

Exceptions: NA
Includes: UC 13
Frequency of Use: More than one time per medicine
Notes and Issues: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 33


Table 20: Use Case 15: Delete medicine
Table 20 describes the use case of how a pharmacist can delete medicine
Use Case ID: UC 15
Use Case Name: Delete medicine
Created By: Asif Arif Last Updated By: Asif Arif
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Pharmacist
Description: This use case describes how pharmacist can delete a medicine
Trigger: Update button in every medicine row at medicine page.
Preconditions: Medicine info already exit in inventory.
Post conditions: Medicine information is successfully updated in Inventory.

Normal Flow: 1. Pharmacist click on medicine tab in side bar


2. System will display all the medicine in set format
3. Pharmacist will click on delete button.
4. System will delete the medicine and update the inventory
Alternative Flows: NA
[Alternative Flow 1 – Not
in Network]

Includes: UC 13
Frequency of Use: One time per medicine
Notes and Issues: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 34


Table 21: Use Case 16: Generate sales reports
Table 21 describes the use case of how admin can view sales reports.
Use Case ID: UC 16
Use Case Name: Generate sales reports
Created By: Asif Arif Last Updated By: Asif Arif
Date Created: May 15,2019 Last Revision Date: January 02,2019
Actors: Admin
Description: This use case describe how admin can generate sales reports
Trigger: Generate sale report button in sale tab
Preconditions: Pharmacy admin will be logged in.
Post conditions: Sale reports and total will be generated and shown to admin.

Normal Flow: 1. Admin click on generate reports button.


2. Admin will select a time interval
3. System will fetch all the sales form DB and display to admin
in set format.
Alternative Flows: 2. no time interval selected
[Alternative Flow 1 – 1.system signal error
Not in Network]

Exceptions: Firebase not connected


Includes: NA
Frequency of Use: Al least one time in a week
Special Requirements: NA
Notes and Issues: NA

<PharmaDoc> Pharmacy Application V <1.0 > Page | 35


3.6 User interfaces (Mobile end)
3.6 shows the interactive mobile application interfaces for customer to interact with use.

Figure 2: Interface (login)


Figure 3: Interface (signup)

Figure 4: Interface (home screen)


Figure 5: Interface (forgot password)

<PharmaDoc> Pharmacy Application V <1.0 > Page | 36


Figure 6: Interface (new password)
Figure 7: Interface (send email)

Figure 8: Interface (checkout)


Figure 9: Interface (my cart)

<PharmaDoc> Pharmacy Application V <1.0 > Page | 37


Figure 10: Interface (medicine details)
Figure 11: Interface (edit quantity)

Figure 12: Interface (order history)


Figure 13: Interface (search medicine)

<PharmaDoc> Pharmacy Application V <1.0 > Page | 38


Figure 14: Interface (settings)
Figure 15: Interface (my profile)

Figure 16: Interface (medicine details)


Figure 17: Interface (about us)

<PharmaDoc> Pharmacy Application V <1.0 > Page | 39


3.7 User interface (Web end)
3.7 includes all the important interfaces of our pharmacy admin penal.

Figure 18: Pharmacist Dashboard page

Figure 19: Customers Orders page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 40


Figure 20: Manage medicines page

Figure 21: Medicine stock report page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 41


Figure 22: Process order page

Figure 23: Total sales page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 42


Figure 24: Sale details page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 43


4. DATA FLOW DIAGRAM (OPTIONAL)

Chapter 4 is about the flow of task between system and users. Which data stores will be needed in
order to complete the required task?

4.1 Data Flow Diagram Level 0

Figure 25: DFD level 0


Fig 25 shows the data flow between system and related entities at basic level

<PharmaDoc> Pharmacy Application V <1.0 > Page | 44


4.2 Data Flow Diagram Level 1
4.2 Depicts the relation of flow of data between entities, processes and data stores.

Figure 26: DFD level 1


Fig 26 shows the detailed flow of data, processes, entities and their associated functions.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 45


5. SYSTEM DESIGN

5.1 System Architecture Diagram


5.1 Explains the system architecture diagram defining how data is transferring among different
layers of our system.

Figure 27: System architecture diagram


Fig 27 show the architecture of mobile app, web panel, web server and database. Also explains
which actor interact the system by which medium.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 46


5.2 Class Diagram
5.2 Explains the class diagram designed for the system.

Figure 28: Class diagram of our system


Fig 28 show relationships between different entities of our system their attributes and the function
associated with each entities.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 47


5.3 Sequence Diagrams
5.3 Explains the important sequence diagrams explaining the sequence of execution of use cases of
our system

Figure 29: Login sequence diagram

Figure 30: Logout sequence diagram

<PharmaDoc> Pharmacy Application V <1.0 > Page | 48


Figure 31: Signup sequence diagram

Figure 32: Go to cart sequence diagram

<PharmaDoc> Pharmacy Application V <1.0 > Page | 49


Figure 33: Register pharmacist sequence diagram

Figure 34: Search medicine sequence diagram

<PharmaDoc> Pharmacy Application V <1.0 > Page | 50


Figure 35: Add new medicines sequence diagram

Figure 36: Update medicine sequence diagram

<PharmaDoc> Pharmacy Application V <1.0 > Page | 51


Figure 37: Delete medicine sequence diagram

Figure 38: Checkout medicine sequence diagram

<PharmaDoc> Pharmacy Application V <1.0 > Page | 52


5.4 ERD
5.4 Explains the ERD of our system.

Figure 39: System ERD diagram


Fig 39 shows all the entities, their roles and relationships of our system.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 53


5.5 Data Dictionary
5.5 Explains is the complete data dictionary of our both mobile and web panel, its tells about the
purpose of attributes and their types.
Table 22: Data Dictionay
Element Name Type Validation Mandatory Remarks
FirstName string Present Yes This is user’s
first name
LastName string Present Yes This is user’s
last name
Email email Present Yes This is user’s
email
Phone numbers Range(11 digit) Yes This is user’s
phone #
Password string Range(11<pass Yes This is user’s
>6) password
Gender string Restricted(male Yes This is user’s
, female) gender
Province string Restricted(punj Yes This is the
ab, sindh) province where
order will be
shipped
City string Restricted(laho Yes This is the city
re,isb, where order
karchi,faisalaba will be shipped
d)
Street string Present Yes This is the street
where order
will be shipped
Comment text NA NO Comment about
order
Search field string Present Yes This is the
medicine name
customer want
to search
Medicine Name string Present Yes This is
medicine name
Batch# string Present Yes This is
medicine batch
#

<PharmaDoc> Pharmacy Application V <1.0 > Page | 54


Manufacturer string Present Yes This is
manufacturer of
medicines
Category string Restricted(table Yes This is category
t, syrup, of medicines
capsule)
Expiry date Date Present Yes Expiry date of
medicine
Potency string Present Yes Potency of
medicines
Manufacturing Date Present Yes This is
date manufacturing
date of
medicine
Quantity Integer Range(quantity Yes This is quantity
> 0) of medicine
available in
inventory
price Double Range(quantity Yes This is price of
> 0) medicine
Uses string Present Yes This is uses of
medicines
Warnings string Present Yes This is
warnings of
medicines
Side effects string Present Yes This is side
effects of
medicines
Order status string Restricted(pend Yes This is the
ing, processed, status of
canceled) customer
medicine order
Total price double Range(total>0) Yes This is the total
price of
customer order
Quantity in cart Integer Range(>0) Yes This is quantity
of medicines in
customer’s cart

<PharmaDoc> Pharmacy Application V <1.0 > Page | 55


6. IMPLEMENTATION DETAILS

6.1 Development Setup


6.1 Section explains the all the technologies we have used in our system.
Firebase
Firebase is google owned online real time database development platform used to store user data.
Data is always online and he can access it form anywhere.
HTML5
HTML5 is a markup language. We are using HTML5 for our web pages structures.
CSS3
CSS is used to enhance beauty of page structure developed in html. We are using CSS for the
designing of the front-end of our website.
Bootstrap
Bootstrap is a CSS framework used to create responsive websites. Its provides lots of built in
classes.
JavaScript
JavaScript is a scripting programming language. It is used to create dynamic content. We are
using JavaScript library JQuery to have a dynamic behavior in our web portal.
Android Studio
Android studio is platform to design android applications. We are using android studio to design
PharmaDoc mobile end Front End Design and backend implementation in JAVA.
JAVA
Java is a popular programming language. We are using java to support application background
functionalities.
Laravel
Laravel is a php based framework. We are using laravel to maintain our admin portal
implementation.
Others Tools: sublime Text, PostMan, and Android Emulator.

6.2 Deployment setup


This section explain the deployment setup needed in order to run the application.
Problems:
 Handling the database
 Database connectivity among laravel and android application.
 Integration of API’s in android studio.
Solutions:
Firebase resolve this problem and provide a good solution of connecting cross platform
application. Web and mobile accessing the same database to manage data.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 56


6.3 Algorithms
For maintain single page application in web panel we have used laravel file inheritance. And in
order to have data across web we have used asynchronous behavior of JavaScript. And in order to
have search records we are filtering records in the bases of names which gives result. And for search
in mobile we are able to search records according to given single alphabet or complete result.

6.4 Constraints
This section states about those external and internal requirements needs to run our system.

6.4.1 Assumptions
 Internet Connection
 User must have valid account to handle all the assigned activities.
 For admin panel user must have windows OS installed and a web browser of open the
website.

6.4.2 System constraints


 Smart device having android OS installed
 Web browser like (Mozilla, chrome)
 Active web server
 Android OS 5.0 or greater to run the application.

6.4.3 Restrictions
 Admin panel will be only accessed by pharmacy personnel with admin rights
 Pharmacy admin cannot do any activity related to managing medicine records.
 Pharmacy admin will not be given rights to deal with orders and sales, but will be given
right to view sales reports.
 Pharmacist cannot update its personal information.

6.4.4 Limitations
 No decision making level SQL query are performed in our project.
 PharmaDoc is not providing disease cure. It just providing medicines details searched by
user.
 We will not actually ship orders because we don’t have the contract with any pharmacy.
 We are not giving the facility of tracking orders.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 57


7. TESTING

7.1 Test Cases


Chapter 7 explains all the test cases of our system.
Table 23: Test Case 01: Signup button testing
Table 23 describe the testing of signup button in the application
Test case ID: TC_01 Test Design by: Muhammad Adnan Akbar
Test Module Name: Signup submit button Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: To test Signup submit Test Executed Date 25/12/2019
button.
Description: Test the signup button in the
application.
Pre-condition: application must be opened.
Dependencies: This process is depends upon the server. If server is down the user is unable to sign-up.

Step Test Step Test Data Expected Actual Status(Pass/ Notes


Result Result Fail)
1 Navigate to signup Pass
page.
2 Click on sign up
button
3 Fill the form First-Name:
according to the Adnan
fields. Last-Name:
Akbar
Email:
Adnan.akbar425
@gmail.com
Pass:111222
Phone-no:
03466144200
Click on the signup The use can The user
submit button create new successfully
account on created new
the firebase account.
database.
3a Empty fields First-Name: “”
Last-Name:””
Email:””
Pass:””
Phone-no:””
Click on the signup System will System signal
submit button signal error error “Empty
fields”
3b Invalid data First-Name: 1257
Last-Name:5874

<PharmaDoc> Pharmacy Application V <1.0 > Page | 58


Click on the signup System will System signal
submit button signal error error “invalid
user name”
3c Invalid email Email:abc.com

Click on the signup System will System signal


submit button signal error error “email
badly
formatted”
3d Invalid phone Phone-no:034655
Click on the signup System will System signal
submit button signal error error “invalid
phone #”
Post Condition successfully register and redirect to login page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 59


Table 24: Test Case 02: signin button testing
Table 24 describe the testing of sign in button in the application
Test case ID: TC_02 Test Design by: Muhammad Nauman Nasir
Test Module Name: Sign in Button Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Nauman Nasir
Test Title/Name: On click Sign in Button Test Executed Date 25/12/2019
Description: To test the sign in submit button
in the application.
Pre-condition: customer must be registered in the system
Dependencies

Step Test Step Test Data Expected Actual Status(Pass/ Notes


Result Result Fail)
1 Navigate to the login Pass
page.
2 Fill the form Email:
Adnan.akbar425
@gmail.com
Pass: adnan123
Click on sign in The user can The user
submit button login to the successfully
application. redirect to
Home page.
2a Empty fields Email :””
Pass: “”
Click on sign in System will System signal
submit button signal error error “enter
email or
password”
2b Invalid email Email:
Adnan.com
Pass: adnan123
Click on sign in System will System signal
submit button signal error error “invalid
email”
Post Condition successfully signed in and redirected to application home page

<PharmaDoc> Pharmacy Application V <1.0 > Page | 60


Table 25: Test Case 03: Search medicine button testing
Table 25 describe the testing of search medicine button in the application
Test case ID: TC_03 Test Design by: Muhammad Adnan Akbar
Test Module Name: Search medicine Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: test search medicine button Test Executed Date 25/12/2019
Description: To test about how the customer
would be get desired medicine search results.
Pre-condition: customer must be logged in.
Dependencies

Step Test Step Test Data Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to home screen. pass
2 Click in search medicine Search Search medicine
editText field. medicine page opened.
page will
open
3 Customer will enter the Name:
name of medicine. Panadol
click on search submit Medicine Medicine is
button name will found and
show to displayed
customer.
3a Empty search field Name:””
click on search submit System will System signal
button signal error error “enter
medicine name”
3b Invalid medicine name Name:1254
click on search submit System will System signal
button signal error error “invalid
medicine name”
Post Condition System successfully present medicine names to the customer against his search

<PharmaDoc> Pharmacy Application V <1.0 > Page | 61


Table 26: Test Case 04: Checkout button testing
Table 26 describe the testing of checkout button in the application
Test case ID: TC_04 Test Design by: Muhammad Nauman Nasir
Test Module Name: checkout button Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Nauman Nasir
Test Title/Name: To test checkout button. Test Executed Date 25/12/2019
Description: To test checkout button in the
application to buy medicines.
Pre-condition: customer must have items in the cart.
Dependencies

Step Test Step Test Data Expected Actual Result Status(P Notes
Result ass/Fail)
Navigate to cart.
1 Enters the item Panadol: Pass
quantity. 1 strip.
2 Click on checkout System will Redirected to
icon. redirect the user checkout page
to checkout
page.
3 Empty cart

4 Click on checkout System will System signal


icon. signal error error “cart is
empty”
5 Fill checkout form Province:
Punjab
City:
Lahore
Street:
Umt hostel
Click on submit button Order will be Your order is
placed successfully
submitted.
5a Empty fields Province:
“”
City:””
Street:””
Click on submit button System will System signal
signal error error “All fields
are mandatory to
fill”
Post Condition Customer order successfully placed.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 62


Table 27: Test Case 05: Upload prescription button testing
Table 27 describe the testing of upload prescription button in the application
Test case ID: TC_05 Test Design by: Muhammad Adnan Akbar
Test Module Name: upload prescription Test Design Date 21/11/2019
button.
Test Priority: medium Test Executed by Muhammad Adnan Akbar
Test Title/Name: To test upload prescription Test Executed Date 25/12/2019
button.
Description: if a customer want to buy some
medicine and does not want to search
medicine through our system, he can upload
medicine prescription.
Pre-condition: customer must be signed in the system to upload prescription.
Dependencies: mobile phone camera must be good to have a clear image.

Step Test Step Test Data Expected Result Actual Result Status( Notes
Pass/Fa
il)
1 Navigate to home screen. pass
2 Click on the upload
prescription button.
3 System display dialog box .
whether to capture or to
select image from gallery.
4 Click on camera Camera App will Camera is
open. opened.
5 Click on choose form Gallery will open. Phone local
gallery. gallery is opened.
6 No image selected Image:””
Click on upload button. System generate Choose at least
error. one picture to
proceed.
6a Select an image Medi.jpeg
Click on upload button. Medicine image Image is uploaded
will be upload and system
redirect the user
to checkout page.
Post Condition

<PharmaDoc> Pharmacy Application V <1.0 > Page | 63


Table 28: Test Case 06: Add to cart button testing
Table 28 describe the testing of add to cart button in the application
Test case ID: TC_06 Test Design by: Muhammad Adnan Akbar
Test Module Name: Add to cart button. Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: To test add to cart button Test Executed Date 25/12/2019
Description: customer can see the medicine
added in the cart buy clicking on cart item go
to cart menu button.
Pre-condition: medicine must be searched before adding in the cart.
Dependencies: search medicine use case.

Step Test Step Test Data Expected Result Actual Result Status( Notes
Pass/Fa
il)
1 Search the medicine pass
2 Click on searched medicine Panadol
3 Scroll down to see add to .
cart button at the bottom of
medicine details Screen.
4 Click on add to cart. Medicine will be in Medicine
the cart successfully
added the cart and
total is calculated.
5 Click on add to cart again System will signal System signal
error error “medicine
already in cart”
Post Condition

<PharmaDoc> Pharmacy Application V <1.0 > Page | 64


Table 29: Test Case 07: Logout button testing
Table 29 describe the testing of logout button in the application
Test case ID: TC_07 Test Design by: Muhammad Adnan Akbar
Test Module Name: Logout button Test Design Date 21/11/2019
Test Priority: Low Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test logout Button Test Executed Date 25/12/2019
Description: Test logout button in the
application.
Pre-condition: customer must be logged in.
Dependencies: NA

Step Test Step Test Data Expected Actual Result Status(P Notes
Result ass/Fail)
Open navigation drawer. pass
1 Clicks on logout button.
2 System will display a
dialog box with cancel or
conform button.
3 Customer click on logout User session User redirect to
button. clear. User login screen.
redirect to
login screen.

4 Customer click on cancel Dialog box Customer is not


button. disappear. logout.
Post Condition system will destroy user session and navigate it to the login page.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 65


Table 30: Test Case 08: Add new pharmacit button testing
Table 30 describe the testing of add new pharmacist button in the application
Test case ID: TC_08 Test Design by: Muhammad Adnan Akbar
Test Module Name: Add new Pharmacist Test Design Date 21/11/2019
Test Priority: Medium Test Executed by Muhammad Adnan Akbar
Test Title/Name: To test add new Pharmacist Test Executed Date 25/12/2019
button.
Description: In order to manage the inventory
pharmacist must be register to our system.
Pre-condition: admin must be login to system to add new pharmacist.
Post-condition: Pharmacist will be registered to Pharmacy system.
Dependencies:

Step Test Step Test Date Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to manage pass
pharmacist tab.
1 Click on register new
pharmacist button.
3 Fill the form Name:
M Adnan
Email:
Adnan.akbar
425@gmail.
com
Address:
Mustufa
town
Password:
Adnan123
Gender:
Male

Click on register submit New New Pharmacist


button. Pharmacist is successfully
will be added. register.
3a Empty fields Name:””
Email:””
Address:””
Password:”
Gender:””
Click on register submit System will System signal
button. signal error error “All the
fields are
mandatory”
Post Condition: new pharmacist will be register to the system.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 66


Table 31: Test Case 09: Process order button testing
Table 31 describe the testing of process order button in the application
Test case ID: TC_09 Test Design by: Muhammad Nauman Nasir
Test Module Name: Process Order button Test Design Date 21/11/2019
Test Priority: high Test Executed by Muhammad Nauman Nasir
Test Title/Name: Test Process order button Test Executed Date 25/12/2019
Description: Test whether the process order
module is working properly.
Pre-condition: There must be an order in the orders list.
Dependencies:
Step Test Step Test Date Expected Result Actual Result Status( Notes
Pass/Fa
il)
1 Navigate to the Orders tab. pass
2 Click on process order System will redirect System redirect
button. to sales page. the pharmacist
to sales page.
3 Click on submit button System will add the System added
order in the sale. the medicine in
the sale
changed the
order status to
“Processed”
Post Condition: Customer order successfully processed.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 67


Table 32: Test Case 10: Cancel order button testing
Table 32 describe the testing of cancel order button in the application
Test case ID: TC_10 Test Design by: Muhammad Adnan Akbar
Test Module Name: Cancel order button Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test cancel order button Test Executed Date 25/12/2019
Description: To test cancel order button in the
pharmacy system application.
Pre-condition: order is searched.
Post-condition: Order will be canceled successfully.
Dependencies:

Step Test Step Test Date Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to Orders Tab. pass
2 Pharmacist click on
cancel order.
3 System prompts the
pharmacist to conform or
cancel.
4 Click on conform. Order will be Order is
deleted canceled
successfully and
order status
changed to
“Canceled”
Post Condition: The order against the order id will be searched and canceled.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 68


Table 33: Test Case 11: Delete sale button testing
Table 33 describe the testing of delete sale button in the application
Test case ID: TC_11 Test Design by: Muhammad Nauman Nasir
Test Module Name: Delete Sale button. Test Design Date 21/11/2019
Test Priority: high Test Executed by Muhammad Nauman Nasir
Test Title/Name: Test delete sale button. Test Executed Date 25/12/2019
Description: To test delete sale button in the
application.
Pre-condition: There must be at least one sale in the system. And sale is searched.
Dependencies:
Step Test Step Test Date Expected Result Actual Result Status(P Notes
ass/Fail)
1 Navigate to sale Tab. pass
2 Click on manage sale System will display System displayed
sales records sale records in set
format
3 Click on delete button in a saleId: Sale will be deleted Sale is deleted
row. 25478 form the system
Post Condition sale will be deleted from the system successfully

<PharmaDoc> Pharmacy Application V <1.0 > Page | 69


Table 34: Test Case 12: View sale button testing
Table 34 describe the testing of view sale button in the application
Test case ID: TC_12 Test Design by: Muhammad Nauman Nasir
Test Module Name: View Sale button. Test Design Date 21/11/2019
Test Priority: high Test Executed by Muhammad Nauman Nasir
Test Title/Name: Test View sale button. Test Executed Date 25/12/2019
Description: To test view sale button in the
application.
Pre-condition: There must be at least one sale in the system. And sale is searched.
Dependencies:
Step Test Step Test Date Expected Result Actual Result Status(P Notes
ass/Fail)
1 Navigate to sale Tab. pass
2 Click on manage sale System will display System displayed
sales records sale records in set
format
3 Click on view button in a saleId: Sale details will be Sales details
row. 25478 displayed displayed to user.
Post Condition Sale details will be successfully shown.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 70


Table 35: Test Case 13: Add medicines button testing
Table 35 describe the testing of add new medicine button in the application
Test case ID: TC_13 Test Design by: Muhammad Adnan Akbar
Test Module Name: Add medicine button Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test add new medicines. Test Executed Date 25/12/2019
Description: To test add new medicine button
in the application.
Pre-condition: Pharmacist must be logged in.
Post-condition: New Medicine will be added to inventory.
Dependencies:

Step Test Step Test Date Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to Medicines Pass
Tab.
2 Click on Add new
medicine.
3 Fill the form. Name:
Panadol
use:
Pain killer
quantity:25
potency:50
mg
category:
tablets
manufactur
er: hamdard
expiry:
15-8-2021
manufDate:
10-6-2019
image:
pand.jpeg
warnings:
Do not take
without
doctor
advice.

Click on add Button Medicine will Medicine


be added to successfully
inventory. added.
3a Empty fields Name:””
use:””
quantity:””
potency:””
category:””

<PharmaDoc> Pharmacy Application V <1.0 > Page | 71


manufactur
er:””
expiry:””
manufDate:
””
image:””
warnings:
“”

Click on add Button System signal System signal


error error “all fields
are mandatory”
Post Condition: The Medicine will be added to the inventory.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 72


Table 36: Test Case 14: Update medicine button testing
Table 36 describe the testing of update medicine button in the application.
Test case ID: 14 Test Design by: Muhammad Adnan Akbar
Test Module Name: Update medicine Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test Update medicines. Test Executed Date 25/12/2019
Description: Test the Update Medicine button
in the application.
Pre-condition: Medicine is exist in the inventory and searched.
Post-condition: Medicine details will be updated in the inventory.
Dependencies:

Step Test Step Test Date Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to medicine pass
tab.
2 Search the medicine System will Searched
show medicine is
searched shown
medicine
3 Fill the form according Name:
the new details. Panadol cf
Price: 200
Click on update button. Medicine Medicines
details will be Details updated
updated. successfully.
3a Empty fields Name:””
Click on update button System will System update
signal error the medicine in
the inventory
Post Condition: Medicine details will be updated successfully.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 73


Table 37: Test Case 15: Delete medicine button testing
Table 37 describe the testing of delete medicine button in the application.
Test case ID: TC_15 Test Design by: Muhammad Adnan Akbar
Test Module Name: Delete medicine Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test Delete medicines. Test Executed Date 25/12/2019
Description: Test the Delete Medicine button
in the application.
Pre-condition: Medicine is exit in the inventory and searched.
Post-condition: Medicine details will be updated in the inventory.
Dependencies:

Step Test Step Test Date Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to medicine pass
tab.
2 Select a medicine form
the searched results.
3 Click on Delete button. Medicine Medicines is
details will be deleted form the
Deleted. system and
inventory
updated.
Post Condition: Medicine will be deleted successfully.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 74


Table 38: Test Case 16: Generate sales report button testing
Table 38 describe the testing of generate sale reports button in the application
Test case ID: TC_16 Test Design by: Muhammad Adnan Akbar
Test Module Name: Generate reports Test Design Date 21/11/2019
Test Priority: High Test Executed by Muhammad Adnan Akbar
Test Title/Name: Test Generate reports Test Executed Date 25/12/2019
Description: Test the Generate reports button
in the application.
Pre-condition: Sales records must be exist in the inventory.
Post-condition: Sales reports will be generated.
Dependencies:

Step Test Step Test Data Expected Actual Result Status(P Notes
Result ass/Fail)
1 Navigate to sales Reports pass
tab.
2 Choose time interval 15/02/2020 Sales records Sales records
to between shown in set
20/02/2020 chosen date format.
will be shown
3 Click on generate reports Sales records Sales records
button between shown in set
chosen date format.
will be shown
4 Invalid date 20/02/2020 System will System signal
To signal error error “choose
ending date”
5 Empty date fields System signal System signal
error error "please
choose date"
Post Condition: Sales reports will be generated successfully.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 75


7.2 Decision_Table
7.2 includes all the code snippets of our systems.

7.2.1 Code snippet (mobile end)


Following are the code snippets of mobile application.

Figure 40: Home Activity code snippet

Figure 41: Cart Activity code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 76


Figure 42: Checkout Activity code snippet

Figure 43: Login activity code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 77


Figure 44: My orders activity code snippet

Figure 45: Medicine details activity code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 78


Figure 46: User profile Activity code snippet

Figure 47: Recover password activity code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 79


Figure 48: Search medicine Activity code snippet

Figure 49: Signup activity code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 80


7.2.2 Code snippet (web end)

Figure 50: View sale details code snippet

Figure 51: Update medicine code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 81


Figure 52: Stock report code snippet

Figure 53: Side bar code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 82


Figure 54: Manage medicine code snippet

Figure 55: Pharmacist dashboard code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 83


Figure 56: Firebase database connectivity code snippet

Figure 57: Get orders code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 84


Figure 58: Get medicines code snippet

Figure 59: Generate sales code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 85


Figure 60: Create sale code snippet

Figure 61: Add medicines code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 86


Figure 62: Sales page code snippet

Figure 63: Update medicine code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 87


Figure 64: View medicines code snippet

Figure 65: View sales code snippet

<PharmaDoc> Pharmacy Application V <1.0 > Page | 88


7.2.3 Decision coverage table
7.2.3 Explains all the possible scenarios that can happen while performing a task on mobile
application.
Table 39: Sign up coverage table
Table 39 explains the complete description of use case “Sign Up”. It describes the complete
process of creating an account on PharmaDoc. User will click on Sign Up button and then he will
fill the registration form. This table describes all the important processes required to Sign Up.

Conditions Rule 1dfg Rule_2 Rule_3 Rule_4 Rule_5 Rule_6


Name Blank Fill Fill Fill Fill Fill
Email ID Blank Blank Fill Fill Fill Valid
Password Blank Blank Blank Fill Fill Valid
Mobile Blank Blank Blank Blank Blank Mobile Format
Number
Actions Error Error Error Error Error Success
message: message: message: message: message: Message.
Fill out Fill out Fill out Fill out Fill out Redirect to
Name, email, Password mobile# Mobile Login page.
email, password, field and Number
redirect the
password, and mobile# field.
use to
and mobile#
redirect the signup redirect the
mobile# field.
use to activity use to signup
field.
redirect the signup activity
redirect use to activity
the use to signup
signup activity
activity
Status FF FF FF FF FF TF

<PharmaDoc> Pharmacy Application V <1.0 > Page | 89


Table 40: Login coverage table
Table 40 explains the complete description of use case “Sign In”. It describes the complete
process of logging in to account on PharmaDoc. User will click on Sign In button and then he
will enter email and password. Then, he will be logged in to the account. This table describes all
the important processes required to Sign In.

Condition Rule_1 Rule_2 Rule_3 Rule_4 Rule_5 Rule_6 Rule_7 Rule_8 Rule_9
s
Email Blank Blank Blank Invalid Invalid Invalid Valid Valid Valid
Password Blank Invalid Valid Blank Invalid Valid Blank Invalid Valid
Error Error Error Error Error Error Error Error Success
Messag Messag Messag Messag Messag Messag Messag Messag Message
e e e e e Login e e e and
Please Please Please Please failed Please Please redirect
Login
enter enter enter enter enter enter to Index
failed
email, email, email valid valid passwo page
Actions pass enter email email rd
(Expecte valid id id
d errors) pass
Show Login Login Login Login Login Login Login Login Index
Page
Status FF FF FF FF FF FF FF FF TF

<PharmaDoc> Pharmacy Application V <1.0 > Page | 90


Table 41: Checkout coverage table
Table 41 explains the complete description of use case “Check out”. It describes the complete
process of check out on PharmaDoc and all the exception that could be occur.

Conditions Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6


Shipping Blank Fill Fill Fill Fill Fill
Address
Email Blank Blank Fill Fill Fill Fill
Mobile Blank Blank Blank Fill Fill Fill
Number
City Blank Blank Blank Blank Fill Fill
country Blank Blank Blank Blank Blank Fill
Actions Error Error Error Error Error Success
message: message: message: message: message: Message
Fill out Fill out Fill out Fill out field, Fill out Redirect to
address, email, mobile# field, city and field home page.
email, mobile# city and country. country.
mobile# field, city country.
Redirect to Redirect to
field, city and country.
Redirect to Checkout Checkout
and
Redirect to Checkout page page
country.
Checkout page
Redirect to page
Checkout
page
Status F F F F F T

<PharmaDoc> Pharmacy Application V <1.0 > Page | 91


Table 42: Add product coverage table
Table 42 explains the complete description of use case “Add medicine”. It describes the complete
process of add new medicine in PharmaDoc.

Conditions Rule 1 Rule 2 Rule 3 Rule 4 Rule 6


Name Blank Fill Fill Fill Fill
Expiry date Blank Blank Fill Fill Fill
Manufactur Blank Blank Blank Fill Fill
ing date
Manufactur Blank Blank Blank Blank Fill
er
Actions Error message: Error message: Error message: Error message: Success Message
Fill out name, Fill out expiry Fill out Fill out Redirect to
expiry date, date, manufacturing manufacturer Manage
manufacturing manufacturing date , field Medicine page.
date , date , manufacturer
Redirect to
manufacturer manufacturer
Redirect to Add Add medicine
Redirect to Add Redirect to Add medicine page. page.
medicine page. medicine page.
Status F F F F T

<PharmaDoc> Pharmacy Application V <1.0 > Page | 92


7.3 Traceability Matrix
7.3 Explains the mapping between requirement, test cases and use cases

7.3.1 RID vs UCID (requirements vs use cases)


In 7.3.1 Section we compare the mapping of requirements over the use cases.
Table 43: RID vs UCID

UCID/ R1 R2 R3 R4 R5 R6 R7 R8 R9 R R R R R R R R R
RID a a a a a a a a a 10 11 12 13 14 15 16 17 18
a a a a a a a a a
UC 1 a  
UC 2 a 
UC 3 a  
UC 4 a 
UC 5 a 
UC 6 a  
UC 7 a 
UC 8 a 
UC 9 a 
UC 10 a 
UC 11 a 
UC 12 a 
UC 13 a 
UC 14 a 
UC 15 a 
UC 16 a 

<PharmaDoc> Pharmacy Application V <1.0 > Page | 93


7.3.2 Test Cases (RID vs TID)
In 7.3.2 section we compare the mapping of requirements over the use cases.
Table 44: RID VS TID

TCID/ R1 R2 R3 R4 R5 R6 R7 R8 R9 R R R R R R R R R
RID f f f f f f 10 11 12 13 14 15 16 17 18
f f f f f f f f f
TC_1 a 
TC_2 a 
TC_3 a  
TC_4 a 
TC_5 a 
TC_6 a 
TC_7 a 
TC_8 a 
TC_9 a 
TC_10 a  
TC_11 a 
TC_12 a 
TC_13 a 
TC_14 a 
TC_15 a 
TC_16 a 

<PharmaDoc> Pharmacy Application V <1.0 > Page | 94


7.3.3 Coverage (UCID vs TID)
In 7.3.3 section we compare the mapping of requirements over the use cases.
Table 45: UCID VS TID

UCID/ U U U U U U U U U U U U U U U U
TCID C C C C C C C C C C C C C C C C
1f 2f 3f 4f 5f 6f 7f 8f 9f 10 11 12 13 14 15 16
f f f f f f f
TC_1 
TC_2 
TC_3 
TC_4 
TC_5 
TC_6 
TC_7 
TC_8 
TC_9 
TC_10 
TC_11 
TC_12 
TC_13 
TC_14 
TC_15 
TC_16 

<PharmaDoc> Pharmacy Application V <1.0 > Page | 95


8. RESULTS/OUTPUT/STATISTICS

Chapter 8 describes the results, accuracy and correctness of our system.

8.1 %completion
We have 16 use cases and 21 requirements in our project. 95% of use cases completes the
requirements of project.

8.2 %accuracy
When Pharmacist or customer is filling form, our application is just validating for empty fields to
till date. Medicines price some time will not accurate some time. Almost 96% of work is accurate.

8.3 %correctness
Application results are 98% accurate.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 96


9. CONCLUSION

Chapter 9 describe the conclusion of overall project.


Internet has given facility to user in many aspects of life like education, transport, social
networking. But there is a gap when people have to know something about medicines, they usually
consult doctors for medicine intake. People feel convenient about buying products online.
PharmaDoc is a platform where patients and those who care about their loved ones life can
understand information of medicines and buy medicine they need. PharmaDoc will give pharmacy
owners a platform on which they can have a better communication level with their customers and
manage activities related to their pharmacy stores efficiently

<PharmaDoc> Pharmacy Application V <1.0 > Page | 97


10. FUTURE WORK

Chapter 10 describe the future work we would like to include in our system.
In future work we have plan about using bar code scanner to add medicine information
automatically to the input fields when we are entering information to the system. When registering
pharmacist in our system we would like to have facility to validate pharmacist information like his
license number and other education information from those institutes. We would like to have gain
access to a source from where users can get authenticated information about medicine which can
help them in their health care routine. One of the important feature we are planning to add in future
is that user can search for medicine to find all the medical store near the user on which that particular
medicine is available.
This feature have some limitation yet. To implement this feature we need database
connection of different pharmacies to access the inventor to see whether a medicine is available or
not. Moreover that pharmacy must have internet connection 24/7. Another problem people face
now a day is find the best doctor for a specific treatment. A specialist doctor can guide or examine
a sickness batter suggest a bust medicine. But people living in backwards areas faces difficulty in
finding the best doctor. So we are planning to implement this feature in our application through
which people can look for best doctor their location, sitting hours and map. This feature will be
proved very useful for the people.

<PharmaDoc> Pharmacy Application V <1.0 > Page | 98


11. BIBLIOGRAPHY

Chapter 11 describes all the references and links we have visit to complete our project.

11.1 Books
1 Software Engineering: A Practitioner's Approach by Roger S. Pressman
2 Software Engineering by Ian Sommerville
3 Beginning Software Engineering by Rod Stephens
4 Fundamentals of Software Engineering by Rajib Mall
5 Software Requirements by Karl Wiegers
6 Agile Project Management with Scrum by Ken Schwaber
7 Human-Computer Interaction by Alan Dix, Janet Finlay, Gregory D. Abowd and Russell
Beale
8 Programming in Python 3: A Complete Introduction to the Python Language by Mark
Summerfield
9 Design pattern, Elements of reusable object oriented programming,

11.2 Journals
1 Community Pharmacy Practice in Pakistan, Nosheen Aslam, Rabia Bushra, Muhammad
Umair Khan Collage of pharmacy , Karachi
2 Application of PHAs in medicine and pharmacy

11.3 Google references


https://stackoverflow.com/

11.4 YouTube references


https://www.youtube.com/watch?v=GC55hTaJp8I&list=PLxefhmF0pcPmK1c4qQS9wr9Zqdj0x_
uLo
https://www.youtube.com/watch?v=YHI-B-kMjXg&list=PLj76U7gxVixQ1JcaOCA7U12SoS8l-
21xU

11.5 Designing References


https://online.visual-paradigm.com/
https://www.lucidchart.com/pages/

<PharmaDoc> Pharmacy Application V <1.0 > Page | 99


12. APPENDIX

Chapter 12 explains the roles of stack holder involved in our system.

12.1 Glossary of terms


Some important glossary terms
Pharmacist: A person manages the medicine, process orders and sales.
Customer: A person who can search or buy medicine.
Laravel: PHP web framework.

12.2 Pre-requisites
Some pre-requisites must be fulfils to use the system.
These are the pre-requisites of this system:
 User must have PC or mobile device
 PC or device must have internet connection

<PharmaDoc> Pharmacy Application V <1.0 > Page | 100

You might also like