You are on page 1of 27



This report is submitted in partial fulfillment of the requirements for the Bachelor of Computer Science (Database Management)



The Distributed Database Pharmacy Management System (PMS) is developed especially for Pharmacy Murni, which is located at Batu Pahat, Johor. This application is developed to manage the medicine inventory and provide backup and recovery for security management of information in the pharmacy. It is an online system which can only be access within three main users; there are database administrator, pharmacist and pharmacist assistant. Only authorized user can login into the system and view the PMS application. The database administrator will maintain the backup and recovery and user privilege to view the system. Besides that, pharmacist's job is to manage the sales record of medicine besides using the medicine selector to choose the suitable medicine for specific symptom name. Furthermore, the pharmacist assistant job is to manage the order, payment and supplier details. On the other hand, this PMS application is focused more on database management of medicine besides maintaining the backup and recovery for the records in the database. The methodology of this system is System Development Life Cycle, SDLC and Database Life Cycle, DBLC. An analysis study has been done based on the current manual system and all the problems statements and requirements have been identified. Moreover, PMS is three tier architecture system which involves client tier, application tier or business tier and database management tier. The interfaces for PMS have been designed according to the requirement and needs of the current market. This Distributed Database Pharmacy Management System, (PMS) will help to improve the performance of current situation and overcome the problems that arise nowadays.


Distributed Database Pharmacy Management System (PMS) telah dibangunkan khasnya untuk Farmasi Murni di Batu Pahat, Johor. Sistem ini dibangunkan untuk menguruskan inventori ubat-ubatan di dalam farmasi serta membekalkan backup and recovery untuk kawalan keselamatan maklurnat di dalam farmasi. Sistem ini boleh diakses melalui internet dan hanya boleh digunakan mtuk tiga pengguna iaitu pengurus pangkalan data, ahli f m a s i dan pembantu ahli farmasi. Hanya pengguna yang sah sahaja boleh mengakses data melalui aplikasi PMS. Pengurus pangkalan data akan mengawal backup and recovery clan menguruskan hak keistimewaan pengguna untuk melihat aplikasi sistern tersebut. Selain itu, ahli f m a s i bertugas untuk menguruskan rekod jualan ubat-ubatan selain menggunakan pemilih ubat-ubatan yang sesuai untuk gejala penyakit tertentu. Tambahan lagi, tugas pembantu ahli farmasi adalah untuk menguruskan tempahan, bayaran dan maklurnat pembekal. Dengan kata lain, aplikasi PMS lebih tertumpu kepada pengurusan pangkalan data untuk ubat-ubatan selain menguruskan backup and recovery untuk setiap rekod dalam pangkalan data. Metodologi sistem ini ialah kitaran hidup pembangunan sistem dan kitaran pangkalan data. Kajian telah dibuat berdasarkan sistem semasa yang manual dan semua kenyataan masalah clan keperluan sistem telah dikenal pasti. Tambahan lagi, PMS ialah tiga bahagian sistem senibina yang melibatkan bahagian pengguna, bahagian aplikasi atau bahagian perniagaan dan bahagian pangkalan data. Ruang antara-muka mtuk PMS telah di lakar berdasarkan keperluan pasarm. Distributed Database Pharmacy Management System, (PMS) akan membantu memperbaiki kebolehan dari situasi semasa dan mengatasi masalah yang dihadapi pada masa kini.



1 .

Project Background

Most of the pharmacies nowadays, like to use file system because it is a traditional way and peoples are comfort with that way. But today, the technologies has changes a lot and because of that almost all the application in the world prefer to use computer as their stored information place. More recently, the pharmacy management is focused on storing stock information such as types of medicines, price, medication review and drug information. Currently, to keep track on sales transaction such as stock and order information, manual recording system is used by the pharmacist. This system has many disadvantages because the pharmacist always busy with the sales transaction rather than managing the patient who comes to the pharmacy. In case of that, the Pharmacy Management System (PMS) will be developed based on the manual system in the real situation in a pharmacy. Furthermore, it is a web based application where user must open a web browser such as Intemet Explorer or Mozilla Firefox in their computer and type the address of this Pharmacy Management System in the address bar of the web browser. This system has security issues such a s the validation for usemame and password to prevent the intruder fiom entering the system. Moreover, this system has two levels of user, which are pharmacist, pharmacist assistant and database administrator. The pharmacist can v i m all the information in the pharmacy such as medicine information, staff information, supplier and order information. The assistant pharmacist can view and

