Application of the Association Method Using FP-Growth Algorithm to Find Pattern Of Medicine Purchasing Transactions at Pharmacy

ABSTRACT


INTRODUCTION
Health is a topic that cannot be separated from human life.Health itself is not only about the condition of the human body and mentality, but also things that can affect it [1].When the body and mental state is sick, there are various ways that can be done to treat it, either by using therapy or using medicines.This depends on the disease suffered.In fact, to treat the disease, treatment can be done by combining the two methods.
Medicine is one of the health products produced by a company that aims both to prevent and treat patients [2].Health products have various forms according to their use, namely in liquid and non-liquid forms (powder, tablets).Apart from being medicinal medicines, health products also include products that can increase stamina (supplements) to cosmetic products used by humans for purposes related to health [3].These products can be purchased at hospitals and pharmacies either with a doctor's prescription or not.The need for medicines or other health products in each region is different because it depends on the population, types and quantities of certain medicines.If the medicine available is not the medicine that is needed, then this could have an adverse impact on the distributor and pharmacy owner.Medicine stocks will slowly decrease and the product's expiration date will get closer.If the medicine is not sold out until the expiration date, both the pharmacy and the distributor will suffer losses.Therefore, it is necessary to procure the right medicine.
Procurement is a process to meet operational needs as planned [4].In the planning process, the activities carried out are making a list of medicines needed based on the pattern of the disease to the ability of the Journal of Applied Research In Computer Science and Information Systems

Application of the Association Method Using FP-Growth Algorithm to Find Pattern Of Medicine Purchasing
Transactions at Pharmacy (Chanadya Yustia Purnamawati) community to buy medicine.Then, proceed with determining the amount of medicine stock that must be provided.After the planning process is completed, medicine procurement can then be carried out.This needs to be done so that the medicine procurement process can be directed and controlled.Good medicine procurement management will have a positive impact on pharmacies.Pharmacies can calculate the stock that is balanced with consumer needs so as to guarantee quality and control the capital issued by the pharmacy.In determining this plan, it is necessary to analyze medicine sales transactions with reference to previous sales transactions.However, if the data being analyzed is large and complex and is done manually, it will require greater effort [14].
Along with the development of technology, human work can run more effectively and efficiently.One of the rapidly growing technological developments is data mining.Data mining is a series of activities to collect, process, until information is found based on data originating from various sources [5].The application of data mining in various sectors can make it easier to obtain information according to needs, for example finding patterns to increase sales, monitoring market direction and competition, and others.In processing data, there are several techniques or methods that have been developed in data mining, including association rules, grouping, classification, regression, prediction, and outlier detection.Each of these methods has a different function and is accompanied by the use of various algorithms.
In this study, the target object under study was medicine sales transactions at the Family Pharmacy.The transaction is examined with the aim of being able to determine the medicine stock that must be provided in the following month by utilizing the sales transaction.In order for this to be achieved, the authors use the association method in data mining.The association method or association rule is a method in data mining that is used to obtain relationships between items or attributes [6].The relationship between these items is represented by a number of generated rules.
In finding the relationship between these items, there are various algorithms that can be utilized, one of which is the FP-Growth algorithm.The FP-Growth algorithm is a part of the frequent pattern association method functionality which is the development of the a priori algorithm [7].This algorithm only scans at the beginning so that the time required and memory usage is smaller, while the a priori algorithm performs scans repeatedly so that the time and memory required are greater.Based on this, research will be carried out to find patterns of medicine sales transactions in the form of which medicines are purchased together so as to make it easier for the pharmacy to determine the amount of medicine stock.The transaction data used in this study are medicine sales transactions at the Family Pharmacy.

METHOD
The type of research applied to this research is research with quantitative methods.The quantitative research method is a systematic method and the data is presented in the form of numbers and in processing it can apply knowledge in the fields of computing, statistics, or mathematics [12].This is in line with the research conducted by the author.This research focuses on processing transaction data and looking at the number of transactions for a product.Then, this research was only carried out by the author, the data processing was sequential.
In this study, the method used is CRISP-DM.CRISP-DM has 6 phases starting from the business understanding phase to deployment.This method was chosen because many studies use CRISP-DM.Based on 24 studies sourced from ScienceDirect, IEEE, and ACM Digital Library that most authors define CRISP-DM as the de-facto standard for implementing models in data mining [13].In addition, this method is considered structured.Therefore, in this study, the method used is CRISP-DM.

RESULTS AND DISCUSSION
This study implements the CRISP-DM methodology.Here are the stages:

Business Understanding
At this stage, the things that are done are understanding the needs and goals of the business.The Family Pharmacy as the object of research is one of the pharmacies in Sangasanga District.The selling rate of the items contained in this pharmacy was high.In order for the level of sales to be carried out optimally, it is necessary to do research to find patterns of sales.When a sales pattern has been found, the pharmacy can make decisions about the progress of its business.

Data Understanding
Sales patterns can be identified from sales transaction data.The sales transaction data studied is transaction data for 6 months (July-December) in 2021.This is done to determine the procurement of medicine stocks in the second semester of 2022.The limitations of the data studied are transactions that only contain items in the form of medicines because the sales pattern you want to know is the pattern of medicine sales.The data provided by the pharmacy is in .xlsformat which is divided into 12 files with 1 month divided into 2 files.Therefore it is necessary to do the sorting to make it into 1 file.Then, because the format of the data provided is not suitable for testing purposes, it is necessary to adjust the format.

Data Preparation
Data that was originally divided into 12 files combined into 1 file.Then, the required attributes are selected.There were 1166 attributes used in this study which were divided into attributes consisting of medicine sales transactions and types of medicines sold and the number of transactions was 20266 transactions.It is necessary to clean data on sales transactions because data in the form of single data and transaction data that does not include drugs do not need to be included in the dataset file.The value of the medicine attribute is labeled 0 or 1 where the label is 0 if the transaction contains the medicine and 1 if the transaction does not contain the medicine.After the data has been transferred into 1 file, then it is saved in the .xlsxformat.The following Figure 1 is a snippet of the dataset display used.

Modeling
After the data is ready, do the modeling using the RapidMiner application.Model the dataset using a predetermined algorithm, namely FP-Growth.Before that, it is necessary to add a numerical to binomial operator to change the attribute data type.

Prepare and import dataset
Implementation of the FP-Growth algorithm association method, the number of transactions used is 20266 transactions with a total of 1166 medicine items.In conducting research, the tools or applications used are RapidMiner Studio.

Design
At this stage, drag DatasetTA as the dataset that will be used to the view process section and add the necessary operators.Then set minimum support and minimum confidence.Figure 2 shows the process view on Rapidminer.Journal of Applied Research In Computer Science and Information Systems

Application of the Association Method Using FP-Growth Algorithm to Find Pattern Of Medicine Purchasing
Transactions at Pharmacy (Chanadya Yustia Purnamawati)

Evaluation
The results of the association rules are formed by setting a support value of 10% and confidence of 90%.The confidence value for each formed is 1.This means that the level of confidence that the drug items will be purchased simultaneously is 100%.However, to see the level of strength of the association rules, you can see the lift ratio value in table 1.The lift ratio value for all the rules formed is 2.683, meaning that the level of association rules is strong because the value is more than 1.The lift ratio value itself is influenced by the confidence value and support.

Figure 2 .
Figure 2. Process display on RapidMiner3.4.3.Implementation ResultsClick the run button then click result to see the results.The following is Figure3which displays the 7 rules produced.

Figure 3 .
Figure 3. Frequent Item Set Results

Table 1 .
Association Rules Results