Professional Documents
Culture Documents
A Pharmacy Management System For Mark Pharmacy 01
A Pharmacy Management System For Mark Pharmacy 01
BY
SAHR NYAKA
MAYDELSHIA COLE
HASSAN MANSARAY
MAY, 2022
DECLARATION
We, Sahr Nyaka, Maydelshia Cole, and Hassan Mansaray do hereby declare to the best
of our knowledge that this graduation project was our original work and that it has never
been submitted to any University or any institution before. The literature and citation
from other people’s work have been duly referenced.
Date:
Signed:
STUDENT
Date:
Signed:
STUDENT
Date:
Signed:
STUDENT
i
APPROVAL
This project report “Pharmacy Management System” has been submitted for examination
with my approval.
Date:
Signed:
SUPERVISOR
ii
DEDICATION
We dedicate this project to our dear parents for their moral and financial support,
brothers, sisters, friends, course mates Mark pharmacy staff, and above all to our
supervisor. Mr. Mohamed Vandy for his helpful guidance, suggestions, and comments
which helped a great deal to accomplish this task, and to the Almighty God in Heaven,
glory be unto you forever and ever.
iii
ACKNOWLEDGEMENT
We would like to thank the Almighty God for his continuing guidance, love and affection
for our lives. Without you Lord we couldn’t have made it. We thank everyone at Mark
pharmacy for allowing us to use the organization as a case study. Our appreciation also
goes to our parents for their financial and moral support. Special regards go to our
supervisor Mr. Mohamed Vandy for his support during this research.
iv
ABSTRACT
This project was aimed at designing a Pharmacy Management Information System; a
system to aid in the management and operation of the pharmacy. Methods that were
used to gather information about the current system include; interviews, record reviews,
and questionnaires. From that information, requirements for the new system were
obtained. The new system was designed using Entity-Relationship diagrams and was
implanted using PHP, HTML, CSS, JavaScript, Code Igniter, and MySQL. The system
generates reports that are vital for the pharmacy administration.
v
TABLE OF CONTENT
DECLARATION ........................................................................................................i
APPROVAL ............................................................................................................. ii
DEDICATION......................................................................................................... iii
ACKNOWLEDGEMENT .......................................................................................... iv
ABSTRACT .............................................................................................................. v
LIST OF TABLE ................................................................................................... ix
LIST OF FIGURES ............................................................................................... x
LIST OF ABBREVIATIONS ................................................................................. xi
LIST OF APPENDICES...................................................................................... xiii
CHAPTER ONE........................................................................................................1
Introduction ..........................................................................................................1
1.1 Background ..................................................................................................1
1.2 Statement of the Problem ...........................................................................2
1.3 Objective of the Study .................................................................................2
1.3.1 Main Objective .......................................................................................2
1.3.2 Specific Objectives ................................................................................2
1.4 Feasibility Study...........................................................................................3
1.5 Significance of the Study.............................................................................4
1.6 Scope ...............................................................................................................5
1.7 Justification of the Study ...............................................................................5
1.8 Research Questions ........................................................................................6
1.9 Conceptual Model ...........................................................................................6
1.10 Conclusion .....................................................................................................7
CHAPTER TWO .......................................................................................................8
Literature Review ..................................................................................................8
2.1 Introduction ....................................................................................................8
2.2 Management Information Systems ...............................................................8
2.2.1 Management .............................................................................................8
2.2.2 Information ...............................................................................................8
2.2.3 System .......................................................................................................9
vi
2.3 Role of Pharmacy Computer Systems ......................................................... 10
2.4 Databases ...................................................................................................... 11
2.5 Data Bank ...................................................................................................... 11
2.6 Database Management System (DBMS)...................................................... 12
2.6 .1 Advantages of Using Database anti DBMS: ......................................... 13
2.6.2 Disadvantages of Using Database and DBMS ....................................... 14
2.8 Conclusion ..................................................................................................... 15
CHAPTER THREE .................................................................................................. 16
Research Methodology and Analysis of the System ......................................... 16
3.0 Research Design ........................................................................................ 16
3.1 Mode 2 and Triple Helix Model .................................................................. 17
3.2 Design Approach ........................................................................................ 18
3.2.1 Object-Oriented System Analysis and Design .................................... 19
3.2.2 Model Driven Architecture .................................................................. 21
3.2.3 OOSA&D and MDA Integration for Pharmacy Management System
Development .................................................................................................... 24
3.3 Data Collection ........................................................................................... 26
3.3.1 Qualitative Research Methodology ..................................................... 26
3.3.2 Secondary Sources of Information ..................................................... 27
3.4 Population and Sampling Method ............................................................. 27
3.5 Characteristics of Sample .......................................................................... 27
3.6 Research Findings ......................................................................................... 28
3.7 Design Approach ........................................................................................ 29
3.7.1 Object-Oriented System Analysis and Design .................................... 29
3.8 System Design ............................................................................................ 32
3.8.1 Primary Design Phase: ........................................................................ 32
3.8.2 Secondary Design Phase: .................................................................... 32
3.9 Project Category ........................................................................................ 32
3.9.1 Relational Database Management System (RDBMS): ....................... 32
3.9.2 Brief introduction about RDBMS:........................................................ 32
3.10 Project Planning...................................................................................... 33
vii
3.11 Project Scheduling: ................................................................................. 35
3.12 Project Profile ......................................................................................... 35
3.13 UML Model ............................................................................................... 37
3.14 Use Case Model ....................................................................................... 39
3.15 Data Flow Diagram ................................................................................. 41
3.16 Context Level Data Flow Diagram ......................................................... 43
3.17 Entity Relational Diagram ...................................................................... 47
3.18 Activity Diagram ..................................................................................... 50
.............................................................................................................................. 50
3.19 High Level Model Diagram of the Present System................................ 51
CHAPTER FOUR ................................................................................................... 53
Systems Implementation ................................................................................... 53
4.0 Introduction ............................................................................................... 53
4.1 Justification of The Programming Language ........................................... 53
4.2 System Requirement ................................................................................ 54
4.2.1 People ................................................................................................... 55
4.3 Implementation Details ............................................................................. 56
4.3.1 Coding ................................................................................................... 57
4.3.2 System Testing ..................................................................................... 57
4.3.3 File Conversion ..................................................................................... 57
4.3.4 Commissioning ..................................................................................... 57
4.3.5 User Manuals ........................................................................................ 58
4.3.6 Maintenance Detail .............................................................................. 58
CHAPTER FIVE ..................................................................................................... 59
Discussion, Recommendations and Conclusion ................................................ 59
5.1 Introduction .................................................................................................. 59
5.2 Discussion ..................................................................................................... 59
5.3 Recommendations ........................................................................................ 59
5.4 Conclusion ..................................................................................................... 60
References ........................................................................................................... 61
viii
LIST OF TABLE
Table Page
1. Characteristic of Sample 27
3. Project Scheduling 35
4. Software Requirement 55
5. Hardware Requirement 55
ix
LIST OF FIGURES
Figure Page
11. ER-Diagram 49
x
LIST OF ABBREVIATIONS
CD - Compact Disc
GB - Gigabyte
G1IZ - Gigahertz
OO - Object-Oriented
xi
PIM – Platform Independent Model
xii
LIST OF APPENDICES
Appendix Page
i. Sample Questionnaire 62
ii. Budget 65
iii. Introductory Letter 66
iv. Screen Short 67
v. Sample Code 74
xiii
CHAPTER ONE
Introduction
1.1 Background
Stock control and business processes have been tedious and a complicated process in
many organizations today. This has been so because these processes are done manually,
placing the workload on the general staff. Today’s organizations value efficiency and
reliability in terms of delivery and management of their products, relative to slow and
inefficient manual systems in place. Manual systems are far reaching negative effects
which are time consuming as the staff doesn’t have prior knowledge of available stock
levels in the store hence unable to predict proper timing for new stock deliveries. This
means customers are kept waiting while the staff goes in the shelves to trace the product.
The management also is not in a good position to monitor the profits, trends of growth,
losses and development strategies to be put in place for the future, due to inconsistencies
of manual record keeping systems. This project will involve design and implementation
of a computerized stock control system. This is a system that will allow an easy and
effective way to control and maintain business processes. For instance, stock levels which
were initially manual will be automated. Maximum stock levels will be computerized hence
investment of inventory will be kept at minimum so that the funds are made available for
more productive uses thereby avoiding borrowing and consequent loss on interest. Losses
will be minimized on account of obsolescence due to overstocking. When danger levels
are reached, the system will then automatically place an order to the supplier informing
him/her to supply the required product and in the required quantity (Predetermined
reorder quantity). Minimum stock levels will be maintained automatically making sure
that items are available in the store where and when needed.
a database will be used to capture the information. This will increase the privacy of the
customer’s information since the database will be accessed by authorized personnel only.
1
1.2 Statement of the Problem
Every organization today is committing thousands of dollars in making sure it matches
with the trend of global growth in the world of technology. This has made exchange of
goods and services easier considering that transactions are computerized or networked
to be done over the now famous Internet. It is in this wake of reality that many efforts
are made to ensure efficient, reliable and cost effective means of controlling the flow of
stock in an organization. Business processes are done manually which is prone to error.
For instance, maintaining stock levels is not an easy task as a lot of time is wasted when
stock taking is in process. I.e. the store has to be closed for at least three days to allow
the process to be carried out. Purchase process is done manually which wastes a lot of
time and money since the procurement personnel has to travel to the supplier so as to
place an order. Keeping customer’s information is also a challenge to many businesses
minus the database to restrict the number of people who should have access to the
information. This calls for a control system that will foresee perfect control of business
transactions and ensure stock flow stability.
2
1.4 Feasibility Study
After doing the project Pharmacy Management System, study and analyzed all the existi
ng 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. The feasibility study includes consideration of all the possible ways to provide
a solution to the given problem. The proposed solution should satisfy all the user
requirements and should be flexible enough so that future changes can be easily done
based on future upcoming requirements.
a. Economic Feasibility
This is a very important aspect to be considered while developing a project.
We decided on the technology based on the minimum possible cost factor.
All hardware and software cost has to be borne by the enterprise.
Overall we have estimated that the benefits the enterprise is going to
receive from the proposed system will surely overcome the initial costs and
the later running cost of the system.
b. Technical Feasibility
This included the study of function, performance, and constraints that may affect the
ability to achieve an acceptable system. For this feasibility study, we studied the
complete functionality to be provided in the system, as described in the System
Requirement Specification (SRS), and checked if everything was possible using different
types of frontend and backend platforms.
c. Operational Feasibility
No doubt the proposed system is fully GUI based is very user friendly and all
inputs to be taken all self-explanatory even to a layman. Besides, proper training has
been conducted to let know the essence of the system to the users so that they feel
comfortable with the new system. As far as our study is concerned the clients are
comfortable and happy as the system has cut down costs.
3
1.5 Significance of the Study
The Pharmacy Management System has its own significance to the pharmacy. Using this
system helps to record all transactions made at the daily purchases, and sales, it helps
to recognize all customers, employees, balance stock, etc. It manages all activities around
the pharmacy increases productivity and minimizes the risk of loss because all
transactions are recorded to the system and viewed if needed and the whole reports of
the business will be shown at any time needed.
This study will help the manager/owner to balance the inventory in order to eliminate
shortage, overstocking, and stock obsolescence. Being able to track and analyze sales
that will help to figure out how to reach sales targets effectively. It helps managers
perform quality control audits to ensure accuracy.
Cashier/Staff
This study will help the Cashier track customer transactions and speed the process of
receipt. The system functions to record purchases, and sales, calculate profit and provide
print customer receipts.
Customer
This study will help the customer save time by spending extra time in manages
interactions in the pharmacy.
Researcher
The developed system will enhance and deepen our knowledge in programming and
system development. This will improve our skills in analyzing and solving problems that
may we apply in the real world.
4
Future Researcher
The developed systems will benefit the future researcher by making this their future
reference in conducting similar studies.
1.6 Scope
The project will concentrate on the stock’ control activities and business processes like
maintaining stock levels and automatic placement of orders which will involve the store
management as the major area of concern. The system will analyze financial statements
automatically to aid determine economic feasibility as well as viability of future trends of
growth in the organization. However, the system will also be confined to the crucial stages
of system development life cycle which will include planning, analysis, design and
implementation of a computerized stock control system. Costing of any kind will not be
in figures but will be shallowly discussed as well as issues of user training and the whole
process of transition. Since the system will be built in conjunction with the current system.
a prototype of the proposed system will be produced with an implementation plan.
5
The staff will have adequate time to focus on the growth of the organization and how
best they can maximally utilize the available resources to steer the organization forward.
This will place the organization in a better competitive position.
The system will provide timely and flexible report delivery that in turn allows informed
decision making at the strategic and tactical level of management of the pharmacy. There
is rapid data entry, quick retrieval of common queries and reports and quick retrieval of
information. This will be achieved through creation of a networked environment which
promotes concurrency.
6
should be put in place so as to lay foundation for the system using MySQL and PHP
CodeIgniter.
A user friendly interface to allow the staff to interact freely with the system without
many complications to enhance adding, deleting and viewing of products.
A database which will carry details about the various products in stock and any
other relevant information.
Order processing and shipping details for products ordered.
User Interface
Web Server PHP Engine Database
Browser
The system user will first interact with the user interface which will provide him/her with
means to place a request to the database which maybe adding, deleting or viewing stock
records. The request is passed to server which processes it and include a command to
link the available database the query is executed by the database through the PHP engine
which as a tool to transform the request to a format both the database and the server
can understand. The ~su1ts are passed to the user through the same process.
1.10 Conclusion
A good research stems from a proper analysis of the steps which have to be looked upon
before the actual research is carried out. These steps include background of the study,
statement of the problem, conceptual model, significance of the study, research
methodology all through to the development methodology and tools. The researchers
have carefully and critically thought and analyzed these steps.
7
CHAPTER TWO
Literature Review
2.1 Introduction
This chapter elaborates on the importance of management information systems and
databases as viewed by different authors and researchers, the effects and benefit of
the databases and database management systems, and different analysis and design
techniques used in analyzing the current and in defining user requirements for the
new system.
2.2.2 Information
Information generally, is assigned to data and its definition. A distinction can be clearly
drawn between data and information. Information unlike data can be broadly viewed
as any collected ideas, written or verbal. Whereas data involves facts and figures in
their raw form, information must be processed and useful in planning. Data on the
other hand can be referred to as streams of raw facts representing events occurring
in organizations or the physical environment before they have been organized and
arranged into a form that can be understood and used (Chaudahary, 1997).
8
2.2.3 System
A system in simple terms consists of a set or a group of interrelated elements,
interacting components working together to achieve a stated objective. The
components of a simple system include,
An input that is raw data for processing which may include raw materials,
physical resources, human resources and knowledge of information.
Processing, transforming raw data into useful information. The activities
involved include; sorting, editing, classifying and formatting.
Output. The final processed information for the end user, the result of
operation. It is the objective for which the system is defined.
Feedback. That is to say the function that makes possible the control over the
system operation.
Management information system is therefore used for computer systems in an
organization or an enterprise that provides’ information about its operations. It also
refers to the people ‘who manage these systems.
9
Thus management information system consists of groups of people, sets of data,
machines (computers), equipment’s, store, process and retrieve data for efficient use
in planning as a common goal. (James, 2000).
10
know when to purchase more stock and also records of drugs that have been
prescribed to the client. This will aid to weigh the truth between the pharmacist and
the client making the claim in a case where the client claims to have side effects on
prescribed drugs. The records will also help reflect on sales either daily, weekly or
even monthly helping foster a concrete development plan for the welfare of the
pharmacy.
2.4 Databases
A database is an integrated collection of files in computer system. It is a collection of files
stored in computer in a systematic way such that a computer program can consult and
use it to answer questions.
(Rajaraman, I 996) refers to a database as a collection of related data that are necessary
to manage an organi7ation. It excludes transient data such as input documents, reports
and intermediate results obtained during processing. For better retrieval and sorting
records are usually organized as a set of data elements.
11
are mostly of historical reference that is the data bank forms the basis for data archival
for periodic information generation. On the other hand, the contents of the database are
frequently to generate that influences the concerned organization’s decisions. (Date,200
1).
The DBMS accepts requests for data from the application program and instructs the
operating system to transfer the appropriate data.
When a DBMS is used, information systems can be changed much more easily as the
organizations information requirements change. New categories of data can be added to
the database without disruption to the existing system.
Organizations may use one kind of DBMS for daily transaction processing and then move
the detail onto another computer that uses another DBMS better suited for random
inquiries and analysis. Overall systems design decisions are performed by data
administrators and systems analysts. Detailed database design is performed by database
administrations.
A modeling language to define the schema of each database hosted in the DBMS,
according to the DBMS data model
12
Data structures (fields, records, files and objects) optimized to deal with very large
amounts of data stored on a permanent data storage device (which implies
relatively slow access compared to volatile main memory.
A database query language and report writer to allow users to interactively
interrogate~. the database, analyze its data and update it according to the user’s
privileges on data. It also controls the security of the database. Data security
prevents unauthorized users from viewing or updating the database. Using
passwords, users are allowed access to the entire database or subsets of it called
sub schemas.
A transaction mechanism, that ideally would guarantee the ACID properties, in
order to ensure data integrity, despite concurrent user accesses (concurrency
control), and faults (fault tolerance). It also maintains the integrity of the data in
the database. The DBMS can maintain the integrity of the database by not allowing
more than one user to update the same record at the same time. The DBMS can
help prevent duplicate records via unique index constraints; for example, no two
customers with the same customer numbers (key fields) can be entered into the
database
13
result to technical manipulations. In addition, users don’t have to wait for a
computer professional to provide what they need.
Reduced data redundancy; instead of the same fields repeated in different files in
a database, the information just appears once. The biggest advantage of the
database is that the same information is available to different users. Moreover,
reduced redundancy lowers expense of storage media and hardware because data
can be stored on the media.
Increased security: although various departments may share data in common,
access to specific data can be limited to a specific user thus though the use of
usernames and passwords only legitimates or authorized members can access this
information.
More program independence. With database management systems the program
and the file formats are the same, so that one programmer or even several
programmers can spend less lime maintaining files.
Isolation: The results of transaction are invisible to other transaction until
transactions is complete. For example, if you are running an accounting report at
the time that George is transferring money, the accounting report program will
either see the balances before George transferred the money or after, but never
the intermediate state where checking has been credited but saving yet not
debited
Concurrent access and crash recovery: a DBMS schedules concurrent access to the
data in such a manner that the user can think of the data as being accessed by
only one user at a time
14
Substantial hardware and software start-up cost
2.8 Conclusion
Basing on the above discussed points, it is remarkable that with a rapidly changing
computer industry, designing a sustainable management system is rather a challenging
task. The cost of acquiring, organizing, storing and transmitting information has tumbled,
and in addition advancement in microprocessor technology has led to the dramatic
reduction in the cost of information and information system. Several areas like strategic
business management, globalization, information architecture, information system
investment, responsibility and control are affected by management information concept.
15
CHAPTER THREE
Modelling methodology is the best way to visualize the system to be designed. With
modelling, complex and real-world systems are easily understood, qualities of the system
are predicted and communication with stakeholders concerning the key characteristics is
promoted (Brown, 2004). Models are developed as a way of creating a base for
implementing and testing the physical system. Integration of focus group discussion as
inspired by participatory action research methodology with MDA is of significance. Focus
group discussion can easily be supported by modelling, when it comes to developing
system for users.
“Mode 2” and Triple Helix model to portray an application of applied and context-
driven research work on a specific problem.
Data collection approaches where focus group discussion was emphasized. This
part gives an overview of qualitative research and participatory action research
methodology, with an emphasis on focus group discussion, and briefly explains
the development of the students’ registration database system as the starting point
for creating a good relationship and sense of trust, as well as fostering
sustainability.
16
Design approach in which software engineering was employed. In this part, the
OOSA&D approach with the Unified Modelling Language (UML) were employed
and integrated with Model Driven Architecture which emphasizes the power of the
model in software development.
Selection and customization of open-source platform gives the system the
functionality as specified by the requirements of Mark Pharmacy.
Mirroring of the system and replication of the database to ensure that is readily
available to end users.
Gibbons et al. (1994) exploit the major changes in the way knowledge is being produced
in science and technology, the social sciences and humanities, but mainly in science and
technology. Comparing the traditional way of doing research by academia, which Gibbons
et al. (1994) call “mode 1” and where knowledge is generated within the context of a
discipline and cognition, Mode 2 knowledge is created in a broader, trans-disciplinary
social and economic context. That is, it is a form of knowledge production, which is
context-driven, problem focused and inter-disciplinary. “Context-driven” means research
carried out in the context of application, arising from the very work of problem solving
and not governed by the paradigms of traditional disciplines of knowledge.
Lating, (2009) states that trans-disciplinary work is a form of learning and problem-
solving activity involving co-operation among different parts of society and academia in
order to meet the complex challenges of society. In trans-disciplinary research,
researchers work jointly to develop a shared conceptual framework and methodological
approach that integrates and goes beyond their respective disciplinary perspectives to
address a common problem. Therefore, the research cuts across, between and beyond
disciplines.
17
In the product-based economy, development was driven by industry. This is not possible
in the current knowledge-based economy. Future development in the knowledge
economy is driven by incremental innovation within industry. Innovation can be achieved
as a result of an alliance between government, industry and academia. This is a triple
helix alliance. The purpose of the triple helix is to stimulate knowledge-based economic
development, drawing on the resources of all three members of the helix (Lating, 2009).
Walsh, (2001) defines the “triple helix” as a partnership between industrial, academic and
governmental institutions, which recognizes the differing goals and stakeholder
communities of the three groups, but stresses the common interest of those groups to
provide value to the institutions in which they reside. The triple helix concept realizes that
the loose links among these three parties have to be tightened. A more open and
intensified communication has to be established between academic and business
communities, business and government, and government and educational institutions. In
addition to their primary tasks of higher education and academic research, the universities
are also expected to provide both highly qualified personnel and results of research for
use in economic contexts (Kadiman, 2006).
Mode 1 knowledge is closely related to basic (also called fundamental or pure) research,
which is driven by a scientist’s curiosity or interest in a scientific question. The main
motivation is to expand man’s knowledge, not to create or invent something. There is no
obvious commercial value to the discovery that results from basic research. Kuhn (1996)
states that the term “basic” or “fundamental” research indicates that, through theory
generation, basic research provides the foundation for further, often applied research.
With application of “mode 2” and “triple helix”, the research was designed with a number
of methods in order to integrate the collaboration of actors through focus group
interviews and software development. The different methods are introduced below.
18
engineering is the application of a systematic, disciplined, quantifiable approach to the
development, operation, and maintenance of software, and the study of these
approaches. Software engineering addresses the system development life cycle in a
systematic way. The followings were used in designing the Web-based e-learning
management system:
Yourdon (1991) says that the structured approach has since been reckoned to be the
most widely used. Yourdon (1991), Davis (1983) and Kendall (1996), also explain that
the structured approach prescribes analyzing and designing software through functional
decomposition. It examines an information system in terms of the functions it performs
and the data it uses and maintains. The structured approach identifies the major functions
or processes of a system, then breaks or decomposes each function down into its smaller
composite steps (Davis, 1983; Kendall, 1996). Furthermore, techniques which are
invariably present in many methodologies, such as entity relationship diagrams, dataflow
diagrams and data dictionaries, are also clearly mentioned.
Thomann (1994) indicates that the OO approach has been identified as the new paradigm
for system development. OO decomposes the system into objects, that is, it examines
the system in terms of the components in the system and how these components act and
interrelate. The analyst first identifies the objects that comprise the system, then creates
an object model which groups the objects into classes, and describes each class in terms
of its attributes (or data), methods (or functions) and relationships with other classes
(Schach, 2004).
The key idea in the OO approach is that the real world can be accurately described as a
collection of objects that interact. An object model includes four components: objects
(that is abstract data structures), classes (i.e., abstract data types), inheritance
(hierarchical relationships among abstract data types) and polymorphism.
19
In software development, a successful information system is subject to frequent
evaluation and revision within the SDLC. Davis et al. (1988) argue that SDLC is the basis
for most software development methodologies. Pressman (1997) adds to this by pointing
out that a system’s life cycle consists of four principal phases:
These phases address what is to be built, how it will be built, building it and ensuring the
quality to highest possible standard.
This research adopted the OO software development approach with UML. Using this
approach Booch et al. (2001 and 2005) argue that the process of object-oriented analysis
(OOA) from SDLC is composed of the following activities: requirement capturing,
specification component identification, and specification representation. During
requirement capturing, several function-viewed notations are used, including the context
20
diagram of the structured analysis technique, use case diagrams and activity diagrams of
the UML. During specification component identification a systematic procedure is provided
to identify classes and their attributes from the data, and to identify class operations from
class, responsibility and collaborator cards, and during specification representation most
notations used are from UML.
UML is the standard language for specifying, visualizing, constructing, and documenting
all the components of a software system (OMG, 2003b). With UML, a software system
can be described at various levels of granularity (for example, the system, the subsystem,
and the class levels) and from various viewpoints (for example, the logical view and the
use-case view). UML helps to simplify the process of software design, making a model
for construction with a number of different views. UML can help in the following ways:
aiding understanding of complex systems, exploring and comparing design alternatives
at low cost, forming a foundation for implementation, capturing requirements precisely,
communicating decisions unambiguously and simplifying reality. UML is also the one
adopted by MDA, which is also used in this research.
Brown et al. (2005) insist that models provide abstractions of a physical system that allow
engineers to reason about that system by ignoring extraneous details while focusing on
relevant ones. All forms of engineering rely on models to understand complex, real-world
systems. Models are used in many ways, which are to predict system quality, reason
about specific properties when aspects of the system are changed, and communicate key
system characteristics to various stakeholders. The models may be developed as an
originator to implement the physical system, or they may be derived from an existing
system or a system in development as an aid to understanding its behavior.
As stated earlier, MDA is supposed to provide a basic technical framework for information
integration and tool interoperability based on the separation of the PSM from the PIM. To
support these principles, the OMG has defined a specific set of layers and transformations
that provide the conceptual framework and vocabulary of MDA as summarized in figure
2.
22
Computation Independent Model (CIM)
Manual Transformation
Platform Independent Model (PIM)
Transformation
T
Transformation
T
Code
The set of layers defined includes the computation independent model (CIM), the PIM
and the PSM. Along with the conceptual framework, OMG through MDA has also provided
a set of standards to express models, model relationships and model-to-model
transformations (OMG, 2003a).
23
A platform specific model is the view of the system from the platform specific
view-point. A PSM combines the specifications in the PIM with the details that
specify how that system uses a particular type of platform. The platform specific
view-point combines the platform independent viewpoint with an additional focus
on the detail of the use of a specific platform by the system.
24
System Requirement and Specification:
CIM
Use Case Diagram
Manual
Transformation
System Analysis and part of System Design:
Conceptual Diagram
System Sequence PIM
System Operations Contracts
Collaboration Diagrams OS eLMS
Platform
System Design:
Design Class Diagram (DCD)
Transformation
(Manual)
PIM Transformation to Specific PIM:
25
3.3 Data Collection
Research methods can be classified in various ways; the main two are quantitative and
qualitative. Both have been employed in this research, although qualitative research
methodology has been employed to a greater extent.
Interview
Semi structured interview for the sample suppliers were conducted with selected
stakeholders of the pharmacy (management, staff and customers). Semi
structured interviews are most frequently used in an explanatory research and it
is used to explain themes that have emerged from the use of questionnaires
(Bryman, 2006). Therefore, semi structured interview was appropriate for this
study.
Questionnaires
Questionnaires were used to collect information from Mack Pharmacy Staff, and
customers. This help to compare data and information which was collected within
a short time. It was administered by self and voluntary cooperation of respondents.
Physical Observation
Physical observation of the real status of the pharmacy, the number of staff and
customer flow, the presence of computers and their utilization. Others included
the availability of electricity, a school LAN, public connectivity such as telephone
lines.
26
3.3.2 Secondary Sources of Information
Data collection did not stop with primary sources of information using qualitative research
methodology. Data were collected from secondary sources of information by going
through existing relevant documents and texts, which included, documents searched for
on the Internet relating to pharmacy management system.
It can be seen from the above table that 50 questionnaires were administered to the
target population, of which 40 students were returned which implies that 80% retrieval
rate was gotten while 10 did not return theirs which implies a non-retrieval rate of 10%.
27
Demography of Respondents
Table 2. Gender and Age respondents
Frequency Percentage
Sex Male 27 54%
Female 23 46%
Total 50
Age 18-22 15 30%
23-30 20 40%
30-35 15 30%
35-above - -
No Response - -
From table 3.2 above, 54% of our respondents are male while 46% respondents are
female. Interestingly, 30% of the sample is within 18-22years, 40% are within 23-30 and
only 30% are between 30-35 years.
28
is lack collaboration between concerned departments when it comes to the use of data
that has been collected by the various departments leading to replication and lack of
integrity. A lot of time could be saved especially in collecting the same information that
may already be available in another department. This occurs because doubts are cast on
the accuracy of the figures. It is important for relevant information to become only
available to the relevant people. Retrieval of information was also a major concern as it
was tedious and time wasting.
Yourdon (1991) says that the structured approach has since been reckoned to be the
most widely used. Yourdon (1991), Davis (1983) and Kendall (1996), also explain that
the structured approach prescribes analyzing and designing software through functional
decomposition. It examines an information system in terms of the functions it performs
and the data it uses and maintains. The structured approach identifies the major functions
or processes of a system, then breaks or decomposes each function down into its smaller
composite steps (Davis, 1983; Kendall, 1996). Furthermore, techniques which are
invariably present in many methodologies, such as entity relationship diagrams, dataflow
diagrams and data dictionaries, are also clearly mentioned.
29
Thomann (1994) indicates that the OO approach has been identified as the new paradigm
for system development. OO decomposes the system into objects, that is, it examines
the system in terms of the components in the system and how these components act and
interrelate. The analyst first identifies the objects that comprise the system, then creates
an object model which groups the objects into classes, and describes each class in terms
of its attributes (or data), methods (or functions) and relationships with other classes
(Schach, 2004).
The key idea in the OO approach is that the real world can be accurately described as a
collection of objects that interact. An object model includes four components: objects
(that is abstract data structures), classes (i.e., abstract data types), inheritance
(hierarchical relationships among abstract data types) and polymorphism.
These phases address what is to be built, how it will be built, building it and ensuring the
quality to highest possible standard.
This research adopted the OO software development approach with UML. Using this
approach Booch et al. (2001 and 2005) argue that the process of object-oriented analysis
(OOA) from SDLC is composed of the following activities: requirement capturing,
specification component identification, and specification representation. During
requirement capturing, several function-viewed notations are used, including the context
diagram of the structured analysis technique, use case diagrams and activity diagrams of
the UML. During specification component identification a systematic procedure is provided
to identify classes and their attributes from the data, and to identify class operations from
class, responsibility and collaborator cards, and during specification representation most
notations used are from UML.
UML is the standard language for specifying, visualizing, constructing, and documenting
all the components of a software system (OMG, 2003b). With UML, a software system
can be described at various levels of granularity (for example, the system, the subsystem,
and the class levels) and from various viewpoints (for example, the logical view and the
use-case view). UML helps to simplify the process of software design, making a model
for construction with a number of different views. UML can help in the following ways:
31
aiding understanding of complex systems, exploring and comparing design alternatives
at low cost, forming a foundation for implementation, capturing requirements precisely,
communicating decisions unambiguously and simplifying reality. UML is also the one
adopted by MDA, which is also used in this research.
32
easier to understand and use. However, relational databases have been challenged by
object databases, which were introduced in an attempt to address the object-relational
impedance mismatch in relational database, and XML databases.
33
modification and developments are done. Project milestones and deliverables are
also presented to the supervisor.
34
3.11 Project Scheduling:
An elementary Gantt chart or Timeline chart for the development plan is given below.
The plan explains the tasks versus the time (in weeks) they will take to complete.
Table 3. Project Scheduling
Requirement
Gathering
Analysis
Design
Coding
Testing
Implement
W1 W2 W3 W4 W1 W2 W3 W4 W1 W2 W3 W4
35
This project makes a novel attempt to address the issue of program analysis and
generation of diagrams, which can depict the structure of a program in a better way.
Today, UML is being considered as an industrial standard for software engineering design
process. It essentially provides several diagramming tools that can express different
aspects/ characteristics of program such as:
36
3.13 UML Model
UML stands for Unified Modeling Language is the successor to the wave of Object-
Oriented Analysis and Design (OOA&D) methods that appeared in the late 80's. It most
directly unifies the methods of Booch, Rumbaugh (OMT) and Jacobson. The UML is called
a modeling language, not a method. Most methods consist at least in principle, of both a
modeling language and a process. The Modeling language is that notation that methods
used to express design.
Notation is a graphical stuff; it is the syntax of the modelling language. For instance, class
diagram notation defines how items are concepts such as class, association, and
multiplicity are represented. These are:
Class-Diagram: The class diagram technique has become truly central within object-
oriented methods. Virtually every method has included some variation on this technique.
Class diagram is also subject to the greatest range of modeling concept. Although the
basic elements are needed by everyone, advanced concepts are used less often.
A class diagram describes the types of objects in the system and the various kinds of
static relationship that exist among them. There are two principal kinds of static
relationship:
Association
Subtype
Class diagram also show the attributes and operations of a class and the constraints that
apply to the way objects are connected.
37
Generalization: A typical example of generalization evolves the personal and corporate
customer of a business. They have differences but also many similarities. The similarities
can be placed in generalization with personal customer and corporate customer sub type.
Aggregation: Aggregation is the part of relationship. It is like saying a car has engine
and wheels as its parts. This sounds good, but difficult thing is considering, what is the
difference in aggregation and association.
Interaction: Interaction diagram is a type of UML diagram that's used to capture the
interactive behavior of a system. Interaction diagrams focus on describing the flow of
messages within a system, providing context for one or more lifelines within a system.
Typically, an interaction diagram captures the behavior of a single use cases. The diagram
shows a number of example objects and the messages that are passed between these
objects in use cases.
Objects can send message to another. Each message is checks with given stock item.
These are two diagrams: Sequence and Collaboration.
Package Diagram: One of the oldest questions in software is: how do you break down
a large system into smaller systems? It becomes difficult to understand and the changes
we make to them.
Structured methods used functional decomposition in which the overall system was
mapped as a function broken down into sub function, which is further broken down into
sub function and so forth. The separation of process data is gone, functional
decomposition is gone, but the old question is still remained. One idea is to group the
classes together into higher-level unit. This idea, applied very loosely, appears in many
objects. In UML, this grouping mechanism is package. Package diagrams are used to
reflect the organization of packages and their elements. When used to represent class
elements, package diagrams provide a visualization of the namespaces. The most
common use for package diagrams is to organize use case diagrams and class diagrams,
although the use of package diagrams is not limited to these UML elements.
38
State Diagram: State diagram are a familiar technique to describe the behavior of a
system. They describe all the possible states a particular object can get into and how the
objects state changes as a result of events that reach the objects. In most OO technique,
state diagrams are drawn for a single class to show the lifetime behavior of a single
object. There are many forms of state diagram, each with slightly different semantics.
The most popular one used in OO technique is based on David Harel’s state chart.
The purpose of the use case is to define a piece of coherent behavior without revealing
the internal structure of the system. A use case typically represents a sequence of
interaction between the user and the system. These interactions consist of one main line
sequence that represent the normal interaction between the user and the system. The
use case model is an important analysis and design artifact (task). Use cases can be
represented by drawing a use case diagram and writing an accompany text elaborating
the drawing.
Use case represents a set of actions performed by a system for a specific goal. The
purposes of use case diagrams can be as follows:
39
appears inside the rectangle. The different users of the system are represented by using
stick person icon. The stick person icon is normally referred to as an Actor. The line
connecting the actor and the use cases is called the communication relationship. When a
stick person icon represents an external system, it is annotated by the stereo system.
The primary actors of the system are administrator, teacher and student.
Administrator
Login
Create Options
Manage Inventory
Manage Sales
Manage
Accounting
Manage Users
(Staff)
40
b. Use Case diagram for the staff
Staff
Login
Sell
Print Receipt
View Stock
The above diagram illustrates the activities of the students who are the users of the
website.
41
A DFD describes what data flow rather than how they are processed, so it does not
hardware, software and data structure.
The data flow diagram (DFD) is a graphical representation of the flow of data through an
information system, modeling its process aspect. A data flow diagram (DFD) is a
significant modeling technique for analyzing and constructing information processes. DFD
literally means an illustration that explains the course or movement of information in a
process. DFD illustrates this flow of Information in a process based on the inputs and
outputs. A DFD can be referred to as a Process Model.
The data flow diagram is a graphical description of a system's data and how to process
transform the data is known as Data Flow Diagram (DFD).
Unlike details flow chart, DFDs don't supply detail descriptions of modules that graphically
describe a system's data and how the data interact with the system.
Data flow diagram number of symbols and the following symbols are of by DeMarco.
Process
Data Store
Source/Link
Data Flow
42
3.16 Context Level Data Flow Diagram
ADMINISTRATOR
STAFF
PMS OUTPUT
CUSTOMER
SUPPLIER
Figure 8 above shows the context level diagram of the system. The users of the system
are administrator and staff.
This basic DFD can be then disintegrated to a lower-level diagram demonstrating smaller
steps exhibiting details of the system that IS being modeled. On a DFD, data Items flow
from an external data source or an internal data store to an internal data store or an
external data sink, via an internal process. It is common practice to draw a MN text-level
data flow diagram first, which shows the interaction between the system and external
agents, which act as data sources and data sinks. On the context diagram (also known
as the Level 0 DFD'), the system's Interactions with the outside world are modeled purely
in terms of data flows across the system boundary. The context diagram shows the entire
system as a Single process, and gives no clues as to its internal organization.
This context-level DFD is next "exploded", to produce a Level 1 DFD that shows some of
the detail of the system being modeled. The Level 1 DFD shows how the system is divided
into sub-systems (processes), each of which deals with one or more of the data flows to
43
or from an external agent, and which together provide all of the functionality of the
system as a whole. The level 1 DFD is further speeded and split into more descriptive and
detailed description about the project as level 2 DFD. The level 2 DFD can be a number
of data flows which will finally show the entire description of the software project.
Supply
Management
Customer
Management
Staff
PMS
Management
System User
Management
Login Admin
Pharmacy
Customers Management Generate
Management Customer Report
System
45
First Level Data Flow Diagram
Second Level Data Flow Diagram (2nd Level DFD)
DFD Level 2 then goes one step deeper into parts of Level 1 of the system. It may require
more functionalities of E-Learning to reach the necessary level of detail about the system
functioning. First Level DFD (1st Level) of System Management System shows how the
system is divided into sub-systems (processes). The 2nd Level DFD contains more details
of Staff, Supplier, Stock, and Customer.
Login to Check
Admin Roles of
System
Access
Manage Staff
Details
Forget
Passwor
d Check Manage
Credentials Drugs Manage Inventory
Details
Manage
Accounting
Details
Manage Option
Manage Report Details Manage Sales
Details
46
3.17 Entity Relational Diagram
E-R Model is a popular high-level conceptual data model. This model and its variations
are frequently used for the conceptual design of database application and many database
design tools employ its concept.
Attributes
Relations
o Many-to-many
o Many-to-one
o One-to-many
o One-to-one
Weak entities
Sub-type and super-type
The entities and their relationships between them are shown using the following
conventions:
The attributes shown as ovals are connected to the entities or relationship by lines.
48
Figure 11. E – R Diagram
49
3.18 Activity Diagram
An activity diagram is a behavioral diagram i.e.; it depicts the behavior of a system.
An activity diagram portrays the control flow from a start point to a finish point showing
the various decision paths that exist while the activity is being executed. We can depict
both sequential processing and concurrent processing of activities using an activity
diagram. They are used in business and process modelling where their primary use is to
depict the dynamic aspects of a system. An activity diagram is very similar to a
flowchart.
Login
Admin Staff
Sell
Create Manage Manage Manage
Accounting Medicine
Inventory Sales Staff
Option
Sell Sales
Create Staff
Medicine Statement
Create
Profit & Loss
Medicine
Supplier Purchase Insert
Payment Statement Medicine
Info
50
3.19 High Level Model Diagram of the Present System
This is a way of finding tool for both business and IT professionals which uses a set of
symbols and text to precisely explain a subset of real information to improve
communication within an organization and thereby lead to a more flexible and stable
application environment (Horberman, 2009). The high-level model language used in this
work depicts how information is passed within the system starting from the top-level
users.
HOME
SCREEN
Staff ADMINISTRATOR
MANAGE USERS
MANAGE SALE
Figure 13. High Level Model Diagram for the Present System
51
i. System Administrator
d. Manage Account
e. Manage sale
ii. Staff
b. View report
52
CHAPTER FOUR
Systems Implementation
4.0 Introduction
In order to fully implements the newly designed system, it is necessary that the detail
and the method of implementation be properly communicated with the area of interest
or involved. There are several clearly identifiable areas of activities in the implementation
of this new system. These include coding, testing, introduction of the new clerical
procedure and change order plan. It involves installing all the necessary equipment, the
directions and principles to follows in order to achieve the desired goals and objectives
effectively.
53
6. MySQL (Structured Query Language) works with the PHP scripting language to
send and receive data from the database.
The Application used to achieve this system include Sublime Text 3, a WAMP local server
and web browsers (Microsoft Edge or Chrome)
System requirements are all of the requirements at the system level that describe the
functions which the system as a whole should fulfill to satisfy the stakeholder needs and
requirements, and are expressed in an appropriate combination of textual statements,
views, and non-functional requirements; the latter expressing the levels of safety,
security, reliability, etc., that will be necessary.
54
Table 4. Software Requirements:
These listed configurations are the minimum requirement but if the configurations are
higher the report derived will definitely be better and the program will run much faster.
4.2.1 People
Since the new application is a computer application, the user should be qualified computer
literate, so as to ensure efficient usage of the new system. The books can be read online
or downloaded to be read offline.
55
4.3 Implementation Details
This Application is a web application and requires a server to run on due to the server-
side language used in its development. If you try to run any of the pages containing these
scripts without a server, it will return error message. To this effect, a local server "WAMP"
is packed with this Application.
How to Install (For Local Server on Personal Computer)
1. Copy the project file and head over to your WAMPP directory.
2. There you’ll find a folder naming “www”.
3. Inside the “www” folder, paste the project folder.
4. Open your favorite browser; we recommend using Google Chrome or Mozilla
Firefox.
5. Then, go to URL “http://localhost/phpmyadmin “.
6. Create a Database with a name that is provided inside the “01 LOGIN DETAILS &
PROJECT INFO.txt”.
7. Click on the “Import” tab and choose the database file (.sql) which is provided
under the folder naming “DATABASE FILE”.
8. After setting up all these, go to URL “http://localhost/” PROJECT_FOLDER_NAME
9. All the login details are provided inside the project folder, check that out and
enter in order to use it.
56
The program implementation includes all the activities that are carried out in order to put
the program designed into a functional or practical state. All activities like programming,
installation is coordinated to put the new system in operation. The implementation stages
include coding, system testing, file conversion, commission, user manuals and
maintenance detail etc.
4.3.1 Coding
The coding system has been developed to meet the following main objectives:
1. To support the objectives of this research work.
2. To contribute to a quick project initiation and minimum project execution time.
3. To ensure common coding for multifunctional modules.
4. To support functional breakdown of related documentation of systems,
subsystems and reuse.
See coding at appendix B
4.3.4 Commissioning
The new system has to be commissioned to declare it is officially open for usage, and it
is also a way of advertising to people that such a new system has started existing. Since
57
the new system is web based, the commissioning should be or involve hosting the web
site to enable it efficient use on the internet by those people interested in it.
1. Corrective maintenance
2. Adaptive maintenance
3. Preventive maintenance
Corrective Maintenance: This covers maintenance, which is needed to put right coding
errors and other faults, which may be introduced into the software. It includes, the routine
“debugging” of newly produced or recently amended code and emergency error
correction in response to report faults.
Adaptive Maintenance: This covers the changes which are made to the software to
meet new or changed circumstances, such as restructuring of a database, alternatives in
operating procedures and changes to hardware or software versions.
Preventive Maintenance: This covers attempts to make the software perform more
effectively. It includes user requests for enhancement, improvement due to experience,
changes to make the software easier to use and rewrite the code to make the
maintenance that is specifically used for the new system to reduce its chances of
breakages.
58
CHAPTER FIVE
5.1 Introduction
This chapter highlights on the discussion of recommendations and conclusion drawn as a
result of completing this project.
5.2 Discussion
After the research it was established that the current manual system had various
shortcomings. The system was completely manual. These machines were slow and
inefficient. The- new system was implemented with six new computer sets with improved
speed and relatively larger external memory. This eliminated the data storage problems
and the time wasted to retrieve data as the computers were more reliable. The computers
within the premises were also networked allowing easier sharing of information between
various departments. The new system was designed with various interfaces which
allowed for easy and controlled data validation and this eliminated the greatest setback
of uncontrolled data access that the organization was facing, Data replication and
integrity was greatly improved as it was easier to enter new records, delete redundant
records and validate data stored. This in turn ensured greater productivity from the staff
as little time was used to manipulate records. Reports helped the administration to make
informed decision and planning strategies, placing the organization in a better competitive
position.
5.3 Recommendations
We recommended before the application is put into full use it should be further
tested in sample field to eliminate any bugs that may not have been identified at
the time of development.
Password levels may be increased to higher levels depending on the confidentiality
of the stored data. The current system password is basically low level.
59
If opportunity allows, we hope that the features that have not been implemented
in this application but were originally desired features will be implemented in order
to improve on the efficiency, reliability and user friendliness of this system. These
features include: external networking (the internet) which will allow automatic
placement of orders from the suppliers.
We recommend the appointment of systems administrator who will be in charge
of maintaining the system and also user training on the use of the new system.
5.4 Conclusion
The system reflects the full requirements of the organization as it was required. The
research was successful but with many challenges. The time frame for the research was
limited and it was not easy to come up with an all-inclusive list of requirements for the
organization. Financial constraints were also a great challenge as not much was available
for us to carry out our mandate effectively. Software acquisition necessary to build the
system like PHP Code Igniter and WAMP (MySQL) server software’s were not easy to get
and they also needed expertise to use. There also were great lessons learnt as well
concerning good time management, thorough requirements analysis and preparedness
in terms of tools for development.
60
References
1. Chaudahary, A., 1997. Encyclopedia Of Management Information System,.
S.L.:S.N.
4. H., J. D., 2004. Learning To Solve Problems - An Institutional Design Guide, S.L.:
Wiley & Sons.
61
APPENDIX I -Sample Questionnaire
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
appropriate)
4. What are some other challenges that you face while undertaking these
procedures?
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
5. Is there any step that has been taken as a remedy to the challenges faced?
62
If yes, please state it (them)
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
If yes, what are some of the activities they perform and how do you ensure that every
record is where it is supposed to be?
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
10. Other than dealing with drugs, are there any other activities that take place in
this pharmacy.
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………
64
APPENDIX II-Budget
65
APPENDIX III - Introductory Letter
FREETOWN
LUMLEY
FREETOWN
Dear sir/Madam,
We look forward for your positive response and approval of our request.
Yours faithfully,
66
APPENDIX IV - Screen Short
Login Screen
This screen is basically used for authentication purposes. The user is required to prove
his/her authenticity through a username and a password as shown above. If the wrong
password is entered, then access to the system is denied and the user is prompted to
enter the correct username and password.
Dashboard
67
The above screen is basically used to display the inventory overview.
This screen enable users to add new drugs into the system by selecting the drop down
arrow under generic name and chose the drugs followed by the next column which is
medicine name which the user has to type manually.
68
This screen enable user to create medicine presentation. By indicating wether the
medicine is a tablet, syrup or capsule.
This screen enable user to create the generic name of the medicine. For instance
paracetamole or Antiviral drugs.
Create Supplier
69
The above supplier form inputs the supplier’s personal data and stores them in the
database in the supplier’s table. It can also validate the fields incase improper data has
been entered by deleting it and re-enter.
The medicine purchase form is used to input the medicine details for the pharmacy. It
stores the records captured in the database. The records can as well be manipulated
through the various functionalities available like; a record can be deleted, you can add a
new record and save it as well as access records consecutively by scrolling down and you
can also validate data.
70
Purchase Statement
The above purchase statement form enable user to generate purchase statement on each
drugs on a daily, weekly or monthly basis.
Supplier Payment
The above Supplier Payment form will enable user to generate specific supplier details.
The Sell Medicine form is used to input the medicine details for the pharmacy. It stores
the records captured in the database. The records can as well be manipulated through
the various functionalities available like; you can add a new record and save it, and after
adding it you can click on the sell button to print invoice for the customer. You can also
delete records.
71
Sale Statement
The sale statement form enable user to generate sale statement on each drugs on a daily,
weekly or monthly basis.
The Profit & Loss form enable user to generate profit or loss on a daily, weekly or monthly
basis.
72
The report can be used to make informed decisions on when whether the pharmacy is
making profit or loss.
Create Staff
The staff form is used to input the staff details for the pharmacy. It stores the records
captured in the database. The records can as well be manipulated through the various
functionalities available like; a record can be deleted; you can edit the record as well.
Passwords are encrypted for users.
73
APPENDIX V - Code
Dashboard
<section id="main">
<div class="container">
<div class="row">
<div class="col-md-12">
</div>
<div class="panel-body">
<div class="col-md-4">
<h4>Medicine Type</h4>
</div>
</div>
<div class="col-md-4">
74
<h2> <span class="fas fa-cart-plus" aria-hidden="true"
style="color: #f0ad4e;"></span> <?php echo 'Le '.$today_purchase_number;
?></h2>
</div>
</div>
<div class="col-md-4">
</div>
</div>
<div class="col-md-4">
</div>
</div>
<div class="col-md-4">
75
<h2> <span class="glyphicon glyphicon-fire" aria-
hidden="true" style="color: orange;"></span> <?php echo 'Le '.$today_sale_number;
?></h2>
</div>
</div>
<div class="col-md-4">
</div>
</div>
<div class="col-md-4">
</div>
</div>
<div class="col-md-4">
76
<div class="well dash-box">
<h4> Medicines</h4>
</div>
</div>
<div class="col-md-4">
<h4> Staffs</h4>
</div>
</div>
</div>
</div>
</div >
</div >
</section>
77
Manage Staff
<?php
if ($msg == "main") {
$msg = "";
?>
<section id="breadcrumb">
<div class="container">
<ol class="breadcrumb">
</ol>
</div>
78
</section>
<section id="main">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="list-group">
</div>
</div>
<div class="col-md-9">
79
</div>
<div class="panel-body">
<?php echo
form_open_multipart('Insert/create_staff'); ?>
<div class="box-body">
<div class="row">
<div class="col-sm-6">
<label
for="username">Username</label>
<input type="text"
class="form-control" id="username" placeholder="" name="username">
</div>
<div class="col-sm-6">
<label
for="password">Password</label>
<input type="password"
class="form-control" id="password" placeholder="" name="password">
</div>
</div>
<div class="row">
80
<div class="col-sm-4"
style="margin-top: 17px;">
<button type="submit"
class="pull-left btn btn-primary">Create</button>
</div>
</div>
</form>
</div>
</div>
<div class="panel-heading">
</div>
<div class="panel-body">
<div class="panel-body">
<thead>
<tr>
<th style="text-align:
center;">#</th>
81
<th style="text-align:
center;">Username</th>
<th style="text-align:
center;">Action</th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
foreach ($all_value as
$single_value) {
$count++;
?>
<tr>
<td style="text-
align: center;"><?php echo $count; ?></td>
<td style="text-
align: center;"><?php echo $single_value->username; ?></td>
<td style="text-
align: center;">
<a
style="margin: 5px;" class="btn btn-danger"
82
href="<?php echo base_url(); ?>Delete/manage_staff/<?php echo $single_value->id;
?>">Delete
</a>
<a
style="margin: 5px;" class="btn btn-success"
</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
83
Sell Product
<?php
if ($msg == "main") {
$msg = "";
?>
<section id="breadcrumb">
<ol class="breadcrumb">
</ol>
</div>
84
</section>
<section id="main">
<div class="container">
<div class="row">
<div class="list-group">
class="list-group-item">
class="list-group-item">
85
<!-- <a href="--><?php //echo base_url(); ?><!--
ShowForm/medicine_purchase_statement/main" class="list-group-item">-->
<!-- <span
class="fa fa-plus" aria-hidden="true"></span> Ledger</a>-->
</div>
</div>
</div>
<div class="panel-body">
86
<div class="box-body" >
<div class="row">
<label
for="date">Date</label>
<input type="text"
class="form-control datepicker"
autocomplete="off">
</div>
<label
for="customer_name">Customer Mail</label>
<input type="email"
class="form-control"
autocomplete="off" required>
</div>
87
<div class="col-sm-7" style="">
<label
for="medicine_name">Medicine Name</label>
<select
name="medicine_name" id="medicine_name" class="form-control selectpicker"
data-live-
search="true">
<option value="">-
- Select --</option>
<?php foreach
($all_value as $info) {
if($info-
>medicine_name != '') {
?>
<option
value="<?php echo $info->medicine_name_id."###".$info-
>medicine_name."###".$info->generic_name."###".$info->medicine_presentation;
?>"><?php echo $info->medicine_name." - ".$info->generic_name." - ".$info->unit."
[ ".$info->medicine_presentation." - ".$info->qty." ]"; ?></option>
<?php }} ?>
</select>
</div>
<div class="col-sm-4">
<label
for="qty">Quantity</label>
88
<input type="number"
class="form-control" id="qty" name="qty" value="0" autocomplete="off">
</div>
<div class="col-sm-4">
<label
for="unit_sales_price">Selling Price</label>
<input type="number"
class="form-control" id="unit_sales_price" placeholder="Le"
name="unit_sales_price" readonly>
</div>
<div class="col-sm-4">
<label
for="purchase_price">Total Amount</label>
<input type="number"
class="form-control" id="purchase_price" placeholder="Le"
name="purchase_price" readonly>
</div>
<div class="col-sm-4"
style="margin-top: 25px;">
89
<button type="button"
class="pull-left btn btn-primary" id="add_item">ADD</button>
</div>
</div>
</div>
</div>
</div>
<div class="panel-heading">
</div>
<thead>
<tr>
90
<th style="text-align:
center;">Date</th>
<th style="text-align:
center;">Medicine</th>
<th style="text-align:
center;">Quantity</th>
<th style="text-align:
center;">Amount</th>
<th style="text-align:
left;">Action</th>
</tr>
</thead>
<tbody id="show_all_sales">
</tbody>
<tr>
<td colspan="">
Amount<input type="text"
class="form-control" id="amount"
style="color:
black; border: black 2px solid;"
91
value="0"
name="amount" readonly>
</td>
<td colspan="">
Discount<input type="number"
class="form-control" id="discount"
value="0"
placeholder="Discount" name="discount">
</td>
<td colspan="2">
name="sub_total" readonly>
</td>
<td colspan="2">
Amount Paid<input
type="number" class="form-control" id="pay"
value="0"
style="color: black; border: black 2px solid;" name="pay">
92
</td>
<!-- value="0"
style="color: black; border: black 2px solid;" name="due"-->
<!-- readonly>-->
<!-- </td>-->
<td colspan="2">
<div style="margin-top:
20px;color: #a61717;">
id="sell_btn">Sell</button>
</div>
</td>
</tr>
</table>
</div>
</div>
93
</div> <!-- /.Container -->
</section>
<script type="text/javascript">
var post_data = {
'medicine_name': medicine_name,'medicine_name_id':
medicine_name_id,
};
$.ajax({
type: "POST",
data: post_data,
94
$('#unit_sales_price').val(data);
});
//amount calculation
$('#purchase_price').val(total);
});
ADD MEDICINE
var complete_total = 0;
var product_count = 0;
$("#add_item").click(function () {
95
var generic_name = medicine[2];
all_purchase[product_count] = new
Array(date,medicine_name,unit_sales_price,qty,purchase_price,
var test_total = 0;
test_total += Number(all_purchase[i][4]);
full_table += "<tr>";
$('#show_all_sales').html(full_table);
$('#unit_sales_price').val('');
96
$('#qty').val('0');
$('#medicine_name').val('');$('#purchase_price').val('');
product_count++;
complete_total = test_total;
calculation();
});
function delete_data(arr_no) {
all_purchase.splice(arr_no, 1);
var test_total = 0;
test_total += Number(all_purchase[i][5]);
full_table += "<tr>";
$('#show_all_sales').html(full_table)
97
product_count--;
console.log(all_purchase);
complete_total = test_total;
calculation();
calculation();
});
function calculation() {
$('#amount').val(complete_total);
if (discount == "") {
discount = 0;
$('#sub_total').val(Number(complete_total - discount));
if (pay == "") {
pay = 0;
98
if (after_pay >= 0) {
$('#due').val(after_pay);
$("#sell_btn").click(function () {
//$(#no_print4).hide();
if(pay == 0 || pay<0){
alert("Can't Sell");
}else {
var post_data = {
'all_purchase': all_purchase
};
$.ajax({
type: "POST",
99
data: post_data,
$('#full_page').html(data);
});
});
</script>
100