updates the medicine information, supplier and order information. Moreover, database administrator's job is to handle the backup and recovery process besides
managing the staff information. This application will be using Hypertext

PreProcessor (PHP), Apache HTTP Server and MySQL as the database.


Problem Statement

The problem statements are:The file system is less secure because the system has no user administration level and is an unauthorized system where anyone can change the information without notice of everybody. The file system does not eficient enough for the pharmacist to do their work because wasting of time to search the desired information such as the medicine information. Besides that, the data is difficult to search and sometimes it creates duplication because redundant data in some part of information such as in supplier information.





Moreover, the existing system cannot recover data to prevent lost of data.



Objectives outline the actions that will be taken to solve the problems that are stated in the previous section. The following are the objectives for this project:

To develop a web based application with a high security level for the pharmacy with user authentication and authorization.

b) C)

To ease searching capability for retrieval of data. To apply distributed database in web based application. To increase the time performance in managing the medicine inventory.



The focus of this paper is on Pharmacy Management System, PMS which is an online system that manages the order and medicine information. In this section, the scope will be explained in terms of users, function and technologies.
1.4.1 Scope of System Users

There are three users in these systems which are pharmacist, pharmacist assistant and database administrator.
a) Pharmacist

The pharmacist will be responsible on handling the manipulation aspects of approving the suppliers and can only view the medicine, stock and sales records.
b) Assistant pharmacist

The assistant pharmacist will be responsible on managing the data in order details, medicine information and stock's records.

Database administrator

The database administrator's job is to make sure that all data is safe by handling the backup and recovery for all information transferred in the PMS.

1.4.2 Scope of Functions This project will include five modules which consist of login module, backup module, recovery module, medicine management module and maintain the database (transaction log).
a) Login Module

Only an authorized user can login into the system by providing their correct username and password to access the system.
b) Backup Module

This backup will be maintained by database administrator. Furthermore, this module is used to make sure that all data in the tables is copied to other locations. The database administrator only has to click on backup button then all the data will
be backups automatically.
c) Recovery Module

This recovery module involves in restoring the backup tables or database into a specific location.
d) Medicine Management Module

This module provided medicine information, such as medicine id, name, price per unit and expiry date. The system can add, update or delete the medicine information.
Maintain the database (transaction log)


The database is maintained by database administrator (DBA) and the user privilege will be controlled by the DBA. The data that is inserted or updated will be recorded automatically in the tables of database by using trigger.


Scope of Technologies

Given that PMS is an online system, so the technologies used will be webbased tools such as:
a) b) a) b) c)

Apache Web Server Version 2.2.4 Hypertext Preprocessor (PHP) Version 5.2.3 as server side scripting language MySQL Database Version 5.0.45 phpMyAdmin Database Manager Version 2.10.2 JavaScript as client side scripting language AppServ Version 2.5.9 for Windows



Project Significance

For project significance, it will be explain based on user level such as database administrator and pharmacist in the pharmacy. PMS provides backup and recovery to ease the work of database administrator. Besides that, this project will help to ease the staff works in the pharmacy and increase the work performance of the staff in case of PMS's usability. The pharmacies can spend more time in serving the customer who comes to the pharmacy and because of that the pharmacy will get more attention to the public.

In addition, this project is better compared to manual system which using files
system to keep the sales record. It is because of the security issues that is implemented in this system will help to increase security level in maintaining the records information. Besides that, in terms of accessibility the data will be remains save because of the different level of users had been applied in this project. Moreover, this project is a dynamic and interactive web-based because it has faster access through database to get the desired information. In case of that, the user can get their desired information within a seconds or minutes rather than waiting for
a long time period. Additionally, the web page that will be created has a beautiful

interface and always following the standard documentation.


Expected Output

Hopefully this project will deliver a successful application that will fulfill the objectives as mentioned before this. At the end, the new system for pharmacy management system will be developed. The system will provide functionalities as stated below:


Authentication and authorization login screen will be provided for user who wants to access into the system by entering the correct usernarne and password.


