0% found this document useful (0 votes)
55 views65 pages

Pharmacy Final Destination

Computer science project

Uploaded by

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

Pharmacy Final Destination

Computer science project

Uploaded by

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

PHARMACY MANAGEMENT SYSTEM

A PROJECT REPORT

Submitted in partial fulfillment of the requirements

for the award of the degree of

Bachelor of commerce (Computer Application)

SUBMITTED BY

THIRUNAVUKARASU.R
(2113141040064)
Under the guidance of

R.Samundeeswari MCA.,MBA.,M.PHIL.,
ASSISTANT PROFESSOR

B.COM COMPUTER APPLICATION

GURU NANAK COLLEGE


(AUTONOMOUS)

Affiliated to University of Madras

Accredited at ‘A++’ Grade by NAAC | An ISO 9001 2015 Certified Institution

Guru Nanak Salai, Velachery, Chennai – 600 042.

MARCH – 2024
GURU NANAK COLLEGE
(AUTONOMOUS)

Affiliated to University of Madras


Accredited at ‘A++’ Grade by NAAC | An ISO 9001 2015 Certified Institution
Guru Nanak Salai, Velachery, Chennai – 600 042.

B.COM COMPUTER APPLICATION

BONAFIDE CERTIFICATE

This is to certify that, this is a bonafide record of work done by THIRUNAVUKARASU.R,


2113141040064 of for the Final Year Project during the Academic Year 2023-24.

PROJECT GUIDE HEAD OF THE DEPARTMENT

Submitted for the Project Viva Voce Examination held on ________________ at GURU

NANAK COLLEGE (Autonomous), Guru Nanak Salai, Velachery, Chennai - 600 042.

Internal Examiner External Examiner


Date: Date:
DECLARATION

I THIRUNAVUKARASU.R (2113141040064) studying III Year Bachelor of Commerce

(Computer Application) at Guru Nanak College (Autonomous), Chennai hereby declare that

this the Report of my Project entitled, PHARMACY MANAGEMENT SYSTEM is the

record of the original work carried out by me under the Guidance and Supervision of

R.Samundeeswari MCA.,MBA.,M.PHIL., towards the partial fulfilment of the

requirements of the award of the Degree of Bachelor of Commerce (Computer

Application). I further declare that this has not been submitted anywhere for the award of

Degree/Diploma or any other similar to this before.

PLACE: CHENNAI THIRUNAVUKARASU.R

DATE: (2113141040064)
ACKNOWLEDGEMENT

I would like to thank the Principal Dr. T. K. Avvai Kothai M.Com., Mphil., Ph.D. and Vice

Principal Dr. Anitha Malisetty MBA., NET., Ph.D. for providing the necessary resources

and facilities for the completion of this project.

I extend my deepest thanks to The Head of Department, Dr. D.Leelavathi M.Com., M.Phil.,

B.Ed., MBA., Ph.D. whose guidance, support, and encouragement were invaluable throughout

this endeavour. Her expertise and insights have been instrumental in shaping this project and

enhancing its quality.

I owe my Guide R.Samundeeswari MCA.,MBA.,M.Phil., AssistantProfessor a debt of

gratitude for his/her invaluable guidance, patience, and encouragement. His/Her mentorship

has been a beacon of light, steering me through the complexities of this project and helping me

realize my potential.

I also like to extend my thanks to the Faculty Members, for their valuable suggestion during

the course of the study of my project. Last but not least, I thank my family and friends for

their unwavering encouragement and understanding during this journey.


TABLE OF CONTENT
S.NO CONTENT
INTRODUCTION 1
1. 2
1.1 ABSTRACT
1.2 OBJECTIVE 3

1.3 BENEFITS 3

2. SYSTEM ANALYSIS 4

2.1 EXISTING SYSTEM 4

2.2 PROPOSED SYSTEM 5

2.3 HARDWARE/ SOFTWARE REQUIREMENT 6

2.4 FEASIBILITY STUDY 8

3. SYSTEM DESIGN 10

3.1 DATABASE DESIGN 12

3.2 TABLE DESIGN 13

3.3 DATA FLOW DIAGRAM 14

4 19
SYSTEM DEVELOPMENT
19
4.1 LANGUAGE / TOOLS
21
4.2 CODING
50
4.3 SAMPLE SCREENSHOT & OUTPUT

5 SYSTEM TESTING AND VALIDATION 55

6 CONCLUSION 58

7 FUTURE ENHANCEMENT 59

8 BIBLIOGRAPHY 60
CHAPTER 1
INTRODUCTION

The main aim of the Pharmacy Management System is the pharmaceutical shop. This project
is insight into the design and implementation of a Pharmacy Management System. This is done
by creating a database of the available medicines in the shop. The primary aim of pharmacy
management system is to improve accuracy and enhance safety and efficiency in the
pharmaceutical store. The Pharmacy Management System Project in Python is a computer
based program for managing, monitoring, and recording medical store activities. Through
automated features, it helps to increase the efficiency of medical stores. It also aids in the
resolution of challenges with manual pharmacy management. The pharmacy management
system, often known as the pharmacy information system, is a system that organizes and
manages the drug usage process within pharmacies by storing data and enabling functionality.
A Pharmacy Management System in Python with Graphical User Interface (GUI) with a
SQLite3 database connectivity in python using Tkinter. A user can add, update, delete, search
medicine details.

1
1.1 ABSTRACT

Pharmacy Management System application to help pharmacist to manage pharmacy in the


systematic ways. Pharmacy Management System can make the work easier by giving the details
of medicine when its name is entered. A computer gives the details of the medicine like rate of
medicine, and expiry date of the medicine. It becomes very difficult in big medical stores to
handle the details of all the medicines manually, so by using this pharmacy management system
We can maintain the records of all the medicines. It is fed with the information whenever new
medicines are brought and it is provided with expire date with search option. When we entire
the name of medicine it gives the details of medicine.

2
1.2 OBJECTIVE

