HOSPITAL PHARMACY MANAGEMENT SYSTEM

- Generally, the electronic technology has been implemented to automate the traditional systems. So, different copy of management systems in different scope were presented. These systems include the services provided to company as well as people, such as, healthcare. The traditional data management systems for pharmacy as example, suffer from the capacity, time consuming, medicines accessibility, managing the medicines store as well as the need of qualified staff according to the requirements of employer expectations. In this paper, a hospital e-pharmacy system is proposed in order to facilitate the job, outdo the mentioned problems. A data management system to the Iraqi hospital's pharmacy is proposed which is divided into two main parts: database, and Graphical User Interface (GUI) frames. The database built using SQL Server contains the pharmacy information related to the medicines, patient information….etc. the GUI frames ease the use of the proposed system by unskilled users. The proposal system is responsible on monitoring and controlling the work of pharmacy in hospital in terms of management of medicine issuing ordering and hospital reports..


I. INTRODUCTION
Recently, technology plays an important role in all management scope in order to computerize most of people jobs in an effective manner [1]. Besides, the management of the paper base services faced several complications in a specific directions that can be summarized in time consuming accessibility, managing the store as well as searching for a qualified staff that can match the requirements of employer expectations [2]. In other word, most of time are lost in tracking, matching or storing documentation in manual procedure [3]. A Pharmacology is the branch of biology deals with the properties of chemicals and interests with the study of use, action, side effect of drug. One of the promising strategy in medical side is the health care information technology which is used to reduce at most as possible several kind of medication errors. The most common technologies are Bar-code verification, Electronic prescribing technology and Computerprescriber order entry (CPOE) [4]. The pharmacy systems are considered as a computer systems which are used to managing and storing the medicines in pharmacy. these systems are replaced the manual systems with high efficient functions such as: stock management and control, medicine labeling, knowing the medication history of the patient and supporting the process of hospital's pharmacy [5].
In 2010, Nurul Muhammed proposed a Drug Management System (DMS) that increase the stocktaking management process. The proposed system is equipped with alarm that alerts the admin about all medicines which are reached the minimum quantity and medicines that expired [6].
In 2012, Carlisle George presented in his book different algorithms with rich information about issuing drugs and monitoring and controlling patient [1].
In 2017, the authors purposed a first elementary approach to sort the services of the most important Hospital Departments under the light of the disrupting influence of the emerging IoT [7]. In 2018, the author presented a study that leads to describe the current situation touching all the related portion to the hospital pharmacies functions [8].
In this work, an e-pharmacy management system based on built database and designed GUI frames have been presented. The included information regarding the patients and medicines as well as the inpatient and outpatient related information are stored in the built database. The presented system is divided into: patient registration, inpatient, outpatient and medicine. This is because in hospital there are two kinds of patient: inpatient, and outpatient. Each of the above parts includes different types of actions and database tables in addition to GUI frame for managing.

II. THE PROPOSED SYSTEM
One of the goals of this work is to produce an integrated data management system to hospital pharmacy that can fixed most of the traditional system problems. By linking system with a SQL Server database, we have achieved reliability, strong performance and high capacity [9]. Moreover, by designing the system's GUI in a simple and easy-to-handle way we have exceeded the need for skilled users. The software programs that are utilized to satisfy all the considered conditions are Visual Studio C#/ .NET framework 4.5 and SQL server. The proposed system managing as most as possible the whole job of hospital pharmacy. The introduced system includes two sides: database built in SQL server and GUI design using C#. As mentioned above, the GUI frames are used for controlling the work of the proposed system, while the database is for saving the related information.

Iraqi Journal for Computers and Informatics
Vol.
[44], Issue [1], Year (2018) The proposed system provides an authentication level with limited access to the database.

III. THE PROPOSAL ALGORITHM
The proposed algorithm composes of four main parts which are: registration, inpatient, outpatient and medicines where each one is clearly explained below. Figure (3) shows the main flowchart of the proposed algorithm. A. Registration: This part of the system can be accessed only by an authenticated persons who are logging to the system used theirs account. This part of system provide two main process which are: Searching for existed patient and the other is for registering a new patient. Figure (4) shows the flowchart of the algorithm for the registration part. At this stage, all the important information are saved. That are used to achieve many of our objectives. One of these are saving a background information about the medication history of the patient regardless of the patient's state (for example: inpatient or outpatient). From the searching process we can deal only with the already registered patients. This process is used to show and update the patient's information as well as medication history.  C. Outpatient: By the way, this part of the system also, can be accessed only by an authenticated persons who the issuing of medicines to patients that are not resident in the hospital is theirs job. This part of system is no longer different from the inpatient part. The main different is with the type of patients that are dealing with. Figure (6) shows the flowchart of the algorithm for the outpatient part.

D.
Medicines: This part pf the proposed system deals mainly with the all medicines that are stored or will be stored in the system. The person who has access to this part of the system can insert new medicine, update existed one and check the medicines quantities. Figure (7) shows the flowchart of the algorithm for the medicines part.