Besides that, the user can access in minutes and manage the order information, employee's information, medicine information and supplier information. Additionally, the system has three level of user to ensure the security issues which the low level only can view the records, medium level to update the records and high level to handle backup and recovery especially for database administrator. Furthermore, the system has backup and recovery in case of time failure that will help to maintain the data that is being transferred. Consequently, the web site is a user-friendly to a novice user who does not have a high knowledge in managing the web site.






In this chapter, a new system will be proposed for Pharmacy Murni at Batu Pahat which is called as Pharmacy Management System (PMS). Furthermore, the scenario of this company can be seen through this chapter. There are many problems appear when the file system is used to store and searching staffs information, medicine, order details and supplier's information. Therefore, this new system is

proposed to improve the file system by developing a simple and user friendly system to the manager and staffs. Lastly, every record will be maintained in the database and will be easier to manage. The next chapter will be cover about Literature Review and Project Methodology.





The purpose of this literature review is to give a summary of facts and findings on this project. Moreover, this can be done by studying or finding the past research, references, case study and other related finding. It will give a better understanding to the need for this project and also help in designing the methodology for this project. Meanwhile in the project methodology section will describe in detail about the selected methodology or approach that will be used in this project. By selecting the appropriate methodology, the productivity and quality of the project will be increased and improved. In case of that, System Development Life Cycle (SDLC) methodology and modified waterfall model has been selected for this project. Furthermore, the project requirement including hardware and software requirements are also included in this chapter. And then, a Gantt chart will be created to show the time line during the development of this project. Finally, the activities for each stage will be described in detail in the section of project schedule and milestone.


Facts and findings

This part of chapter is about facts and findings from the internet resources,

books and articles. Furthermore, this chapter is more focused on the existing system and facts related to the approach and technique in developing the proposed system.

2.2.1 Domain
This project is aimed to develop a Pharmacy Management System (PMS) which focuses on managing the inventory for medicine and storing the order details in the proposed system. Moreover, the target users for this system are the pharmacist and manager who work in the pharmacy. Furthermore, this proposed system will be developed by using Hypertext PreProcessor (PHP), Apache HTTP Server and

MySQL as the database.

2.2.2 Existing system
Some examples of similar existing system are found and described in this section. Pharmacy System v2.0