The Pharmacy Management System’s major goal is to keep track of Medicines, Stocks,
Inventory, Pharmacy, and Sales. It keeps track of all information pertaining to Medicines,
Companies, Sales, and Medicines. Because the project is entirely constructed at the
administrative level, only the administrator has access.

1.3 BENEFITS

The pharmacy information system (PIS) is a multi-functional system that helps pharmacists
keep track of drug supplies and organize them. The technology helps to reduce prescription
errors, improve patient safety, track costs, and report drug usage.

3
CHAPTER 2
SYSTEM ANALYSIS

System analysis is the study of sets of interacting entities, including computer systems analysis.
This field is closely related to requirements analysis or operations research. It is also “an
explicit formal inquiry carried out to help someone identify a better course of action and make
a better decision than he might otherwise have made. System Analysis is a methodology that
involves the application of systematic approaches to collects facts about an existing system
with the aim of improving it or replacing it with more efficient system within the context of the
available resources. In other words, System analysis can also be viewed as the process of
investigating a system, identifying problems and using the information to recommend
improvements to the system.

2.1 EXISTING SYSTEM

Before we analyses the design of the proposed system, we need to carefully highlight the
problems of the existing system so as to avoid recurrence. This analysis serves as a pointer on
how to embark on building the proposed system that will help the Pharmacist provide optimal
drug inventory management by monitoring the drug movement and state in the pharmacy. The
problems of the current system should be outlined. Below are some of the problems associated
with the existing system.

• Significant amount of time is allocated for writing the order as the pharmacist needs to
go through the stock balance and make rough estimate for the amount to order based on
Figures.
• The state of drugs in stock is manually checked.
• Mistake of selling expired drugs to customers.
• Too much workload on employees.
• Filing cabinet in the pharmacy with paper record.

4
2.2 PROPOSED SYSTEM

From the problems listed in the existing system, the implementation of the proposed system
shall focus on

• Pharmacists having access to the proposed system at any time.


• Ensuring effective policing by providing statistics of the drugs in stock.
• Improving the efficiency of the system by ensuring effective monitoring of services and
activities.
• Generating report within a specified period of time.
• Reducing the employees workload.

5
2.3 HARDWARE/ SOFTWARE REQUIREMENT

• Server side Requirement

Processor CORE i3
Minimum Hardware
Requirement
Main Memory 4 GB RAM

HDD 80 GB

Minimum Software Operating System Window Server 2003


Requirement
SQ Lite3
Database

Platform Python 3.10

Server Python

Browser Internet Explorer 9.0

6
• Client Side Requirement

Pentium IV
Minimum Hardware
Processor
Requirement
1GB RAM
Main Memory

HDD 4GB

Minimum Software Internet Explorer


Browser
Requirement
Operating system Windows 7 or Higher

7
2.4 FEASIBILITY STUDY
After doing the project Pharmacy Shop Management System, study and analyzing all the
existing or required functionalities of the system, the next task is to do the feasibility study for
the project. All projects are feasible – given unlimited resources and infinite time. During
system analysis the feasibility study of the proposed system is to be carried out. This is to
ensure that the proposed system is not a burden to the company. For feasibility analysis, some
understanding of the major requirements for the system is essential.

Three key considerations in the feasibility analysis are

• ECONOMICAL FEASIBILITY
• TECHNICAL FEASIBILITY
• OPERATIONAL FEASIBILITY

A. Economical Feasibility

This is a very important aspect to be considered while developing a project. We decided the
technology based on minimum possible cost factor.

• All hardware and software cost has to be borne by the organization.


• Overall we have estimated that the benefits the organization is going to receive from
the proposed system will surely overcome the initial costs and the later on running cost
for system.

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

C. Operational Feasibility
No doubt the proposed system is fully GUI based that is very user friendly and all inputs to be
taken all self-explanatory even to a layman. Besides, a proper training has been conducted to
let know the essence of the system to the users so that they feel comfortable with new system.
As far our study is concerned the clients are comfortable and happy as the system has cut down
their loads and doing.

9
CHAPTER 3

SYSTEM DESIGN

Normally, design is performed in the following in the following two steps:

• Primary Design Phase: In this phase, the system is designed at block level. The blocks are
created on the basis of analysis done in the problem identification phase. Different blocks are
created for different functions emphasis is put on minimizing the information flow between
blocks. Thus, all activities which require more interaction are kept in one block.

• Secondary Design Phase: In the secondary phase the detailed design of every block is
performed.

The general tasks involved in the design process are the following:

• Design various blocks for overall system processes.

• Design smaller, compact and workable modules in each block.

• Design various database structures.

• Specify details of programs to achieve desired functionality.

• Design the form of inputs, and outputs of the system.

• Perform documentation of the design.

• System reviews.

10
User Interface Design is concerned with the dialogue between a user and the computer. It is
concerned with everything from starting the system or logging into the system to the eventually
presentation of desired inputs and outputs. The overall flow of screens and messages is called a
dialogue. The following steps are various guidelines for User Interface Design:

• The system user should always be aware of what to do next.

• The screen should be formatted so that various types of information, 8 instructions and
messages always appear in the same general display area.

• Message, instructions or information should be displayed long enough to allow the system
user to read them.

• Use display attributes sparingly. Default values for fields and answers to be entered by the
user should be specified.

• A user should not be allowed to proceed without correcting an error.

• The system user should never get an operating system message or fatal error.

11
3.1 DATABASE DESIGN

The most important aspect of building software systems is database design. The highest level
in the hierarchy is the database. It is a set of inter-related files for realtime processing. It contains
the necessary data for problem solving and can be used by several users accessing data
concurrently. The general objective of database design is to make the data access easy, in
expensive and flexible to the user. Database design is used to define and then specify the
structure of business used in the client/server system. In this project, here used Microsoft SQL
Server as the database to implement the data store part.The most important part in the database
design is the identification of tables to beused.

12
3.2 TABLE DESIGN
PHARMACY RECORDS TABLE

FIELD NAME DATA TYPE CONSTRAINTS

Ref No. NCHAR(12) PRIMARY KEY

Company Name NCHAR(20) -

Type of Medicine NCHAR(3) -