IV. BUILT DATABASE
A system database has been built by utilizing SQL Server Management Studio (SSMS) which is a software application that provides an integrated environment for managing all SQL Server components. SSMS plays as a graphical management tool which is easy to using and dealing with it [10,11]. This database includes six tables. The first one composes of general information about any patient who has been given medication or will be given medication called, "GeneralInfo", that consists of 30 columns. The rest tables are related to the first one as shown in Figure (8). These tables are "PatState", "Gender", "Inpatients ", "MerState" and "Medicines". It is important to note that the figure cannot show whole columns of the "GeneralInfo" table due to the screen size limit. The rest tables are:

V. DESIGNED GUI
Visual Studio (VS) environment is utilized to design and implement the GUI of the proposed system cause Visual Studio can be easily integrated with MS SQL Server environment, which in turn allows the necessary connectivity [12]. As shown in Figure (1) the home page of the proposed system involves four main buttons that are concerned with registration of patient and update their information, managing the medicines issuing to the inpatients , managing the medicines issuing to the outpatients and managing the stored medicines.
• When the user click on the "registration" button, two main buttons will appear which are "Search" and "New patient" as shown in Figure (9). When the user clicks on the "Search" button two fields will appear that deals with the patient full name. These fields bring the first and the corresponding last name of all patients from the database to allow user shows and update the information of the selected patient as shown in Figure ( Moreover, these information can be updated when the user click on the "Update" button from the opened form. Besides, When the user clicks on the "New Patient" button the general information fields will appear as shown in Figure (    • When the user click on the "Inpatients" button new form will appear as shown in Figure (13) that allows user to adding or updating the medicines and those quantities for the selected patient who is resident in the hospital. Also from this part the issued medicines can be printed.
• After clicking on the "outpatients" button new form will appear that allows user to adding or updating the medicines and those quantities for the selected patient who is not resident in the hospital. Also from this part the issued medicines can be printed. Figure (14) shows the Outpatients part.
• When the user clicked on the "Medicines" button new form will be appear as shown in Figure (15). This form has three main buttons which are concerning with the adding new medicines to the database, searching and updating medicines from the database and ordering medicines as show in Figure (

Ⅵ. THE PROPOSED SYSTEM RESULTS
The proposed system was tested in terms of registration function by entering new records for inpatient and outpatient, release and update function. In order to test the inserting process, we create a new record for two patient which are inpatient and outpatient by registering them from the registration part. Figure (19) shows the inserting process of a new inpatient and Figure (20) shows the registering process of a new outpatient. To test the performance of the proposed system in term of database activities, we entering fake 110 patients profiles registering process. The registering is done in high accuracy and flexibility or any mentioned warning.
Besides, the searching and updating process are evaluated. From the searching form of the inpatient part, we searching for the record of the patient that has been saved in Figure ( Moreover, we issuing a medicines for the above records, the output of this process are shown in Figure ( In term of evaluating the scalability of the system database, random inpatient's and outpatient's profiles are registered to the built database's table. Table 1 shows the time consumed with the corresponding records number. From the obtained results, we verify the scalability of the proposed system to handle a huge amount of records. Also the system proves its accuracy in fetching information as well as the security level that was fetched by presenting the username and password within the connection string of the SQL server.

Ⅶ. CONCLUSIONS
A data management system in Iraqi hospital's pharmacy was presented. The presented system manages and controls the medicine issuing cycle of a pharmacy inside a hospital. The introduced system includes database built using SQL server and GUI design utilizing Visual Studio (C#(. The purpose of using the database was to present different benefits, such as reducing data redundancy, reducing updating errors, increasing consistency, great data integrity, and improving data access to users through the use of a host and query languages and improved data security.
At the other hand, the designed GUI frames facilitated the working on the system by allowing the user to interact with the system through graphical icons. In other meaning, the system can be managed with unskilled users.
The introduced system has been tested by applying many case studies, such as registering a patient (inpatient/outpatient), issuing medicines to this patient, and requesting medicines from a warehouse. The obtained results of this test showed the outperformance of the investigated system in terms of less faults and more effective actions. From the above explanations, we can conclude the following: ✓ The system is working inside a hospital in an efficient way. ✓ Designing the GUI and the database facilitate working on the presented e-pharmacy system. ✓ The investigated system reduces human's efforts, human's mistakes and the physical cost. ✓ The e-pharmacy system increases accuracy, efficiency, and the working speed comparing with the manual system. ✓ The system needs to work on effective computer network (LAN). ✓ The system needs efficient training courses to the users to be allowed and able working on it.

RECORDS
Normally, the investigated system needs to be developed in a real working steps. The presented e-pharmacy system can be developed in the next suggested future work: • Developing the proposed system from windows based application to web based application to be more global and the connections with the pharmacies and warehousing in distance can be offered and guaranteed • Applying the investigated system in a real hospital's pharmacy. • Connecting many pharmacies together inside different hospitals which in turn will be connected the warehouses. This is to manipulate the lack in some kind of medicines around the pharmacies. • Extending the current system to involve the chronical disease pharmacies.