. . &h,tp:/*.-.mnl~-.*~~-


[a8odmah- TSsmnpr-

m9mr.w- J W

s / m e ')Paw .

Pharrnacv System ,
- - T R I I o R . ~ ~ ~ ~ F ~ ~ . ~ lam ~ . ~

,-,...,,,, ,
., , n



1 :


I ,




1 ,I.,. 1 .




lA,,,.,,<"T U! ,, .


- , ..

.. .



Figure 2.1: Website portal of Pharmacy System v2.0 (admin site)

Figure 2.1 shows the website portal of the existing system that provide the ecommerce website and system. Pharmacy System v2.0 has services, website search engines submission and promotion, and marketing services Pharmacy System v2.0 has eleven (1 1) modules. The modules are product management, orders and accountancy, automatic prescription generation, back office user management, credit cards functionality, medical questionnaire, website management, statistic, history and security, affiliates functionality, control and notification.



Features of the System Developer Database Support Platform Version

: NetArtMedia

Programming Language : PHP



: Windows1 Linux : 2.0

- Has admin site (doctors, pharmacist )

and front site demo (customer)


- Great hctionality for payment and

orders management

- Well secured web based e-commerce

system Pharmasew Pharmacy Management System (h~tD:// us/

0m a - ; .

x ; z , ,


. -.. ~




.. -.


MGKESSON :.. . ,., ; . - :"

$ 8
4 . "


.:-- , . . . ,-,. . - - Isearth.~.


. .




6 0 1 MlHUFlCTUllCRI




> C u t ~ a l ~ l Z tUharmacy Man2g.m.m n


a n d Serv#cer >


+I*>t l ~ > r t

The Phsmasen p h m w system ncmase &om~atsfbCtlon Phwm-en

15the most aomonhcnrove

M l P A A - m m f i a t oharman menapememsrKcm der~pned to

; r.

and pmtitabln~, uhslc imwnnnp olrmmsr omrtder swenar performance, h~chondlshand rarld-class luooort.
A ktmbutd p h - q

Call R n O . 7 0 . 5 1 0 7

' 3 &

management r y e m , P h a r m a s c ~. h data and aoDhcaoan rn wnc- r t o n d on-rm m the ~harmacy, pror~dmg the pharmacy rth hl m w d aver m mformaaon and i

rchcdds a dwmm?rabm O'hnd out ~nfam-rn abOwml Of me *wmasew omdrcmc+s,

Prodtlrrs R 5 p r v i c e l

The Phamasan pharmacy ry$tem mpactl pharmacy w o M a ad h e n o throqh Rs vnfcmrer end bendu:
e n d l m state and federal gorcrnmm ~ ( ~ ~ I a b o n rbun-m ryrrrrn eomoloance and WUI tuncbon*. Integrated e n v e e r ) . - m . b w r for autonrabs ordenog. Improve v6tabtMI *ah penenc mbsuuomr a d w a b v e pr& alerts. Prmen marp~nrwwh t k r W a d cari-to-rna(an pMnO sshedu(or



.. . .. . ,

. . .. . - . . ... , : , ;
. ,

Virtual Pharlvacy Tour

T l e a mur of (he Pharmaren w a ml PIL,rmd~l

. I ,


. .

L . .



r .

p . -I ?
Cultorn~r ~ ~ t i n l ~ n i d l T

' r r . - .

- '



. .




Pharm~ler ca m d k s s ae fihnrr prexrm(lonr WA inbprlted processes that dfasbvely mqethcr.

PI~ar!no~erv Suite Products

P b , , .

,I ,

1,. ..L


,. .',-.'... ,- ,



i ~ - l.., j

... ,... . ,.. :_,..,~,,,, . .. . r .,/


,. . , , , .- .

,.,.: ., .,<.,

.The P h s m a m system hn ndllv made me e f f i o m m the oamt where I dant spend Dme domg malntenanoc oo the hepvbcr, I don? $ p a d

Figure 2.2: Website portal of Pharmasew Pharmacy Management System (PPMS)

Figure 2.2 shows a website portal of Pharmaserv Pharmacy Management System (PPMS). Additional, PPMS did not use user friendly approach for it system environment or interface. Also, PPMS is not specifically use by the certain user, for example pharmacist. It can be use by other people that access the internet. The processes exist in this system are distribution service, pharmacy brand, Rx purchasing programs, Front-end purchasing programs, merchandising, managed care, marketing and advertising, pharmacy management software and services, ordering
and inventory management, and medication packaging.


Features of the System Developer programming Language Database Support Platform Version
: McKesson HBOC, Inc. : ASP : (not mentioned) : Windows

: 3.0

- Prescription Processing
- Claims Adjudication - Front-end Merchandising - Inventory Management


- Regulatory Compliant
- Distributed Platform - Automation Integration

- Increase Efficiency
- Improve Profitability

- Advance Manageability - Emphasize Patient Care

2 2 2 NRx Pharmacy Management System ( ..3 p p


L? t :

.... :,. . .L: :....., v : ~ : . ~ ~ : ! . : : : . , . _ . ... .. . ,. .

: +
; i

Told C*--WC.

' 5 , - r;.;

F T ~ U T M .

,>-x : ,:
.Y': --=


.7f->.-~.d: 1 ; ~ . I ' L :=.




- r .%--: ,:

a. z - - I . ' - C -,- . - ,: a-_ .. .


?--*.OI.I L; J:

I ! :

.._& E.5


:: -


:: ., r

y c i - r_-

1 2ccX, 1




1:.ej iwr.

R h a n y vendor

Y, ':



yi: 4:4 :

Figure 2.3: NRx Pharmacy Management Inventory's Screenshot a) Background

NRx Pharmacy Management System is a complete pharmacy management

system with a user friendly interface. Moreover, NRx is an expert system in dispensing prescriptions, processing claims or handling inventory. Besides, it has intuitive navigation and integrates with Point-of-Sale, Home Medical Equipment, Multi-Site Management Systems, Automated Dispensing Device, Workflow Management, Scanning and Imaging and much more. b)
Features of the system

Some of the features in NRx Pharmacy Management System are: Easy to Learn and Use Print sales receipt, label and patient information leaflet simultaneously Order electronically from wholesalers Ensure security by requiring appropriate security access levels

Easy end-of-day reporting


View pill images for verification


Advantages of the system

NRx provides an easy-to-use, graphical user interface which makes

processing new prescriptions and refills quick and easy. The system makes processing claims, customizing reports, managing inventory and maintaining and updating data easy. Tasks can often be completed in just a few mouse clicks or keystrokes. Even fill-in staff can adjust easily to the system with the aid of onscreen context sensitive help and easy access to a variety of training materials. PrimeCare Pharmacy Management System

(http://www.qs I .com/prirnecare. html)

Figure 2.4: PrimeCare Pharmacy Management Patient Information's Screenshot a) Background

PrimeCare Pharmacy Management System is a flexible for any institutional pharmacy whether long-term care, mental health, assisted living, board-and-care or corrections. Furthermore, it provides the ability to customize software parameters to fit the facility's unique needs using the facility management functions.


Features of the system

Some of the features in PrimeCare Pharmacy Management System are: Easy to use Windows graphical user interface Print sales receipt, label and patient information leaflet simultaneously Order electronically from wholesalers Update drug clinical and pricing information electronically as needed Easy end-of-day reporting

Scan and save prescription hard copy with patient record for tracking
Advantages of the system

PrimeCare pharmacy management system provides nursing home long term care (LTC) pharmacies, assisted living facility (ALF) pharmacies, mental health pharmacies and correctional facility pharmacies with the ability to customize software solution to fit the organization's unique needs. Comparison of Existing Systems Table 2.1: Summary for the Functions use in PSv2.0, PPMS, NRx, Primecare and PMS (proposed system) Pharmacy System V2.0 Pharmaserv Pharmacy Management NRx System


Pharmacy Management System (PMS)


1. Medicine Selection

2. User
3. Inventory

Management 4. Transaction Log


5. Backup and

Table 2.1 summarize the functionality of each the systems, Pharmacy System v2.0 ( P S V ~ . ~ ) , Phamaserv Pharmacy Management System (PPMS), NRx Pharmacy Management System, Primecare Pharmacy Management System and Pharmacy Management System (PMS). The summarization is based on the functionality use for five (5) systems. There are five (5) basic functions in the proposed pharmacy management system, medicine selection, user authentication, inventory management, transaction log, backup and recovery. All the system does not have a transaction log on medicine inventory.

2.2.3 Technique

There are many different methods and techniques were used to gather data which related to Pharmacy Management System (PMS). For this system, there are various techniques which used to collect data and information such as archival collection, documents, experiments or case study.

Archival Collection

- The journals which download from the internet provide a clear overview
about the problems that facing by the current system. It also gives some guides related to the management system. b)

Some documents, research papers and thesis were collected to get a better understanding about the current system. Reference books also play the main role in providing information related to pharmacy management system.

Experiments or Case study

Some case study was carried out in order to find out the real problem that facing by the pharmacist and pharmacy management. By this, some important information managed to collect about the limitation in current pharmacy management system.


Project Methodology

Before continuing it would be appropriate to clarify the term methodology. The term is not well defined either in the literature or by practitioners. A reasonable definition could be:'a collection of procedures, techniques, tools and documentation aids which will help the system developers in their efforts to implement a new information system. A methodology will consist of phases, themselves consisting of sub-phases, which will guide the system developers in their choice of the techniques that might

be appropriate at each stage of the project and also help them plan, manage, control
and evaluate information systems projects' (Andy Laws, 1996) In this proposed system, SSADM has been chosen as the approach for analysis and design part. Therefore, the modified waterfall model is chosen as life cycle model that can bring more control and guidance to this proposed system. Besides that, Database Life Cycle (DBLC) is chosen as the database development life cycle.


Structured Systems Analysis and Design Methodology (SSADM)

For this proposed system (PMS), SSADM is chosen as analysis and design methodology approach. There is no implementation, maintenance, testing and review of the conventional approach

a .

SSADM covers those aspects of the life-cycle of a system from the feasibility study stage to the production of a physical design; it is generally used in conjunction with other methods, such as PRojects I a Controlled Environment (PRINCE), which is N with the broader aspects of project management. In detail, SSADM sets out cascade or waterfall view of systems development, in which there are a series of steps, each of which leads to the next step.

(http:N~earchsoftwarequal~t~.techtar~et.com1sDenitio0,.si92 1j458.00.html) gci2

2 . . SSADM Structural Model 321

According to Laws, A. (1996) SSADM comprises a hierarchy of activities. From the top down, the hierarchy is Module + Stage + Step + Task. There are five modules ranging from Feasibility through to Physical Design. In each module there are one or more stages, with defined activities and producing defined products. The Modules are:

Feasibility Study Requirements Analysis Requirements Specification Logical System Specification Physical Design According to the proposed system (PMS), it is basically linear and so


modules are sequenced to allow the natural project lifecycle to be followed. However, each module is a self contained set of activities and can be managed as a discrete project. It is possible in an I.T. project for each module to become a separate contract so a different supplier may be employed on each. This indicates the

importance of ensuring the end of every activity is a set of products, to the required
quality, and then another contractor may take them as a starting point and continue the project.

~ i ~ ~ ~ a ~ n a t SSADMy as follows:i c a l l is


Specification Module


Project Pmcedures

Figure 2.5: The SSADM Stages 1 Modules (Laws, A., 1996)

Module and Stage Outline Activities: a) Feasibility Study Feasibility -prepare for the feasibility study -define the problem -select feasibility options -create feasibility report

Requirements Analysis Investigation of the Current System -establish analysis framework -investigate and define requirements -investigate current processing -investigate current data -derive logical view of current services -assemble investigation results Business System Options -define Business System Options -select Business System Option -define requirements

Requirements Specification Definition of Requirements -define required system processing -develop required data model -derive system functions -enhance required data model -develop specification prototypes -develop processing specifications -confirm system objectives -assemble requirements specification


Logical System Specification Technical Systems Options -define technical systems options -select technical system option -define physical design module Logical Design -define user dialogues -define update processes -define enquiry processes -assemble logical design


Physical Design Physical design -prepare for physical design create physical data design -create function component implementation map -0ptimise physical data design -complete function design -consolidate process data interface -assemble physical design

These modules cover the lifecycle from feasibility study to design but not program design. How the actual system is produced depends on the target language. In the case of 4th Generation languages, the specifications produced are presumed to

be complete enough to create the proposed system (PMS).

2 . . Modified Waterfall Model 322

Many engineers recommend modified versions of the waterfall life cycle. So, the modified waterfall model is chosen for this proposed system. Any modifications

in this model tend to focus on allowing some of the stages to overlap, thus reducing
the documentation requirements and the cost of returning to earlier stages to revise them. (Refer Figure 2.7) Overlapping stages, such as the requirements stage and the design stage, make it possible to integrate feedback from the design phase into the requirements. However, overlapping stages can make it difficult to know the exact time finished with a given stage. Consequently, progress is more difficult to track.

( 1A- 1Ilvdevconcepts 136



The modified waterfall model has three types which are Sashimi, Waterfall with Subprojects and Waterfall with Risk Reduction (Whirlpool). For this proposed system, the Sashimi Model is chosen. According to Peter DeGrace, the waterfall model treats each phase of the software development process as relatively separate and sequential. He describes one of the modifications of the waterfall model as the sashimi model. The name comes from a Japanese hardware development model (from Fuji Xerox) and refers to the Japanese style of presenting sliced raw fish, with the slices overlapping each other. The traditional waterfall model allows for minimal overlapping between phases at the end of phase review. By contrast sashimi suggests a stronger degree of overlap, as shown in ( F k 2 . 6 ) . For example if someone is in requirements analysis, the person can start to ~imultaneousl~ at architectural design, so something of a kind of parallel look development effort starts. This is flexible, but it also gives room for inaccurate deadlines, miscommunication, mistaken assumptions and inefficiency. Sashimi is

24 most beneficial if there is an effective understanding between the teams that work on
. c ~ ~ ~ /7378? 'sojj\\arcthe different phases. ( l i t t p : / / m i c r c ~ s ~ ~ f t . ~ ~ ~ r ~ s sarc]li\ e ~ ~ ~ ~ ~ s p t o d ; ~


Software Concept

RequirementsAnalysis Architectural Design

Coding and Debugging

System Testing

Figure 2.6: Sashimi Model (Ramalingam, S., n.d)

Feasibility study


Waterfall model with feedback This is better!

System design

Program design




Operation & maintenance

Figure 2.7: Modified Waterfall Model (National Instruments Corporation, 2006)