Lot No. NCHAR(5) -

Issue Date NCHAR(8) -

Expiry Date NCHAR(8) -

Uses NCHAR(100) -

Side Effects NCHAR(100) -

Prec & Warnings NCHAR(100) -

Dosage NCHAR(10) -

Medicine Price NCHAR(10) -

Product Qty NCHAR(10) -

13
3.3 DATA FLOW DIAGRAM

A data flow diagram (DFD) is a graphical view of how data is processed in a system in terms
of input and output. It contains some symbol for drawing the data flow diagram. A data flow
diagram is a way of representing a flow of a data of a process or a system. The DFD also
provides information about the inputs and outputs of each entity and the process itself. A data
flow diagram has no control flow, no decision rules and no loops. For each data flow, at least
one of the endpoints must exist in a process. The refined representation of a process can be done
in another data flow diagram, which subdivides this process into sub processes.

SYMBOL DESCRIPTION

DATA FLOW

PROCESS

ENTITY

DATA STORE

14
CONTEXT ANALYSIS DIAGRAM

MEDICINE DETAILS

PHARMACY INVENTORY
MEDICINE
MANAGEMENT MEDICINE
INFORMATION
SYSYTEM DETAILS

15
FIRST DFD DIAGRAM

COMPANY DRUGS
PHARMACY DETAILS DETAILS
MANAGEMENT
SYSTEM
1.0 2.0

INVENTORY SALES AND


MANAGEMENT STOCKS
INVENTORY
MEDICINE DETAILS
4.0 3.0

16
SECOND DFD DIAGRAM

PHARMACY GENERATE PHARMACY


MANAGEMENT REPORT

MEDICINE GENERATE MEDICINE


MANAGEMENT REPORT

STOCKS MANAGEMENT GENERATE STOCKS


PHARMACY
REPORT
MANAGEMENT
SYSTEM

COMPANY GENERATE COMPANY


MANAGEMENT REPORT

INVENTORY GENERATE INVENTORY


MANAGEMENT REPORT

17
FLOWCHART

Client

Request
drugs

Pharmacist

NO Drug YES
availability?

Purchase Sales

Purchase Sales
reports reports

End

18
CHAPTER 4
SYSTEM DEVELOPMENT

4.1 LANGUAGE/TOOLS

PYTHON

Python is an interpreted, object-oriented, high-level programming language with dynamic


semantics. Its high-level built in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for use as a
scripting or glue language to connect existing components together. Python's simple, easy to
learn syntax emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program modularity and code reuse.
The Python interpreter and the extensive standard library are available in source or binary form
without charge for all major platforms, and can be freely distributed.

The Python installers for the Windows platform usually include the entire standard library and
often also include many additional components. For Unix-like operating systems Python is
normally provided as a collection of packages, so it may be necessary to use the packaging
tools provided with the operating system to obtain some or all of the optional components.

Guido van Rossum began working on Python in the late 1980s as a successor to the ABC
programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was released
in 2000 and introduced new features such as list comprehension, cycle- detecting garbage
collection, reference counting, and Unicode support. Python 3.0, released in 2008, was a major
revision that is not completely backward-compatible with earlier versions. Python 2 was
discontinued with version 2.7.18 in 2020. Python consistently ranks as one of the most popular
programming languages.

19
SQLITE3

SQLite is a C library that provides a lightweight disk- based database that doesn't require a
separate server process and allows accessing the database using a nonstandard variant of the
SQL query language. Some applications can use SQLite for internal data storage. It's also
possible to prototype an application using SQLite and then port the code to a larger database
such as PostgreSQL or Oracle.

The sqlite3 module was written by Gerhard Häring. It provides an SQL interface compliant
with the DB-API 2.0 specification described by PEP 249, and requires SQLite 3.7.15 or newer.

20
4.2 SAMPLE CODING

from tkinter import * from PIL

import Image, ImageTk import

random from tkinter import ttk,

messagebox import sqlite3

class Pharmacy:

def _init_(self, root):

