Professional Documents
Culture Documents
BY
SUBMITTED TO
FACULTY OF SCIENCE
UNIVERSITY OF WMSU-ESU
COMPUTER SCIENCE
JULY 2017
CERTIFICATION
This is to certify that this research work was carried out by HAIDAR BAGUAN
_____________________ _____________________
(PROJECT SUPERVISOR)
_____________________ _____________________
DATE
(HEAD OF DEPARTMENT)
_____________________ _____________________
I
ACKNOWLEDGMENT
II
ABSTRACT
III
TABLE OF CONTENT
COVER PAGE
CERTIFICATION................................................................................................................................. I
ACKNOWLEDGMENT ..................................................................................................................... II
ABSTRACT ......................................................................................................................................... III
TABLE OF CONTENT ...........................................................................................................IV
TABLE OF FIGURES .............................................................................................................VI
LIST OF TABLES ................................................................................................................. VII
CHAPTER ONE INTRODUCTION ................................................................................... 1
1.0 INTRODUCTION .......................................................................................................... 1
1.1 BACKGROUND OF THE STUDY ............................................................................... 1
1.2 STATEMENT OF THE PROBLEM .............................................................................. 2
1.3 AIMS AND OBJECTIVES ............................................................................................ 2
1.4 SCOPE AND LIMITATION .......................................................................................... 3
1.5 RESEARCH METHODOLOGY.................................................................................... 4
1.6 DEFINITION OF TERMS ............................................................................................. 4
1.7 CHAPTER LAYOUT ..................................................................................................... 5
CHAPTER TWO LITERATURE REVIEW ...................................................................... 6
2.0 INTRODUCTION .......................................................................................................... 6
2.1 PHARMACY PRACTICE IN THE PAST ..................................................................... 6
2.2 THE PRESENT DAY PHARMACY ........................................................................... 14
2.3 THE FUTURE OF PHARMACY ......................................................................................... 17
2.4 BENEFITS OF THE PROPOSED SYSTEM ............................................................... 20
CHAPTER THREE SYSTEM ANALYSIS AND DESIGN ........................................... 21
3.0 INTRODUCTION ........................................................................................................ 21
3.1 SYSTEM ANALYSIS .......................................................................................................... 21
3.1.1 ANALYSIS OF EXISTING SYSTEM .............................................................................. 22
3.2 REQUIREMENTS DEFINITION ...................................................................................... 23
3.2.1 METHOD OF INFORMATION GATHERING .............................................................. 23
3.3 SYSTEM DESIGN ............................................................................................................... 24
3.4 SYSTEM MODELLING...................................................................................................... 25
3.5 SYSTEM FLOWCHART ..................................................................................................... 25
IV
3.5 DATABASE DESIGN .......................................................................................................... 38
CHAPTER FOUR SYSTEM IMPLEMENTATION .................................................... 42
4.0 INTRODUCTION ........................................................................................................ 42
4.1 CHOICE OF PROGRAMMING LANGUAGE ............................................................... 42
4.3 SYSTEM DOCUMENTATION ................................................................................... 44
4.4 HARDWARE REQUIREMENT .................................................................................. 44
4.6 DATABASE SPECIFICATION ................................................................................... 45
4.7 MODULE DESCRIPTION .......................................................................................... 45
4.8 SYSTEM MAINTENANCE ........................................................................................ 53
CHAPTER FIVE CONCLUSION AND RECOMMENDATION ................................ 55
5.0 SUMMARY .................................................................................................................. 55
5.1 CONCLUSION ............................................................................................................. 55
5.2 RECCOMMENDATION ............................................................................................. 56
REFERENCES............................................................................................................. 57
APPENDIX..58
V
LIST OF FIGURES
VI
LIST OF TABLES
VII
CHAPTER ONE
1.0 INTRODUCTION
The system allows the user to enter a manufacturing and expiry date for a particular
product or drug during opening stock and sales transaction. The system will also give
report showing the list of products expiry after a specified date before the product
eventually expires. It also involves manual entry upon arrival of new batches of drugs
and upon drug movement out of the pharmacy for a certain period, e.g. every month,
the pharmacist may want to generate report for the movement of drugs in and out of
the pharmacy, getting information about the drugs e.g. expiry date, date purchased,
pharmacist to manually monitor each drug that is available in the pharmacy. This
Due to the size and quality service of the pharmacy, the pharmacy has a very large
customer base. These customers tend to visit the pharmacy for services mostly when
they close from work. At this period, the number of customers that patronise the
pharmacy is on the increase, thereby making the workload of the pharmacists much
1
more tedious. This case makes it difficult for the pharmacist to attend to customers in
a short period.
customers. The factors mentioned above, results in delay of the services being
rendered to the customers, thereby slowing down sales and risk losing valuable
Pharmacy management has kept paper record in filing cabinets. Managing a very
large pharmacy with records on papers will be tedious and difficult to keep track of
inventories with regards to the drugs in the store, expiry date, quantity of drugs
The pharmacist has to order drugs to replenish the already diminishing stock. In
addition, ordering of drugs is being carried out manually. Significant amount of time
is allocated for writing the order as the pharmacist needs to go through the stock
balance and make rough estimate of the amount to order based on Figures.
Drugs are not supposed to be used after they have expired. This project work will
prompt the pharmacist about drugs that are close to expiry, preventing those drugs
from being sold and also providing solution to the earlier stated problems.
The aim of this project is to develop a software for the effective management of a
2
- Maintaining correct database by providing an option to update the drugs in
stock.
and role.
The scope of this project is limited to the activities of a pharmaceutical store which
includes will improving health outcomes, reduce hospital and long term care
admissions, enhance access and care in the Estate and surrounding communities and
ensuring best use of resources, the use of a computer based management system for
The system will not be able to handle drug prescription, drug to drug interaction. The
this implies that these services will be manually completed by the pharmacist.
3
1.5 RESEARCH METHODOLOGY
The research method used for this project work gives a description of how the
pharmacy management system for Boniks Pharmacy and stores, Gwarimpa Estate,
Therefore the method used in the design and collections of information from various
- Knowing and understanding the input and output processes of the existing
system.
- Primary data: This source has to do with the text book contacted for the
many forms of medication are used by a patient, i.e. when more drugs are prescribed
4
1.7 CHAPTER LAYOUT
The chapter layout of this project is outlined in a sequential manner starting with
Chapter one which consists of the Introduction, Background of the study, Statement
pharmacy management in the past, at present and also include the benefits of
pharmacy management.
Chapter three deals with the analysis of the existing system under which description
of the current system will be analysed, problems of existing system, description of the
documentation under the system design, the system design will have input and output
design.
Chapter five will include summary, conclusion and recommendation. It consists of the
summary of the project report, recommendation based on the research done on the
5
CHAPTER TWO
LITERATURE REVIEW
2.0 INTRODUCTION
knowledge of the chemistry of various drugs and how they react in humans, and also
how drugs interact with each other (Charles E. Rosenberg, 1980). Pharmacists must
accurately measure and package medicine, ensuring its dosage and safety to be
administered properly to a patient. While the pharmacist does not typically select or
prescribe the medication, the pharmacist educates the patient on how to take the
health in matters relating to medication distribution and use and disease state
management. Pharmacists play a vital role in improving patient care through the
This gives an overview of events that have occurred in pharmacy practice through
several ages both in the past and present, and also indicates possible events of the
future.
6
2.1.1 The History of Pharmacy
As long as there have been societies, there have been specialists and physicians whose
sole purpose was to prepare and administer medicinal treatments. The earliest healers
engaged in what is now called Pharmacognosy, which is the study and application of
plants and herbs for healing. Evidence that early man used pharmacognosy to treat
The beginnings of pharmacy are ancient. When the first person expressed juice from a
succulent leaf to apply to a wound, this art was being practiced. In the Greek legend,
Asclepius, the god of the healing art, delegated to Hygeia the duty of compounding
his remedies. She was his apothecary or pharmacist. The physician-priests of Egypt
were divided into two classes: those who visited the sick and those who remained in
the temple and prepared remedies for the patients (Homan, 2008).
The pharmacy profession can be traced back at least as far as the Sumerian
population, living in modern day Iraq from around 4000 BC, they used medicinal
plants such as liquorice, mustard, myrrh, and opium. There were separate people who
worked to prepare medicines, as a separate role from diagnosis and treatment which
was carried out by medics. These precursors to pharmacists also combined their role
with that of a priest. The Sumerians wrote the earliest surviving prescriptions from at
Pharmacy was viewed as a high status branch of medicine, and again, like the
Sumerians, these pharmacists were also priests who worked and practised in the
7
From surviving papyrus scrolls, notably the Ebers Papyrus which dates from 1500
BC, we know that the Egyptians made and used infusions, ointments, lozenges,
suppositories, lotions, enemas, and pills. The Ebers Papyrus includes 875
prescriptions and 700 drugs. Meanwhile, in China in about the same era (2000 BC), a
man called Shen Nung wrote the first native herbal, which contained descriptions of
Stalls and shops selling medicinal goods existed around 1900 B.C. in the town of
Sippara on the Euphrates River. However, the earliest recorded shop dealing with
In ancient Greece and Rome and during the middle Ages in Europe, the art of healing
recognized a separation between the duties of the physician and those of the herbalist,
who supplied the physician with the raw materials from which to make medicines.
The Arabian influence in Europe during the 8th century had however brought about
the practice of separate duties for the pharmacist and physician. The trend toward
specialization was later reinforced by a law enacted by the city council of Bruges in
Benjamin Franklin took a pivotal step in keeping the two professions separate when
The development of the pharmaceutical industry since World War II led to the
discovery and use of new and effective drug substances. It also changed the role of the
diminished and with it the need for the manipulative skills that were previously
applied by the pharmacist to the preparation of pills, plasters, and potions (Rosenberg,
2008).
8
The pharmacist continues, however, to fulfil the prescribers intentions by providing
advice and information; by formulating, storing, and providing correct dosage forms;
and by assuring the efficacy and quality of the dispensed or supplied medicinal
product.
Before the dawn of history, ancient man learned from instinct, from observation of
birds and beasts. Cool water, a leaf, dirt, or mud was his first soothing application. By
trial, he learned which served him best. Eventually, he applied his knowledge for the
called the cradle of civilization. It provides the earliest known practice of the art of the
apothecary. Practitioners of healing of this era (about 2600 B.C.) were priest,
Pharmacy in ancient China: Chinese Pharmacy stems from Shen Nung (about 2000
B.C.), an emperor who sought out and investigated the medicinal value of several
Days of the Papyrus Ebers: "Papyrus Ebers" (1500 B.C.) is the best known and most
700 drugs.
Theophrastus - Father of Botany: Theophrastus (about 300 B.C.), was the greatest
early Greek philosophers and natural scientists, is called the "father of botany." His
9
observations and writings dealing with the medical qualities and peculiarities of herbs
gaining customers' confidence. One of the first therapeutic agents to bear such a mark
was Terra Sigillata (Sealed Earth), a clay tablet originating on the Mediterranean
and spread the excellent rules for collection of drugs, their storage and use. His texts
medicines ruled in the Western world for 1,500 years; and his name still is associated
Damian And Cosmas - Pharmacy's Patron Saints: twin ship of the health
Monastic Pharmacy: During the middle ages remnants of the western knowledge of
pharmacy and medicine were preserved in the monasteries (fifth to twelfth centuries).
Manuscripts from many islands were translated or copied for monastery libraries. The
monks gathered herbs and raised them in their own herb gardens. These they prepared
10
according to the art of the apothecary for the benefit of the sick and injured. Gardens
The First Apothecary Shops: The Arabs separated the arts of apothecary and
physician, establishing in Bagdad late in the eighth century the first privately owned
drug stores. They preserved much of the Greco-Roman wisdom developing with the
aid of their natural resources syrups, confections, conserves, distilled waters and
alcoholic liquids.
Avicenna - The "Persian Galen": Among the brilliant contributors to the sciences of
Pharmacy and Medicine during the Arabian era was one genius who seems to stand
for his time - the Persian, Ibn Sina (about 980-1037 A.D.), called Avicenna by the
teachings.
began to appear in the 17th century. In Sicily and southern Italy, pharmacy was
The First Official Pharmacopoeia: The idea of a pharmacopoeia with official status,
originally written in Italian, was published and became the legal standard for the city-
state in 1498.
politician) formed a separate company known as the "Master, Wardens and Society of
11
the Art and Mystery of the Apothecaries of the City of London". This was the first
Scheele - Greatest of the Pharmacists-Chemists: During his few short years, Carl
Wilhelm Scheele gave to the world discoveries that have brought its people
and countless other organic compounds that enter into today's daily life, industry,
Daniel B. Smith, and first Secretary, William Procter, Jr., the twenty delegates
pharmacists and druggists" of good character who subscribed to its Constitution and
to its Code of Ethics. The Association continues to serve Pharmacy today (Bender,
1967).
groups met for the first time, at the Second International Congress of Pharmacy in
1820 The alkaloid quinine was first extracted from the bark of cinchona trees
Caventou.
12
1883 First edition of The Extra Pharmacopoeia published, edited by William
1910 Salvarsan, the first 'magic bullet' drug, effective against syphilis was
1917 The Venereal Disease Act prohibited the advertising of medicines for
1922 The Dangerous Drugs Act regulated the import and sale of potential
1938 The Food and Drugs Act prohibited the adulteration and mislabelling
of drugs.
treat cancer.
1940 Under the Finance (No. 2) Act purchase tax was imposed on a range of
1941 The Pharmacy and Medicines Act repealed the old medicine stamp
13
epilepsy and TB, or to be effective in procuring an abortion. For the
1961 Ibuprofen was first synthesised by a team at the Boots Pure Drug
Company in December.
The modern drugstore varies significantly from its ancient counterparts. While the
proprietors of pharmacies in the far distant past were often making numerous medical
pharmacists in the modern drugstore are tasked instead with the responsibility of
prescribed to patients under a doctor's care. Among the most important of pharmacist
jobs is assuring that the patient has not been prescribed two drugs which will have an
evaluations and in all states such positions are highly regulated and require testing
14
Far from being just a clerk behind a counter, pharmacists also play a role in disease
management and evaluation of test results. In hospitals, pharmacists are often in the
physicians on treatment options as well as making doctors aware of new and possibly
Many people interested in a career as a pharmacist have found that in recent times it is
pharmacists continue to rise while the industry for new and returning workers is quite
robust.
pharmacist. The first college of pharmacy was founded in the United States in 1821
and is now known as the Philadelphia College of Pharmacy and Science. Other
institutes and colleges were established soon after in the United States, Great Britain,
five years. The first and frequently the second year of training, embracing general
education subjects, are often provided by a school of arts and sciences. Many
institutions also offer graduate courses in pharmacy and cognate sciences leading to
15
for those who are preparing for careers in research, manufacturing, or teaching in the
field of pharmacy.
Since the treatment of the sick with drugs encompasses a wide field of knowledge in
for adequate pharmaceutical training. The basic five-year curriculum in the colleges
of pharmacy of the United States, for example, embraces physics, chemistry, biology,
jurisprudence.
earning a passing score on the PCAT (Pharmacy college admission test). Coursework
physiology.
clinical and pharmaceutical settings. The length and quantity of rotations varies, but
the average PharmD program requires 7-10 rotations, each of which is 4-6 weeks in
length.
If a student knows early in his or her college career that they would like to become a
pharmacist, one could graduate with a PharmD in about 6 years. Many college
students do not decide until later in college or after college to become a pharmacist;
16
2.3 THE FUTURE OF PHARMACY
Automation will assist with this, because anything that streamlines and automates the
dispensing and distribution process will obviously free the pharmacist to fulfill more
Simply put, pharmacists and pharmacies of tomorrow must find ways to increase
offshoots of their clinical expertise. Some experts predict that the future of pharmacy
will embrace the clinical skills and care pharmacists have always been qualified to
deliver.
convenient. As the healthcare system becomes more digital, the most exciting thing is
that pharmacists will have the potential to become more connected to patients and
text message reminder to take meds or measure blood glucose levels. This will
17
Collaborative practice connectivity, achieved through a combination of
Pharmacy surveillance and security systems, which will create a greater level
Pharmacies that do not step up to this challenge will lose the ability to handle
important drugs, and this will mean loss of some of their most valuable prescriptions
and patients.
Several companies sell software and hardware that increase the efficiency of
The pharmacist will play a significant role in making contributions to patient care, and
technology, and that care will be recorded in the EHR (electronic health records) in
the future. Pharmacists will be integral team members as far as the care of patients is
concerned."
Improved care and reduced errors will be the cornerstones of this relationship between
Some experts say it depends on the individual pharmacy and the type of automation
being implemented.
18
According to Bill G. Felkey, BA, MS, professor of healthcare informatics in the
many pharmacies across the country will choose to move the pharmacist to a more
conspicuous forward location in their stores. With the pharmacist in front, however,
you can put the technology behind closed doors or you can believe that patients will
be fascinated to see how these robotics work. There will exist a mixed reception,
depending upon where the pharmacy is and upon how well the patients receive the
Muller said that dispensing machines will have a definite impact on layout. It has to
be easily accessible to staff, but not located in an area that causes traffic and
the machine counts but does not label and vial, it needs to be located in the technician
area and positioned so all techs have easy access. If the machine labels and vials, and
only requires the final pharmacist check, it needs to be located between the
pharmacists and technicians, depending on who is putting the prescription in the bag.
Incorporation agreed, noting that even in a situation where a chain may have gone to a
central-fill system, where, say 20 to 30 per cent of the volume is moved off-site, it
still needs to determine how to best use automation to address the remaining on-site
dispensing requirements.
Which is why, said Muller, you would not just add a machine into an existing layout;
some thought and care must be given to properly reflow the behind-the-counter space
19
The bottom line is that everything needs to move toward a more efficient flow.
The proposed system would be designed to help make the rigorous activities carried
monitoring drug movement in the pharmacy and ensuring effective policing of the
The new system will be designed to provide the following benefits in the interest of
the pharmacy;
20
CHAPTER THREE
3.0 INTRODUCTION
a system in order to identify problems of the system, and using the information
relationship and which describe the aggregated functionality and performance of the
system. System design is also the overall plan or blueprint for how to obtain answer to
the question being asked. The design specifies which of the various type of approach.
System analysis is the study of sets of interacting entities, including computer systems
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.
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
to the system.
21
3.1.1 ANALYSIS OF EXISTING SYSTEM
Before we analyse 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
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
From the problems listed in the existing system, the implementation of the proposed
22
Generating report within a specified period of time.
existing system works using the facts gathered at the preliminary investigation that
leads to focusing on the possibility of replacing the existing system or improving upon
Collection of fact is the act of getting and gathering information from various sources
in order to be able to compose the project. Data used for designing of the system were
gathered through several means. Therefore the method used in the design and
different expert.
Knowing and understanding the input and output processes of the existing system.
know the equipment needed, and the mode of operation of the old system.
Primary data: This source has to do with the text book contacted for the
23
3.3 SYSTEM DESIGN
interfaces, and data for a system to satisfy specified requirements through system
development. The design of this system will be user friendly. It shall be designed in
such a way that employees will be able to navigate easily through the information
In other words, system design consists of design activities that produce system
system analysis process. System design specifies how the system will accomplish.
PROJECT
PLANNING
REQUIREMENT
GATHERING
PROJECT
DEVELOPMENT &
INTERFACE DESIGN
IMPLEMENTATION
AND SYSTEM
TESTING
MAINTENANCE
AND UPGRADING
24
The diagram above is a system development life cycle that illustrates how the design
of the project is broken down into five different phases, which are Project Planning,
The proposed Pharmacy Management System for Boniks Pharmacy and Stores will
start with project planning by determining the users of the system, aims and objectives
of the project. After these, extensive research will be done to determine how to design
an effective system, as well as to review the current system. Then, the design was
with an initial prototype of the system, and then refined it based on their suggestions.
Phases of analysis, design and implementation were performed iteratively until users
and designers agreed on a final system specification. At this point, the project could
During the system requirements and design activity, systems may be modelled as a set
overview of the system organisation. System modelling helps to give more detailed
system specifications which are in form of graphical representations that can describe
representations used, models are often more understandable than detailed natural
a System Flowchart.
showing the steps as boxes of various kinds, and their order by connecting these with
25
arrows. This diagrammatic representation can give a step-by-step solution to a given
problem. Process operations are represented in these boxes, and arrows connecting
are used in the flowchart to represent input, output, decision, connectors and process.
26
3.5.1 STRUCTURE CHART
SELECT
MENU
ADMIN SUPERVISOR
MENU MENU
STAFF
MENU
ADD STAFF ADD
CATEGORY
ADD GOTO
CATEGORY STORE
SELL
DRUGS
GOTO VIEW
STORE DRUGS
MANAGE DRUG
DRUGS STATE
DELETE
DRUG VIEW DRUG
STATE SALES
VIEW VIEW
SALES STAFF
VIEW
STAFF
27
3.5.2 SYSTEM FLOWCHART
START
SELECT LOGIN
YES
ADMIN
AS ADMIN?
LOGIN
NO
YES
AS SUPERVISOR
SUPERVISOR? LOGIN
NO
YES
STAFF
AS STAFF?
LOGIN
NO
NO EXIT?
YES
STOP
28
3.5.3 ADMIN FLOWCHART
ADMIN
2
LOGIN
ENTER LOGIN
DETAILS
VALIDATED?
ADMIN MENU
3
NO
YES NO YES
ADD DRUG? 3 MANAGE DRUGS? G
B
NO
YES NO YES
ADD STAFF?
3 DRUG STATE? H
C
NO
NO YES
ADD CATEGORY? YES
D 3 VIEW SALES?
I
NO
YES NO YES
GOTO STORE?
E 3 VIEW STAFF? J
NO
NO YES
VIEW DRUGS?
YES
F 3 LOG OUT? 2
29
3.5.4 SUPERVISOR FLOWCHART
SUPERVISOR
1
LOGIN
ENTER LOGIN
DETAILS
VALIDATED?
SUPERVISOR MENU
3
NO
YES YES
NO
ADD DRUG?
L 3 MANAGE DRUGS? P
NO
YES NO YES
ADD CATEGORY? M 3 DRUG STATE? Q
NO
YES NO YES
GOTO STORE?
N 3 VIEW SALES?
R
NO
YES YES
NO
VIEW DRUGS?
O 3 VIEW STAFF? S
NO YES
3 LOG OUT? 1
30
3.5.5 STAFF LOGIN FLOWCHART
STAFF LOGIN
ENTER LOGIN
DETAILS
NO
VALIDATED?
YES
ENTER
YES A
STORE?
31
A
DISPLAY STORE
SELL RESTOCK
NO NO
DOES QUANTITY DOES QUANTITY
EXIST? EXIST?
YES YES
2 2
32
B C
ENTER DRUG
ENTER STAFF
DETAILS
DETAILS
NO VALIDATED? NO VALIDATED?
YES YES
DISPLAY SUCCESS
DISPLAY SUCCESS
2 2
33
D F
2 2 DISPLAY
NO
VALIDATED? SUCCESS
YES
2
DISPLAY
SUCCESS
34
G
DISPLAY STORE
MANAGER
ALL STOCK
ENTER DELETE
QUANTITY
LOW STOCK
NO
DISPLAY
EXPIRED DRUGS VALIDATED? SUCCESS
YES
DISPLAY 2
DISPLAY SUCCESS
DISPLAY
2
DISPLAY
35
E
GOTO STORE
SELL RESTOCK
ENTER ENTER
QUANTITY QUANTITY
NO DOES NO
QUANTITY VALIDATED?
EXIST?
YES YES
DISPLAY DISPLAY
SUCCESS SUCCESS
2 2
36
SELECT DRUG DISPLAY DRUG
H 2
STATE STATE
37
3.5 DATABASE DESIGN
This is a shared collection of data that are related or files that are to meet the
immediate need of authorized users. These data may be in form of text, numeric, date
or encoded images.
Table 3.1 above serves as a repository for administrator details, that will be able to have
access to the entire details on the application. It is a table that stores the administrator login
details.
38
DRUG INFORMATION TABLE
Table 3.2 Drug information table: This table is named tblDRUG, it depicts the information
Table 3.2 shows the information about the drugs in the pharmacy and is being queried from
the database on the drug registration page to show all the drugs for user to select.
39
SUPERVISOR LOGIN TABLE
Table 3.3 above serves as a repository for supervisor details, which will be able to have
access to the required details on the application as stipulated by the administrator. It is a table
Table 3.4 above serves as a repository for a staff details, that will be able to have access to
the required details on the application as stipulated by the administrator. It is a table that
40
STAFF INFORMATION TABLE
Table 3.5 above consist of information of the list and information of the employed staff in the
pharmacy .The information of staff on the required field can be seen from the table 3.5 above.
41
CHAPTER FOUR
SYSTEM IMPLEMENTATION
4.0 INTRODUCTION
developed, installed and made ready for use. It is this stage that all details and key
therefore, is a very essential stage in which its success determines to a great extent the
success of the new system. At this instance, after all is said and done the system is
System design is concerned mainly with the coordination of activities, job procedures
This stage involves the design of the new Pharmacy Management System a case study
scope of the application you are building. While small applications are often created
using only one language, it is not uncommon to develop large applications using
multiple languages.
The propose application to be built is not a web based application that needs internet
42
The choice of programming language to use for this programme is visual basic. The
executable code.
Visual Basic has many new and improved features such as inheritance, interfaces, and
particularly easy to develop graphical user interfaces and to connect them to handler
Visual Basic fully integrates the .NET Framework and the common language runtime,
security, and improved versioning support. Visual Basic supports single inheritance
compilers.
debugging program modules before they are integrated, testing the system to ensure
System testing deals with the real life testing of the system, to ascertain how far it has
gone in carrying out the expected task. This was carried out in two phases.
Number one is the source code testing which examine the logic of the program.
Secondly, the specification testing which involves the examination of the system as
regard to what it should do and how it should be done given specific conditions. This
43
includes inputting data, collecting its output and comparing it with the output of the
old system and assessing it to see if it can replace the old system.
application developers and users. It also helps future analysis of application either by
To setup the system, there must be visual basic 6.0 software installed on the computer
Mouse
Keyboard
Windows operating system such as Windows 2000, windows XP, Windows Vista,
Windows 7.
44
4.6 DATABASE SPECIFICATION
A database is a single file which consists of structured data and records which are
and controlled pool of data. A good database must be common to all users and
However, Microsoft Access was used as the database application tool for designing
the database management system. The database management system is limited only
programmer is responsible for maintaining and upgrading of the database and the
whole software.
HOME PAGE
45
Figure 4.1 shows the select login page. It is the first interface that appears on the screen when
the application is being loaded. This interface displays the name of the application and some
other information about the software. The page consist of logins that exist for several other
levels in the application. They consist of administrator, supervisor and staff login.
Figure 4.2 above, shows the admin login area of the application. After a successful login
supplying the correct username and password, it opens into another page where the activities
of the admin module are fully stipulated. The admin controls all the major activitis of this
application. Activities such as Addstaff, Add Drugs, Change Username and password,
Manage drugs, View sales etc can only be controlled by the admin.
Futhermore,the Admin has control over the supervisor and all other user of the application.
46
SUPERVISOR LOGIN
Figure 4.3 above shows the supervisor login.The supervisor is an employee that manages the
activities of the pharmacy. After a successfu login, some of the activities that can be
performed by the supervisor are Manage drugs, view sales, view drugs etc.
The supervisor has a high level of acces on the application except for addition a new staff.
47
STAFF LOGIN
Figure 4.4 above shows the staff login section.The staff is resonsible for updating the list of
drugs in the store.The staff can also engage in buying and selling of drugs.The staff is
required to provide a valid username and password in other to be able to perform its
activities.
48
ADMIN MAIN MENU
Figure 4.5 above shows the Admin module menue. It list activities that can be performed by
the pharmacy.
49
DRUG REGISTRATION FORM
Figure 4.6 above shows the drug registration form. New drugs brought to the pharmacy are
registered here. It receives the details of new batches of drug in the pharmacy.
50
STAFF REGISTRATION FORM
Figure 4.7 above shows the staff registration form. Important information like the contact
details is collected with this form. A login detail that is, a username and a password is
51
STORE MANAGER
Figure 4.8 above shows the store manager. Here drugs can be sold. The user will be required
to select a category of drug to sell. Drugs in the pharmacy are categorised based on their
function. When the drug needed to be purchased is selected, the software generates important
information about the drug such as dosage, available quantity, selling price, expiry date,
location of the drug in the pharmacy etc. Also the user can sell drugs, print bill, check all
52
SALES WINDOW
Figure 4.9 shows the list of drugs sold in the pharmacy. There is an option to view the sales
application. This usually commences after the application has gone into use. There are
two different ways by which this application can be maintained. They include:
business processes change, applications that support these processes must evolve
to reflect these changes. Thus, for this application to perform optimally and to
53
Corrective maintenance: This is required in the event that an error occurred when
the application is in use. Corrections must be made to changes discovered that can
54
CHAPTER FIVE
5.0 SUMMARY
and efficiency in the pharmaceutical store. It is a computer based system which helps
and reliability of Pharmacy records when accessing and providing services to the
customers. The information gathered during the data collection was properly analysed
and the results provided the basis for the new system. The system was tested and
found to be functional and the outputs produced by this system were encouraging. The
application will hence reduce the loss of information unlike the existing system and
5.1 CONCLUSION
Effective implementation of this software will take care of the basic requirements of
55
In order to allow for future expansion, the system has been designed in such a way
that will allow possible modification as it may deem necessary by the pharmacy
5.2 RECCOMMENDATION
Designing this application (Pharmacy management system) is not an easy task. It all
started from the requirement gathering and passes through so many other stages
before completion.
Based on the benefits of this system and tremendous value it will add to customer-
It is recommended that the new system should be used with the necessary
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.
56
REFERENCES
Barbara Griggs. Green Pharmacy: The History and Evolution of Western Herbal
Charles E. Rosenberg, Morris J. Vogel. The Therapeutic Revolution: Essays in the social
Pg 174.
Pg 213-223.
History, Fourth Edition. Trade paperback, Pharmaceutical press (2008). Pg. 127.
118.
57
APPENDIX SOURCE CODE
ADMIN LOGIN
Exit Sub
End If
'**********************************
user.Text = ""
pass.Text = ""
frmMAIN.Show
Me.Hide
Exit Sub
End If
End If
58
MsgBox "YOU ARE NOT AUTHORIZED", vbCritical, "(LOGIN SYSTEM)"
user.Text = ""
pass.Text = ""
End Sub
frmSWITCH.Show
Unload Me
End Sub
End Sub
If KeyAscii = 13 Then
Beep
cmdLogin_Click
End If
'********************************************
End Sub
59
If user.Text = "" Then
Beep
Else
AdoLogin.Recordset.MoveFirst
If (AdoLogin.Recordset.EOF) Then
Else
End If
End If
'********************************
End Sub
If KeyAscii = 13 Then
Beep
cmdLogin_Click
End If
'*******************************
End Sub
60
Dim user, PASS1, PASS2 As Variant
Sub Show_State()
'RESET COUNTERS
NUM1 = 0
QUAN1 = 0
LOW1 = 0
SN1 = 0
SN2 = 0
'DEFULT VALUES
lbLQUAN2.Caption = "--"
lblLOW.Caption = "--"
lblNO.Caption = "--"
lblAMOUNT.Caption = "--"
'REFRESH RECORD
AdoDRUG.Refresh
AdoDRUG.Recordset.MoveFirst
'STATE TIMER
TimDRUG.Enabled = False
61
End Sub
Sub Change_Pass()
'*********************************
lblPASS.Caption = PASS1
'SAVE RECORDS
AdoUSER.Recordset.Save
'REFRESH RECORDS
AdoUSER.Refresh
'CLEAR FIELDS
txtUSER.Text = ""
txtPASS.Text = ""
62
'DISPLAY SUCCESS MESSAGE
Else
MsgBox "SORRY, BUT THE PASSWORD YOU SUPPLIED DOES NOT MATCH, AND
AS SUCH, THIS PROCESS IS TERMINATED", vbExclamation, "(LOGIN MANAGER)"
AdoUSER.Refresh
txtUSER.Text = ""
txtPASS.Text = ""
End If
'********************************************
End Sub
Sub Change_User_Pass()
63
'*********************************
lblUSER.Caption = user
lblPASS.Caption = PASS1
'SAVE RECORDS
AdoUSER.Recordset.Save
'REFRESH RECORDS
AdoUSER.Refresh
'CLEAR FIELDS
txtUSER.Text = ""
txtPASS.Text = ""
Else
MsgBox "SORRY, BUT THE PASSWORD YOU SUPPLIED DOES NOT MATCH, AND
AS SUCH, THIS PROCESS IS TERMINATED", vbExclamation, "(LOGIN MANAGER)"
AdoUSER.Refresh
txtUSER.Text = ""
64
txtPASS.Text = ""
End If
'********************************************
End Sub
Show_State
'DISPLAY STATE
frmUSER.Visible = True
txtUSER.Text = ""
txtPASS.Text = ""
frmCAT.Visible = False
FrmSTATE.Visible = False
frmAUTHOR.Visible = False
AdoCAT2.Recordset.CancelUpdate
AdoUSER.Recordset.CancelUpdate
'*****************************************
End Sub
65
Private Sub cmdADD_Click()
AdoCAT2.Recordset.AddNew
AdoCAT2.Recordset.Save
AdoCAT2.Refresh
AdoCAT.Refresh
AdoCAT2.Recordset.AddNew
Else
End If
End Sub
'CONFIRM ENTRY
66
If ANS = vbYes Then
Change_User_Pass
Exit Sub
'*******************************
'CHANGE PASSWORD
Change_Pass
Exit Sub
'*****************************************
'CANCEL
Exit Sub
End If
'*******************************
Else
End If
'***************************************
End Sub
67
Private Sub cmdDEL_Click()
'DELETE RECORD
AdoCAT.Recordset.Delete
End If
End Sub
frmUSER.Visible = False
frmAUTHOR.Visible = False
FrmSTATE.Visible = False
frmSTAFF.Visible = False
'SHOW CATEGORY
frmCAT.Visible = True
AdoCAT2.Recordset.AddNew
txtCAT.Text = ""
68
'*************************************
End Sub
frmDRUGS.Show
frmDRUGS.TimNEW.Enabled = True
Me.Hide
End Sub
frmCAT.Visible = False
frmAUTHOR.Visible = False
AdoCAT2.Recordset.CancelUpdate
frmUSER.Visible = True
txtUSER.Text = ""
txtPASS.Text = ""
'*************************
End Sub
69
Private Sub cmdMDRUG_Click()
frmSTORE.Show
Me.Hide
End Sub
frmVSALE.Show
Me.Hide
End Sub
'DISPLAY STATE
frmSTAFF.Visible = True
FrmSTATE.Visible = False
frmCAT.Visible = False
frmUSER.Visible = False
frmAUTHOR.Visible = False
End Sub
70
Private Sub cmdSTATE_Click()
Show_State
'CLEAR RECORDS
lstLOW.Clear
lstQUAN.Clear
lstEXP.Clear
'DISPLAY STATE
FrmSTATE.Visible = True
frmCAT.Visible = False
frmUSER.Visible = False
frmAUTHOR.Visible = False
frmSTAFF.Visible = False
AdoCAT2.Recordset.CancelUpdate
AdoUSER.Recordset.CancelUpdate
'*****************************************
'START TIMER
TimDRUG.Enabled = True
End Sub
71
Private Sub cmdSTORE_Click()
frmSTORE.Show
frmSTORE.TimNEW.Enabled = True
Me.Hide
End Sub
frmDRUGS.Show
Me.Hide
End Sub
frmVIEWSTAFF.Show
Me.Hide
End Sub
lblDATE.Caption = Date
End Sub
72
Private Sub Form_Unload(Cancel As Integer)
'CANCEL UPDATES
AdoCAT.Recordset.CancelUpdate
AdoCAT2.Recordset.CancelUpdate
AdoUSER.Recordset.CancelUpdate
frmADMINLogin.Show
frmADMINLogin.AdoLogin.Refresh
Unload frmDRUGS
Unload frmSALE
Unload frmSPLASH
Unload frmSTAFFReg
Unload frmSTORE
Unload frmTeller
Unload frmVSALE
Exit Sub
End If
73
Cancel = 1
End Sub
frmSTAFF.Visible = False
End Sub
frmAUTHOR.Visible = False
'******************************
End Sub
'CANCEL UPDATES
AdoUSER.Recordset.CancelUpdate
'********************************
74
'HIDE THE FRAME
frmUSER.Visible = False
'******************************
End Sub
'CANCEL UPDATES
AdoCAT2.Recordset.CancelUpdate
'********************************
frmCAT.Visible = False
'******************************
End Sub
'HIDE PANEL
FrmSTATE.Visible = False
End Sub
75
Private Sub lblSTAFF_Click()
frmSTAFFReg.Show
Me.Hide
End Sub
lblSTAFF.BackColor = &H0&
lblSUP.BackColor = &HC0FFFF
'**********************************
End Sub
AdoUSER.Refresh
76
Change_User_Pass
Exit Sub
'*******************************
'CHANGE PASSWORD
Change_Pass
Exit Sub
'*****************************************
'CANCEL
Exit Sub
End If
'REFRESH RECORDS
AdoUSER.Refresh
End Sub
lblSUP.BackColor = &H0&
lblSTAFF.BackColor = &HC0FFFF
'**********************************
77
End Sub
Unload Me
End Sub
'DISPLAY AUTHOR
frmAUTHOR.Visible = True
frmCAT.Visible = False
frmUSER.Visible = False
FrmSTATE.Visible = False
frmSTAFF.Visible = False
AdoCAT2.Recordset.CancelUpdate
AdoUSER.Recordset.CancelUpdate
'*****************************************
End Sub
78
'IF LOW GET NAME OF DRUG AND COUNT THE DRUG
'ADD TO LIST
SN2 = SN2 + 1
lstQUAN.AddItem lblQ.Caption
LOW1 = LOW1 + 1
End If
'******************************
DATE1 = lblDATE.Caption
DATE2 = lblEXP.Caption
SN1 = SN1 + 1
'ADD TO LIST
lstEXP.AddItem SN1 & ") " & lblEXP.Caption & " - " & lblDNAME.Caption
End If
NUM1 = NUM1 + 1
79
MADE1 = MADE1 + Val(lblMADE.Caption)
AdoDRUG.Recordset.MoveNext
If AdoDRUG.Recordset.EOF Then
AdoDRUG.Recordset.MovePrevious
TimDRUG.Enabled = False
'TRANSFER RECORDS
lblNO.Caption = NUM1
lbLQUAN2.Caption = QUAN1
lblAMOUNT.Caption = MADE1
End If
'******************************
End Sub
'FIND USER
AdoUSER.Refresh
'*******************
80
End Sub
'FIND USER
AdoUSER.Refresh
'*******************
End Sub
dptSALE.Refresh
dptSALE.Show
End Sub
dptSTOCK.Refresh
dptSTOCK.Show
End Sub
81
dptLOW.Refresh
dptLOW.Show
End Sub
Sub LoadDEFULT()
txtDOB.Text = Date
txtEMPDATE.Text = Date
'*****************************
'DEFULT SEX
OptMAL.Value = True
'********************
PIX.Picture = LoadPicture(txtPIX.Text)
'****************************************
82
'*********************************
'REFRESH RECORD
AdoNUM.Refresh
'INCREMENT NUMBER
lblGENNO.Caption = Val(lblGENNO.Caption) + 1
If Len(lblGENNO.Caption) = 1 Then
Else
End If
'*********************************
End Sub
Sub LoadPix()
'Load Picture
PIX.Picture = LoadPicture(txtPIX.Text)
Else
83
PIX.Picture = LoadPicture(txtPIX.Text)
End If
'*********************************
End Sub
Sub ValidateRecords()
Dim A, B As Integer
'RESET COUNTERS
A=0
B=0
'************************
Exit Sub
End If
'********************************
MsgBox "THIS USERNAME HAS BEEN TAKEN HAS BEEN TAKEN", vbExclamation,
"(STAFF REGISTERATION)"
Exit Sub
End If
84
'********************************
'VALIDATE RECORD
Exit Sub
End If
'****************************
'SAVE RECORD
AdoSTAFF.Recordset.Save
AdoNUM.Recordset.Save
'**************************
'DISPLAY SUCCESS
'****************************
85
Dim ANS As Integer
'DELETE RECORD
AdoSTAFF.Recordset.AddNew
LoadDEFULT
'**********************
Exit Sub
End If
UNHIDEcontrols
'REFRESH RECORDS
AdoSTAFF.Refresh
'****************************
End Sub
Sub HIDEcontrols()
cmdNEXT.Visible = False
cmdPREV.Visible = False
86
cmdLAST.Visible = False
cmdFIRST.Visible = False
cmdEDIT.Visible = False
cmdNEW.Visible = False
cmdMenu.Visible = False
'*****************************
txtSEARCH.Visible = False
Label1(13).Visible = False
'***************************
cmdCANCEL.Visible = True
cmdSAVE.Visible = True
cmdPIX.Visible = True
D1.Visible = True
D2.Visible = True
'*************************
OptMAL.Enabled = True
OptFEM.Enabled = True
txtREG.Enabled = True
txtNAME.Enabled = True
txtSEX.Enabled = True
87
txtDOB.Enabled = True
txtNATION.Enabled = True
txtSTATE.Enabled = True
txtSTATUS.Enabled = True
txtADD.Enabled = True
txtPHONE.Enabled = True
txtEMPDATE.Enabled = True
txtEMAIL.Enabled = True
txtAGE.Enabled = True
txtUSER.Enabled = True
txtPASS.Enabled = True
'*************************
D1.Value = Date
D2.Value = Date
YEAR1 = D1.Year
'*********************
'CHANGE CAPTION
'*******************************
88
txtREG.SetFocus
End Sub
Sub UNHIDEcontrols()
cmdNEXT.Visible = True
cmdPREV.Visible = True
cmdLAST.Visible = True
cmdFIRST.Visible = True
cmdEDIT.Visible = True
cmdNEW.Visible = True
cmdMenu.Visible = True
'***************************
cmdCANCEL.Visible = False
cmdSAVE.Visible = False
D1.Visible = False
D2.Visible = False
cmdPIX.Visible = False
'******************************
txtSEARCH.Visible = True
Label1(13).Visible = True
89
'***************************
OptMAL.Enabled = False
OptFEM.Enabled = False
txtREG.Enabled = False
txtNAME.Enabled = False
txtSEX.Enabled = False
txtDOB.Enabled = False
txtNATION.Enabled = False
txtSTATE.Enabled = False
txtSTATUS.Enabled = False
txtADD.Enabled = False
txtPHONE.Enabled = False
txtEMPDATE.Enabled = False
txtEMAIL.Enabled = False
txtAGE.Enabled = False
txtUSER.Enabled = False
txtPASS.Enabled = False
'*************************
'CHANGE CAPTION
'*******************************
90
End Sub
HIDEcontrols
'TYPE OF RECORD
lblTYPE.Caption = "E"
'**********************
txtREG.Enabled = False
'**************************
End Sub
UNHIDEcontrols
AdoSTAFF.Recordset.CancelUpdate
'****************************
End Sub
'DISPLAY MEUNU
frmMAIN.Show
91
'CLOSE THIS FORM
Unload Me
End Sub
HIDEcontrols
AdoSTAFF.Recordset.AddNew
'*******************************
LoadDEFULT
'**********************
lblTYPE.Caption = "N"
End Sub
AdoSTAFF.Recordset.MoveNext
'*****************************
If AdoSTAFF.Recordset.EOF Then
92
'GO TO THE RECORD BEFORE THE BLANK (IE THE LAST RECORD)
AdoSTAFF.Recordset.MovePrevious
End If
'********************************************
LoadPix
End Sub
PROPIX.ShowOpen
txtPIX.Text = PROPIX.FileName
PIX.Picture = LoadPicture(txtPIX.Text)
End Sub
AdoSTAFF.Recordset.MovePrevious
'*****************************
If AdoSTAFF.Recordset.BOF Then
'GO TO THE RECORD BEFORE THE BLANK (I.e THE FIRST RECORD)
AdoSTAFF.Recordset.MoveNext
93
MsgBox "YOU HAVE REACHED THE BEGINNING OF THIS RECORD", vbInformation
LoadPix
End If
'********************************************
End Sub
AdoSTAFF.Recordset.MoveLast
'*****************************
LoadPix
End Sub
AdoSTAFF.Recordset.MoveFirst
'*****************************
LoadPix
End Sub
94
ValidateRecords
End Sub
txtEMPDATE.Text = D2.Value
End Sub
txtDOB.Text = D1.Value
End Sub
UNHIDEcontrols
End Sub
'DISPLAY MEUNU
frmMAIN.Show
With frmMAIN
.AdoDRUG.Refresh
End With
95
'****************
Unload Me
End Sub
txtSEX.Text = "FEMALE"
End Sub
txtSEX.Text = "MALE"
End Sub
cmdNEW_Click
Timer1.Enabled = False
End Sub
96
Select Case KeyAscii
Case Else
KeyAscii = 0
Beep
End Select
'**********************************
End Sub
LoadPix
End Sub
AdoCHECK.Refresh
End Sub
97
If lblTYPE.Caption = "N" And Len(lblNAME.Caption) > 1 Then
End If
'********************************
End Sub
AdoSTAFF.Refresh
End Sub
OptMAL.Value = True
Else
OptFEM.Value = True
'***************************
End If
End Sub
98
On Error Resume Next
Case Else
KeyAscii = 0
Beep
End Select
'**********************************
End Sub
Case Else
KeyAscii = 0
Beep
End Select
'**********************************
End Sub
99
Private Sub txtUSER_Change()
AdoCHECK2.Refresh
End Sub
cmdNEW_Click
TimNEW.Enabled = False
End Sub
100
VIEW SALES
ANS = MsgBox("ARE YOU SURE YOU WANT TO DELETE THIS DRUG RECORD?",
vbQuestion + vbYesNo)
Exit Sub
End If
AdoDRUG.Recordset.Delete
'REFRESH RECORDS
AdoDRUG.Refresh
AdoDRUG.Refresh
End Sub
AdoDRUG.Recordset.MoveNext
'*****************************
101
If AdoDRUG.Recordset.EOF Then
'GO TO THE RECORD BEFORE THE BLANK (IE THE LAST RECORD)
AdoDRUG.Recordset.MovePrevious
End If
'********************************************
End Sub
AdoDRUG.Recordset.MovePrevious
'*****************************
If AdoDRUG.Recordset.BOF Then
'GO TO THE RECORD BEFORE THE BLANK (I.e THE FIRST RECORD)
AdoDRUG.Recordset.MoveNext
End If
'********************************************
End Sub
102
Private Sub cmdLAST_Click()
AdoDRUG.Recordset.MoveLast
'*****************************
End Sub
AdoDRUG.Recordset.MoveFirst
'*****************************
End Sub
AdoDRUG.Refresh
End Sub
103
AdoDRUG.RecordSource = "SELECT * FROM TBLSALE WHERE REG_DATE
BETWEEN'" & D1.Value & "' AND '" & D2.Value & "' ORDER BY DRUG_NAME"
AdoDRUG.Refresh
End Sub
lblDATE.Caption = Date
End Sub
frmMAIN.Show
With frmMAIN
.AdoDRUG.Refresh
.AdoCAT.Refresh
End With
End Sub
AdoDRUG.Refresh
Else
104
AdoDRUG.RecordSource = "SELECT * FROM TBLSALE WHERE
DRUG_FUNCTION='" & txtFUN.Text & "' ORDER BY DRUG_NAME"
AdoDRUG.Refresh
End If
End Sub
AdoDRUG.Refresh
'****************************
End Sub
'IF WE HAVE THE SAME CATEGORY, IGNORE IT AND GO TO THE THE NEXT
RECORD
AdoFUN.Recordset.MoveNext
'*******************************
Else
txtFUN.AddItem lblFUN.Caption
FUN1 = lblFUN.Caption
105
AdoFUN.Recordset.MoveNext
End If
'************************************
If AdoFUN.Recordset.EOF Then
AdoFUN.Recordset.MovePrevious
TimFUN.Enabled = False
End If
'**************************************
End Sub
AdoDRUG.Refresh
106
AdoDRUG.Refresh
AdoDRUG.Refresh
End If
End Sub
Case Else
KeyAscii = 0
Beep
End Select
'**********************************
End Sub
107
Case Else
KeyAscii = 0
Beep
End Select
'**********************************
End Sub
108