self.root = root self.root.title("Pharmacy

Management System")

self.root.geometry("1350x800+0+0")

self.root.resizable(False, False)

self.root.iconbitmap(r"F:\PharmacyManagementSystem
Project\doc.ico")

##### ADDMED VARIABLE ######

self.ref_variable = StringVar() self.addmed_variable

= StringVar()

########## MEDICINE DEPARTMENT VARIABLE ####### self.refno_var

= StringVar() self.companyname_var = StringVar() self.typemed_var =

StringVar() self.medicine_var = StringVar() self.lotno_var = StringVar()

21
self.issuedt_var = StringVar() self.expdt_var = StringVar() self.uses_var =

StringVar() self.sideeffect_var = StringVar() self.warning_var = StringVar()

self.dosage_var = StringVar() self.price_var = StringVar() self.quantity_var =

StringVar()

self.search_by = StringVar() self.search_txt

= StringVar()

######## title animation #########

self.txt = "PHARMACY MANAGEMENT SYSTEM"

self.count = 0 self.text

= "" self.color =

["green"] self.heading

= Label(self.root,

text=self.txt, font=(

"times new roman", 30, "bold"), bg='white', fg="blue", bd=9, relief=RIDGE)

self.heading.pack(side=TOP, fill=X) self.slider() self.heading_color()

# lbltitle=Label(self.root,text=" PHARMACY MANAGEMENT


SYSTEM",bd=11,relief=RIDGE

# ,bg='#7FFFD4',fg='#0020C2',font=('times new
roman',35,'bold'),padx=2,pady=4)

22
# lbltitle.pack(side=TOP,fill=X)

######### pharmacy logo label ####### img1 = Image.open(r"F:\Pharmacy

Management System Project\logo2.jpg") img1 = img1.resize((60, 50),

Image.ANTIALIAS) self.photoimg1 = ImageTk.PhotoImage(img1) b1 =

Button(self.root, image=self.photoimg1, borderwidth=0, bg='grey')

b1.place(x=15, y=8)

###### Top Frame #####


topframe = Frame(self.root, bg='white', bd=10, relief=RIDGE, padx=20)

topframe.place(x=0, y=62, width=1350, height=400)

######## down button frame ####### down_buttonframe =

Frame( self.root, bg='white', bd=10, relief=RIDGE, padx=20)

down_buttonframe.place(x=0, y=462, width=1350, height=60)

###### all buttons ######

add_button = Button(down_buttonframe, text="Medicine Add",


command=self.addmedicine, font=(

"arial", 12, "bold"), width=14, fg="white", bg="darkgreen", bd=3, relief=RIDGE,

activebackground="white", activeforeground="white") add_button.grid(row=0,

column=0)

23
update_button = Button(down_buttonframe, command=self.update_new,
text="UPDATE", font=(

"arial", 13, "bold"), width=14, fg="white", bg="darkblue", bd=3, relief=RIDGE,


activebackground="white", activeforeground="white")
update_button.grid(row=0, column=1)

delete_button = Button(down_buttonframe, text="DELETE", font=("arial", 13,


"bold"), width=13, fg="white", bg="red", bd=3, relief=RIDGE,

activebackground="black", activeforeground="white")

delete_button.grid(row=0, column=2)

reset_button = Button(down_buttonframe, text="RESET",


command=self.clear_new, font=("arial", 13, "bold"), width=12, fg="white",

bg="darkblue", bd=3, relief=RIDGE, activebackground="black",

activeforeground="white") reset_button.grid(row=0, column=3)

exit_button = Button(down_buttonframe, command=self.root.quit, text="EXIT",


font=(

"arial", 13, "bold"), width=10, fg="white", bg="darkblue", bd=3, relief=RIDGE,


activebackground="black", activeforeground="white") exit_button.grid(row=0,
column=4)

24
search_by = Label(down_buttonframe, text="Search By", font=( "arial",

15, "bold"), fg="white", bg="orange", bd=3, padx=3)

search_by.grid(row=0, column=5, sticky=W)

self.search_combo = ttk.Combobox(down_buttonframe, width=12, font=(

"arial", 13, "bold"), state="readonly", textvariable=self.search_by)

self.search_combo["values"] = ("Select Options", "Ref No.")

self.search_combo.grid(row=0, column=6) self.search_combo.current(0)

entry_button = Entry(down_buttonframe, font=("arial", 15, "bold"), fg="black",

bg="grey", bd=3, width=12, relief=RIDGE, textvariable=self.search_txt)

entry_button.grid(row=0, column=7)

search_button = Button(down_buttonframe, text="Search", font=("arial", 13,


"bold"), width=10, fg="white", bg="darkblue", bd=3, relief=RIDGE,

activebackground="white", activeforeground="white",

command=self.search_data) search_button.grid(row=0, column=8)

show_button = Button(down_buttonframe, text="Show All", font=("arial", 13,


"bold"), fg="white", bg="darkblue",

width=10, bd=3, relief=RIDGE, activebackground="white",


activeforeground="white", command=self.fetch_new) show_button.grid(row=0,

column=9)
25
######## left small frame #######
left_smallframe = LabelFrame(topframe, bg='white', bd=10, relief=RIDGE,

padx=20, text="Medicine Information", font=("arial", 13,

"bold"), fg="darkgreen") left_smallframe.place(x=0, y=5, width=790,

height=350)

#### labeling & entry box #########

#1

ref_label = Label(left_smallframe, text="Reference No:", padx=2,pady=4,font=(

"times new roman", 13, "bold"),bg="white") ref_label.grid(row=0,

column=0, sticky=W)

conn = sqlite3.connect(database=r'E:\Pharmacy_management-

systemmaster\pharmacy.db') my_cursor = conn.cursor()

my_cursor.execute("Select Ref_no from pharma") row_01 =

my_cursor.fetchall()

self.ref_combo = ttk.Combobox(left_smallframe, textvariable=self.refno_var,


width=22, font=(

"times new roman", 13, "bold"), state="readonly")

26
self.ref_combo["values"] = ('Select',row_01)

self.ref_combo.grid(row=0, column=1) self.ref_combo.current(0)

#2

company_label = Label(left_smallframe, text="Company Name


:", padx=2,pady=4,font=(

"times new roman", 13, "bold"),bg="white") company_label.grid(row=1,

column=0)

self.company_entry = Entry(left_smallframe,
textvariable=self.companyname_var, width=24, font=( "times

new roman", 13, "bold"), fg="black", bg="white")

self.company_entry.grid(row=1, column=1)

# 3 type_label = Label(left_smallframe, text="Type Of Medicine :", padx=2,

pady=4, font=(

"times new roman", 13, "bold"), bg="white") type_label.grid(row=2,

column=0, sticky=W)

self.type_combo=ttk.Combobox(left_smallframe,

textvariable=self.typemed_var, width=22, font=( "times new roman",

13, "bold"), state="readonly") self.type_combo["values"] = (

27
" Select ", "Tablet", "Capsule", "Injection", "Ayurvedic", "Drops", "Inhales")

self.type_combo.grid(row=2, column=1) self.type_combo.current(0)

#4

medname_label = Label(left_smallframe, text="Medicine Name :", padx=2,


pady=4, font=(

"times new roman", 13, "bold"),bg="white") medname_label.grid(row=3,

column=0, sticky=W)

conn = sqlite3.connect(database=r'E:\Pharmacy_management-

systemmaster\pharmacy.db') my_cursor = conn.cursor()

my_cursor.execute("Select Med_name from pharma") row_02 =

my_cursor.fetchall()

self.medname_combo = ttk.Combobox(left_smallframe,
textvariable=self.medicine_var, width=22, font=( "times

new roman", 13, "bold"), state="readonly")

self.medname_combo["values"] = ('Select',row_02)

self.medname_combo.grid(row=3, column=1)

self.medname_combo.current(0)

#5
28
lot_label = Label(left_smallframe, text=" Lot No. :", padx=2, pady=4, font=(

"times new roman", 13, "bold"), bg="white") lot_label.grid(row=4,

column=0)

self.lot_entry = Entry(left_smallframe, textvariable=self.lotno_var, width=24,


font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.lot_entry.grid(row=4, column=1)

#6

issue_label = Label(left_smallframe, text=" Issue Date :", padx=2, pady=4, font=(


"times new roman", 13, "bold"), bg="white") issue_label.grid(row=5,

column=0)

self.issue_entry = Entry(left_smallframe,
textvariable=self.issuedt_var, width=24, font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.issue_entry.grid(row=5, column=1)

#7

29
exp_label = Label(left_smallframe, text=" Expiry Date :", padx=2, pady=4,
font=(

"times new roman", 13, "bold"), bg="white") exp_label.grid(row=6,

column=0)

self.exp_entry = Entry(left_smallframe, textvariable=self.expdt_var, width=24,


font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.exp_entry.grid(row=6, column=1)

#8

use_label = Label(left_smallframe, text=" Uses :", padx=2, pady=4, font=(

"times new roman", 13, "bold"), bg="white") use_label.grid(row=7, column=0)

self.use_entry = Entry(left_smallframe, textvariable=self.uses_var, width=24,

font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.use_entry.grid(row=7, column=1)

#9
30
sideeffect_label = Label(left_smallframe, text=" Side Effect :", padx=2, pady=4,
font=(

"times new roman", 13, "bold"), bg="white") sideeffect_label.grid(row=8,

column=0)

self.sideeffect_entry = Entry(left_smallframe, textvariable=self.sideeffect_var,


width=24, font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.sideeffect_entry.grid(row=8, column=1)

# 10

warn_label = Label(left_smallframe, text=" Prec & warning:", padx=2, pady=4,


font=(

"times new roman", 13, "bold"), bg="white") warn_label.grid(row=9,

column=0)

self.warn_entry = Entry(left_smallframe,
textvariable=self.warning_var, width=24, font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.warn_entry.grid(row=9, column=1)

# 11

31
dosage_label = Label(left_smallframe, text=" Dosage :", padx=2, pady=4, font=(

"times new roman", 13, "bold"), bg="white") dosage_label.grid(row=0,

column=2)

self.dosage_entry = Entry(left_smallframe,
textvariable=self.dosage_var, width=23, font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.dosage_entry.grid(row=0, column=3)

# 12

price_label = Label(left_smallframe, text=" Tablet Price :", padx=2, pady=4,


font=(

"times new roman", 13, "bold"), bg="white") price_label.grid(row=1,

column=2)

self.price_entry = Entry(left_smallframe, textvariable=self.price_var, width=23,


font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.price_entry.grid(row=1, column=3)

# 13

32
qt_label = Label(left_smallframe, text=" Tablet Quantity :", padx=2, pady=4,
font=(

"times new roman", 13, "bold"), bg="white") qt_label.grid(row=2,

column=2)

self.qt_entry = Entry(left_smallframe, textvariable=self.quantity_var, width=23,


font=(

"times new roman", 13, "bold"), fg="black", bg="white")

self.qt_entry.grid(row=2, column=3)

######## image in left small frame #####

# image 1 self.bg = ImageTk.PhotoImage(file=r"F:\Pharmacy

Management System

Project\lab.jpg") lbl_bg = Label(left_smallframe,

image=self.bg) lbl_bg.place(x=410, y=160,

width=170, height=150)

# image 2 self.bgg = ImageTk.PhotoImage(file=r"F:\Pharmacy Management

System

Project\inject.jpg") lbl_bgg = Label(left_smallframe,

image=self.bgg) lbl_bgg.place(x=580, y=160,

width=160, height=150)

33
# save life label save_bgg = Label(left_smallframe, text="----------- Stay Home

Stay Safe --------

---", font=("arial", 13, "bold"), bg='white',

fg="green") save_bgg.place(x=370, y=120,

width=400)

############ right frame ######### right_frame = LabelFrame(topframe,

bg='white', bd=10, relief=RIDGE, padx=5, text="Medicine Add department",

font=("arial", 13, "bold"), fg="green") right_frame.place(x=846, y=5,

width=452, height=350)

# image & label

# image 1 self.bg1 = ImageTk.PhotoImage(file=r"F:\Pharmacy Management

System

Project\virus.jpeg") lbl_bg1 =

Label(right_frame, image=self.bg1)

lbl_bg1.place(x=0, y=0, width=220, height=90)

# image 2 self.bg2 = ImageTk.PhotoImage(file=r"F:\Pharmacy Management

System Project\medi.png") lbl_bg2 = Label(right_frame, image=self.bg2)

lbl_bg2.place(x=220, y=0, width=200, height=90)

34
#### label & entry in right frame ####

# 1 no_label = Label(right_frame, text="Reference No:",

font=(

"times new roman", 11, "bold"), bg="white") no_label.place(x=0,

y=105)

self.no_entry = Entry(right_frame, textvariable=self.ref_variable, width=16,


font=(

"times new roman", 11, "bold"), bg="white") self.no_entry.place(x=100,

y=105)

# 2 med_label = Label(right_frame, text="Med. Name:",

font=(

"times new roman", 11, "bold"), bg="white") med_label.place(x=0,

y=130)

self.med_entry=Entry(right_frame, textvariable=self.addmed_variable,
width=16, font=(

"times new roman", 11, "bold"), bg="white") self.med_entry.place(x=100,

y=130)

#### in right frame small frame #####

35
newframe = Frame(right_frame, bg='darkgreen', bd=5, relief=RIDGE)

newframe.place(x=256, y=160, width=150, height=150)

###### button in this frame ### add_button = Button(newframe, text="Add",


font=("arial", 13, "bold"), width=13, fg="white", bg="green",

bd=3, command=self.AddMed, relief=RIDGE, activebackground="black",


activeforeground="white") add_button.grid(row=0, column=0)

updatenew_button = Button(newframe, text="Update", font=("arial", 13, "bold"),

width=13, fg="white", bg="darkblue", bd=3, command=self.Update_med,

relief=RIDGE, activebackground="black", activeforeground="white")

updatenew_button.grid(row=1, column=0)

delnew_button = Button(newframe, text="Delete", font=("arial", 13, "bold"),


width=13, fg="white", bg="red", bd=3, relief=RIDGE,
activebackground="black", activeforeground="white",
command=self.Delete_med) delnew_button.grid(row=2, column=0)

clr_button = Button(newframe, text="Clear",


command=self.clear_med, font=("arial", 13, "bold"), width=13, fg="white",
bg="orange", bd=3, relief=RIDGE, activebackground="black",

activeforeground="white") clr_button.grid(row=3, column=0)

36
##### scrollbar frame in right frame ####
side_frame = Frame(right_frame, bd=4, relief=RIDGE, bg="dark green")

side_frame.place(x=0, y=160, width=250, height=150)

### scrollbar code ###

sc_x = ttk.Scrollbar(side_frame, orient=HORIZONTAL) sc_y

= ttk.Scrollbar(side_frame, orient=VERTICAL)

self.medicine_table = ttk.Treeview(side_frame, column=(

"ref", "medname"), xscrollcommand=sc_x.set, yscrollcommand=sc_y.set)

sc_x.pack(side=BOTTOM, fill=X) sc_y.pack(side=RIGHT, fill=Y)

sc_x.config(command=self.medicine_table.xview)

sc_y.config(command=self.medicine_table.yview)

self.medicine_table.heading("ref", text="Ref")

self.medicine_table.heading("medname", text="Medicine Name")

self.medicine_table["show"] = "headings" self.medicine_table.pack(fill=BOTH,

expand=1) self.medicine_table.column("ref", width=100)

self.medicine_table.column("medname", width=100)

37
self.medicine_table.bind("<ButtonRelease-1>", self.medget_cursor)

self.fetch_datamed()

######### down frame ####### down_frame = Frame(self.root,

bg='white', bd=10, relief=RIDGE) down_frame.place(x=0, y=522,

width=1350, height=212)

########## scrollbar in down frame ######## scroll_frame =

Frame(down_frame, bd=2, relief=RIDGE, bg="white")

scroll_frame.place(x=0, y=0, width=1330, height=192)

##### scrollbar code ##### scroll_x = ttk.Scrollbar(scroll_frame,

orient=HORIZONTAL) scroll_y = ttk.Scrollbar(scroll_frame,

orient=VERTICAL) self.info_table = ttk.Treeview(scroll_frame, column=("ref

no", "comp name", "type", "medi name", "lot no", "issue", "exp",

"uses", "side effect", "warning", "dosage", "price", "product"),


xscrollcommand=scroll_x.set, yscrollcommand=scroll_y.set)
scroll_x.pack(side=BOTTOM, fill=X) scroll_y.pack(side=RIGHT, fill=Y)

scroll_x.config(command=self.info_table.xview)

scroll_y.config(command=self.info_table.yview)

self.info_table.heading("ref no", text="Ref No.")

self.info_table.heading("comp name", text="Company Name")


38
self.info_table.heading("type", text="Type Of Medicine")

self.info_table.heading("medi name", text="Medicine Name")

self.info_table.heading("lot no", text="Lot No.")

self.info_table.heading("issue", text="Issue Date")

self.info_table.heading("exp", text="Expiry Date")

self.info_table.heading("uses", text="Uses") self.info_table.heading("side

effect", text="Side Effects") self.info_table.heading("warning",

text="Prec & Warning") self.info_table.heading("dosage",

text="Dosage") self.info_table.heading("price", text="Medicine Price")

self.info_table.heading("product", text="Product Qt.")

self.info_table["show"] = "headings" self.info_table.pack(fill=BOTH, expand=1)

self.info_table.column("ref no", width=100)

self.info_table.column("comp name", width=100)

self.info_table.column("type", width=100)

self.info_table.column("medi name", width=100)

self.info_table.column("lot no", width=100)

self.info_table.column("issue", width=100)

self.info_table.column("exp", width=100)

self.info_table.column("uses", width=100) self.info_table.column("side

39
effect", width=100) self.info_table.column("warning", width=100)

self.info_table.column("dosage", width=100)

self.info_table.column("price", width=100)

self.info_table.column("product", width=100)

self.info_table.bind("<ButtonRelease-1>", self.get_cursor)

self.fetch_new()

####### MEDICINE ADD FUNCTIONALITY DECLARATION ####### def


AddMed(self):

if self.ref_variable.get() == "" or self.addmed_variable.get() == "":

messagebox.showerror("Error", "All fields are required")

else:

conn = sqlite3.connect(database=r'E:\Pharmacy_management-

systemmaster\pharmacy.db') my_cursor = conn.cursor()

my_cursor.execute("Insert into pharma(Ref_no,Med_name) values(?,?)", (

self.ref_variable.get(), self.addmed_variable.get(),)) conn.commit()

self.fetch_datamed() conn.close()

messagebox.showinfo("Success", "MEDICINE ADDED")

def fetch_datamed(self):
40
conn = sqlite3.connect(database=r'E:\Pharmacy_management-
systemmaster\pharmacy.db')
my_cursor = conn.cursor()

my_cursor.execute("select * from pharma") rows

= my_cursor.fetchall()

if len(rows) != 0:

self.medicine_table.delete(*self.medicine_table.get_children())

for i in rows:

self.medicine_table.insert("", END, values=i)

conn.commit() conn.close()

###### for show data on click #####

def medget_cursor(self, event=""):

cursor_row = self.medicine_table.focus() content

= self.medicine_table.item(cursor_row) row =

content["values"] self.ref_variable.set(row[0])

self.addmed_variable.set(row[1])

41
def Update_med(self):

if self.ref_variable.get() == "" or self.addmed_variable.get()=="":

messagebox.showerror("Error", "Ref No. and med name is required")

else: try:

conn = sqlite3.connect(database=r'pharmacy.db') my_cursor

= conn.cursor()

my_cursor.execute("Update pharma set Med_name=? where Ref_no=?", (

self.addmed_variable.get(),

self.ref_variable.get() ))

conn.commit() messagebox.showinfo("Update", "Successfully Updated",

parent=self.root) self.fetch_datamed() conn.close() except Exception as e:

messagebox.showerror("Error",f"Error due to:{str(e)}",parent=self.root)

def Delete_med(self): if

self.ref_variable.get()=="":

messagebox.showerror("Error","Ref no is required",parent=self.root) else:

try:

42
conn=sqlite3.connect(database=r'E:\Pharmacy_management-
systemmaster\pharmacy.db') my_cursor=conn.cursor()

my_cursor.execute("Delete from pharma where Ref_no=?


",(self.ref_variable.get(),)) conn.commit()

messagebox.showinfo("Delete","Successfully Deleted",parent=self.root)

self.fetch_datamed() except Exception as e:

messagebox.showerror("Error",f"Error due to:{str(e)}",parent=self.root)

def clear_med(self): self.ref_variable.set("")

self.addmed_variable.set("") ########

MEDICINE DEPARTMENT

FUNCTIONALITY #######

def addmedicine(self):

if self.refno_var.get() == "" or self.lotno_var.get() ==


"" or self.typemed_var.get() == "":

messagebox.showerror("Error","All fields are required") else:

conn=sqlite3.connect(database=r'E:\Pharmacy_management-
systemmaster\pharmacy.db') new_cursor=conn.cursor()

new_cursor.execute("Insert
intoInformation(REF_NO,COMPANY_NAME,TYPE_OF_MED,MED_NAMe,
LOT_NO,ISSUE_DT,EXP_DT,USES,SIDE_EFFECT,PRECAUTION,DOSAG
E,PRICE,QUANTITY) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",(
43
self.refno_var.get(),

self.companyname_var.get(),

self.typemed_var.get(),

self.medicine_var.get(),

self.lotno_var.get(),

self.issuedt_var.get(),

self.expdt_var.get(), self.uses_var.get(),

self.sideeffect_var.get(),

self.warning_var.get(),

self.dosage_var.get(),

self.price_var.get(),

self.quantity_var.get(),

))

conn.commit() self.fetch_new()

messagebox.showinfo("Success","Successfully added")

def fetch_new(self):

conn=sqlite3.connect(database=r'E:\Pharmacy_management-

systemmaster\pharmacy.db') new_cursor=conn.cursor()

new_cursor.execute("select * from Information")

row=new_cursor.fetchall()
44
if len(row)!=0:

self.info_table.delete(*self.info_table.get_children())

for i in row:

self.info_table.insert("",END,values=i)

conn.commit()

def get_cursor(self,event=""):

cursor_row=self.info_table.focus()

content=self.info_table.item(cursor_row)

row=content["values"] self.refno_var.set(row[0])

self.companyname_var.set(row[1])

self.typemed_var.set(row[2])

self.medicine_var.set(row[3])

self.lotno_var.set(row[4])

self.issuedt_var.set(row[5])

self.expdt_var.set(row[6])

self.uses_var.set(row[7])

self.sideeffect_var.set(row[8])

self.warning_var.set(row[9])

self.dosage_var.set(row[10])

self.price_var.set(row[11])

self.quantity_var.set(row[12])
45
def update_new(self)

if self.refno_var.get() == "" or self.lotno_var.get() ==


"" or self.typemed_var.get() == "":

messagebox.showerror("Error","All fields are required") else:

conn=sqlite3.connect(database=r'E:\Pharmacy_management-
systemmaster\pharmacy.db') new_cursor=conn.cursor()

new_cursor.execute("Update Information set


COMPANY_NAME=?,TYPE_OF_MED=?,MEDNAME=?,LOT_NO=?,ISSU
E_DT=?,EXP_DT=?,USES=?,SIDE_EFFECT=?,PRECAUTION=?,DOSAGE=
?,PRICE=?,QUANTITY=? where REF_NO=?",(

self.companyname_var.get(),

self.typemed_var.get(),

self.medicine_var.get(),

self.lotno_var.get(), self.issuedt_var.get(),

self.expdt_var.get(), self.uses_var.get(),

self.sideeffect_var.get(),

self.warning_var.get(),

self.dosage_var.get(), self.price_var.get(),

self.quantity_var.get(),

self.refno_var.get(),

))

conn.commit() self.fetch_new()

46
self.clear_new() messagebox.showinfo("Success","Successfully

updated")

def clear_new(self): self.refno_var.set("")

self.companyname_var.set("")

self.typemed_var.set("")

self.medicine_var.set("")

self.lotno_var.set("")

self.issuedt_var.set("")

self.expdt_var.set("")

self.uses_var.set("")

self.sideeffect_var.set("")

self.warning_var.set("")

self.dosage_var.set("")

self.price_var.set("")

self.quantity_var.set("")

def search_data(self):

conn=sqlite3.connect(database=r'E:\Pharmacy_management-

systemmaster\pharmacy.db') new_cursor=conn.cursor() selected =

self.search_combo.get() if selected == "Select Options":

messagebox.showerror("Error","You have to choose an option")


47
else:

new_cursor.execute("Select * from Information where


REF_NO=?",(self.search_txt.get(),))
row=new_cursor.fetchone()

if len(row)!=0:

self.info_table.delete(*self.info_table.get_children())

for i in row: self.info_table.insert("",END,values=i)

conn.commit()

def slider(self): if

self.count>=len(self.txt):

self.count=-1 self.text=""

self.heading.config(text=self.text)

else:

self.text=self.text+self.txt[self.count]

self.heading.config(text=self.text)

self.count+=1

self.heading.after(200,self.slider) def

heading_color(self):

fg=random.choice(self.color)

self.heading.config(fg=fg)

48
self.heading.after(100,self.heading_c

olor)

if _name_ == '_main_':

root=Tk() obj=Pharmacy(root)

root.mainloop()

49
4.3 SAMPLE SCREENSHOT & OUTPUT

PHARMACY MANAGEMENT SYSTEM FORM DESIGN

50
ADD MEDICINE FORM

51
ADD MEDICINE FORM

52
SQL LITE3 EDITOR

53
OUTPUT

54
CHAPTERR 5
SYSTEM TESTING AND VALIDATIONS:

It essential provides several diagramming tools that can express different aspects/
characteristics of program such as Use cases: Elicit requirement from users in meaningful
chunks. Construction planning is built around delivering some use cases n each interaction
basis for system testing. Class diagrams: shows static structure of concepts, types and class.
Concepts how users think about the world; type shows interfaces of software components;
classes shows implementation of software components. Interaction diagrams: shows how
several objects collaborate in single use case. Package diagram: show group of classes and
dependencies among them. State diagram: show how single object behaves across many use
cases. Activity diagram: shows behavior with control structure. Can show many objects over
many uses, many object in single use case, or implementations methods encourage parallel
behavior, etc.

System testing of software or hardware is testing conducted on a complete, integrated system


to evaluate the system's compliance with its specified requirements. System testing
falls within the scope of black-box testing, and as such, should require no knowledge of the
inner design of the code or logic. As a rule, system testing takes, as its input, all of the
"integrated" software components that have passed integration testing and also the software
system itself integrated with any applicable hardware system(s). The purpose of integration
testing is to detect any inconsistencies between the software units that are integrated together
(called assemblages) or between any of the assemblages and the hardware. System testing is a
more limited type of testing; it seeks to detect defects both within the "inter-assemblages" and
also within the system as a whole.

55
• TESTING THE WHOLE SYSTEM

System testing is performed on the entire system in the context of a Functional Requirement
Specification(s) (FRS) and/or a System Requirement Specification (SRS). System testing tests
not only the design, but also the behavior and even the believed expectations of the customer.
It is also intended to test up to and beyond the bounds defined in the software/hardware
requirements specification(s).

The term implementation has different meanings ranging from the conversation of a basic
application to a complete replacement of a computer system. The procedures however, are
virtually the same. Implementation includes all those activities that take place to convert from
old system to new. The new system may be totally new replacing an existing manual or
automated system or it may be major modification to an existing system. The method of
implementation and time scale to be adopted is found out initially. Proper implementation is
essential to provide a reliable system to meet organization requirement.

• UNIT TESTING

In computer programming, unit testing is a software testing method by which individual units
of source code, sets of one or more computer program modules together with associated control
data, usage procedures, and operating procedures, are tested to determine whether they are fit
for use. Intuitively, one can view a unit as the smallest testable part of an application. In
procedural programming, a unit could be an entire module, but it is more commonly an
individual function or procedure. In object-oriented programming, a unit is often an entire
interface, such as a class, but could be an individual method. Unit tests are short code fragment
created by programmers or occasionally by white box testers during the development process.
It forms the basis for component testing. Ideally, each test case is independent from the others.
Substitutes such as method stubs, mock objects, fakes, and test harnesses can be used to assist
testing a module in isolation. Unit tests are typically written and run by software developers to
ensure that code meets its design and behaves as intended.

56
• BLACK BOX

Black Box Testing is a software testing method in which the internal


structure/design/implementation of the item being tested is not known to the tester. Only the
external design and structure are tested.

• WHITE BOX

White Box Testing is a software testing method in which the internal


structure/design/implementation of the item being tested is known to the tester.
Implementation and impact of the code are tested

57
CHAPTER 6

CONCLUSION

The conclusion is an understanding of how the system functions. This system is called the
existing system. Now the existing system is subjected to close study and problem areas are
identified. The designer now functions as a problem solver and tries to sort out the difficulties
that the enterprise faces. The solutions are given as proposals. The proposal is then weighed
with the existing system analytically and the best one is selected. The proposal is presented to
the user for an endorsement by the user. The proposal is reviewed on user request and suitable
changes are made. This is loop that ends as soon as the user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts, using the information for
further studies on the system. Preliminary study is problem solving activity that requires
intensive communication between the system users and system developers. It does various
feasibility studies. The "Pharmacy Management System" has been developed to override the
problems prevailing in the practicing manual system. This software is supported to eliminate
and in some cases reduce the hardships faced by this existing system. The application is reduced
as much as possible to avoid errors while entering the data.

58
CHAPTER 7

FUTURE ENHANCEMENT

The "Pharmacy Management System" has been developed to override the problems prevailing
in the practicing manual system. This software is supported to eliminate and in some cases
reduce the hardships faced by this existing system. The application is reduced as much as
possible to avoid errors while entering the data. It is recommended that the new system should
be used with the necessary specifications of the system requirements and provision for an
uninterrupted power supply should be made available throughout the hours of operation of the
pharmacy to avoid power outage. There should also be basic computer knowledge for the users
of the software. It is recommended that the software be improved especially in areas of
accounting as it will be of great impact to the development of retail pharmacy. Also, for those
busy executive who are always on the go, our systems come with remote access features, which
will allow you to manage your workforce anytime, at all times. These systems will ultimately
allow you to better manage resources.

59
CHAPTER 8

BIBILIOGRAPHY

REFERENCES

• W. Chanpuypetch, D. Kritchanchai. (2020). A design thinking framework and design


patterns for hospital pharmacy management. International Journal of Healthcare
Management, 13(3), 177-185.

• Carlisle George, "Hospital Pharmacy Management", Management Science of Health,


2012 (Book).
[2] J.S. Wheeler, T. Ngo, J. Cecil, N. Borja-Hart

• Farghally, E. M. A., 2018. slideshare. [Online]


Available at: https://www.slideshare.net/mahmoudfarghally21/pharmacy-management-
system-project-69561583

• ADEWALE, I. A., 2018, slideshare. [Online]


Available at: https://www.slideshare.net/ibitove ahmed/pharmacy-management-
system-project-5365478

• Sqlite.org. 2021. Distinctive Features Of SQLite[online]Available at:


<https://www.sqlite.org/different.html> [Accessed 20 May 2021]

LANGUAGES - www.w3schools.com
www.geeksforgeeks.com
Python.org
IDEAS & IMPLEMENTATIONS - www.google.co.in

www.w3schools.com

www.DocFoc.com

www.SlideShare.com

www.codeproject.com

60

You might also like