Forecasting Drug Demand For Optimal Medical Inventory Management: A Data-Driven Approach With Advanced Machine Learning Techniques
Forecasting Drug Demand For Optimal Medical Inventory Management: A Data-Driven Approach With Advanced Machine Learning Techniques
Forecasting Drug Demand For Optimal Medical Inventory Management: A Data-Driven Approach With Advanced Machine Learning Techniques
ISSN No:-2456-2165
*
Bharani Kumar Depuru4 Dr. Ilankumaran Kaliamoorthy5
Director, Innodatatics, Hyderabad, India CEO, Rela Institute and Medical Centre,
OCR ID: 0009-0003-4338-8914 Chennai, Tamil Nadu, India
Abstract:- A hospital's capacity to allocate resources significance of using suitable prediction models, such as
efficiently and guarantee drug supply depends on collaborative predictions based on end-user consumption
effective medical inventory management. This study data, economic order quantity, or the Min/Max formula,
paper offers a thorough data-driven strategy for drug to ascertain the necessary dosages of critical medications
demand forecasting that makes use of cutting-edge while taking into account available resources, supply
machine learning methods, intending to improve medical chain information, and inventory levels. Healthcare
inventory management procedures. A range of machine organisations can considerably reduce prediction errors
learning algorithms were used to precisely model and and improve the efficiency of medical inventory
anticipate drug demand trends using historical data, management by utilising the results of this extensive
including Deep Learning-based models, time series research.
forecasting techniques, and ensemble learning methods.
To determine the best strategy for predicting drug Keywords: - Drug Demand Forecasting, Machine Learning
demand, the study compares the performance of various in Medicine, Medical Inventory Management, Healthcare
algorithms. Supply Chain, Predictive Analysis, Hospital Management
The supply of essential drugs and life-saving India's pharmaceutical industry, which mostly depends
supplies can be less uncertain with accurate demand on China for the supply of some key chemicals and
estimates, which helps to create a well-organised and intermediates, has been constantly watched to assess the
effective health supply chain. The study highlights the impact of Covid-19 on its supply chain. At the time, Covid-
Fig 1 This Figure Depicts the CRISP-ML(Q) Architecture that We have followed for this Research Study.
(Source: Mind Map - 360DigiTMG)
To progress with this study in a structured manner we To better understand the factors impacting drug
have utilised and followed the CRISP-ML(Q) (CRoss- demand, we have gathered and analysed pertinent data sets
Industry Standard Process model for the development of during the “Data Understanding” [Fig.1] phase. Data from
Machine Learning applications with Quality assurance the past on patient demographics, disease prevalence, and
methodology) Mindmap (ak.1) [Fig.1]. Understanding the other contextual factors are also included. To build the
goals and needs of the healthcare sector concerning the groundwork for further modelling stages, exploratory data
forecasting of drug demand and the management of medical analysis techniques are used to find patterns, correlations,
inventory is part of the first step, referred to as "Business and outliers within the data.
Understanding" [Fig.1]. We aimed to deal with issues like
stockouts, excess inventory, and inefficient resource Pre-processing the gathered data to verify its integrity
allocation that healthcare providers encounter. Healthcare and usefulness for modelling is known as “Data
providers may optimise their inventory levels, cut expenses, preparation” [Fig.1]. The data must be cleaned, missing
and guarantee that patients have timely access to values must be handled, and any necessary variable
pharmaceuticals by correctly forecasting drug demand. transformations must be made. Techniques for feature
Fig 2 Architecture Diagram Representing a Drug Demand for Optimal Medical Inventory Management Incorporating Forecasting
Models
Data Collection from the medical inventory system errors, and Data Transformation [Fig.2, 3] is used to
[Fig.2, 3] is the first step in the process of acquiring details guarantee the consistency and quality of the data.
on inventory, sales, and other pertinent information. A SQL
(Structured Query Language) is then used to store and After pre-processing, exploratory data analysis (EDA)
retrieve the obtained data effectively. Next, Data Pre- is carried out to discover patterns, comprehend the data's
processing [Fig.2, 3] is applied, which includes data characteristics, and obtain new insights. To analyse
integration to combine data from different sources, Data sequential patterns and identify temporal correlations,
Reduction [Fig.2, 3] is used to pick out key features, Data machine learning models like RNN, BI RNN, LSTM, and
Cleaning [Fig.2, 3] is used to deal with missing values and Ensemble model (Gradient Boost) [Fig. 2, 3] are trained on
Fig 3 This Machine Learning Architecture Diagram Illustrates the Stages Involved in Achieving Optimal
Medical Inventory Management by Forecasting Drug Demand.
(Source: Open-Source ML Workflow Tool- 360DigiTMG) (ak.2)
II. METHODOLOGY AND TECHNIQUES patterns over a longer period and allowed for a thorough
investigation of the pharmaceutical inventory.
A. Data Collection
Using the hospital's Health Information system (HIS), The initial shape of the dataset was (5643260, 23),
a 4-year dataset for this Research was gathered. The dataset reflecting the considerable number of records and features
included drug sales information gathered over four years, included in the analysis.
giving a complete picture of the hospital's medicine supply.
The study provides a summary of the number of drugs
Data has been utilised and suitably processed for the consumed for both the train and test sets. The train set
prediction process. Predicting future data that can be used in included 39 months of data and the test set included 12
the healthcare supply chain is, in this regard, one of the most months of observations [1].
important objectives of time series analysis.
B. Data Pre-processing
For this work, health supply chain management data For this report, information on medical inventory
were employed. They featured information on consumption, management from 4+ years was gathered. They featured
inventory, orders and reorders, and purchasing prices [1]. information on consumption, inventory, orders and reorders,
and purchasing prices.
The dataset covered a wide range of medications and
the sales records for them, gathering details such as drug Before analysis, the dataset underwent Data Cleaning
category, volumes, and sales dates. The medicine categories, [Fig.2, 3] and Exploratory Data Analysis (EDA) [Fig.1] to
such as injections, tablets, fluids, and more, were explained uncover insights relevant to forecasting. Specifically, the
by the subcategory feature. While the date of the sale data considered for the analysis were limited to the date of
provided the precise day the drug was sold, the quantity drug purchase and the subcategory of drugs. The
feature stated how much of each drug was purchased. subcategory feature includes a total of 17 categories
encompassing 2,470 individual drugs.
The historical records from the HIS that were used in
this study's dataset covered a sizable 4-year time range. This We don't go with total counts, consequently, the reason
larger time frame made it easier to explore trends and why we use the method below.
Let us provide a comprehensive analysis of the The top 10 medicines constitute 49.61% of the total cost.
Exploratory Data Analysis (EDA) [Fig.2, 3] research The top 60 medicines constitute 80% of the total cost.
findings: The top 10 medicines constitute 35.46% of the total
Quantity. The top 64 medicines constitute 80% of the
EDA is an evaluation method that uses data to uncover total Quantity.
designs, solve issues, and test hypotheses using analytical The top 10 medicines constitute 55.47% of the profit.
and visual representations. EDA is carried out using data The top 35 medicines constitute 80 % of the profit.
sets [9]. EDA on data collection allows us to continuously
learn new perceptions. In this work, we used specific E. Model Approach
analytical techniques on the HIS pre-processed data set [14]. Our drug forecasting model serves as an example of
realistic and evidence-based predictive model’s ability to
C. Variables and Measures revolutionise the management of vital medicine stock levels
The variables used in this study include 23 among and store replenishment. We can maximise access to
those important variables are subcategory, quantity, and essential medications while lowering safety inventory and
sales date. The subcategory represents the category to which cutting waste by utilising precise and data-driven
each drug belongs. The quantity denotes the number of predictions. Our forecasting model, which is specially
drugs purchased. The sales date indicates the date when the designed for predicting drug demand, takes into
drug was sold. consideration both the complexity of the pharmaceutical
supply chain and the peculiar properties of healthcare
D. Statistical Analysis products. We strive to reduce forecasting errors and improve
The statistical analysis primarily involved descriptive the precision of our predictions through ongoing
statistics to summarise the dataset and Pareto analysis to improvement and refinement. We can produce forecasts that
identify the drugs contributing to a significant portion of the are closer to the demand point by combining our model with
sales, cost, and profit. supply chain activities and using real-time data, leading to
more accurate and trustworthy insights.
The examination of the distribution of drug demand
benefits greatly from the addition of a Pareto chart. Based The main goal of the research was to increase the
on the Pareto principle or 80/20 rule, the Pareto chart predictability of drug demand. We built several different
graphically illustrates the total percentage of drug demand forecasting models, including Recurrent Neural Network
attributable to various categories or causes. The figure (RNN), Bidirectional RNN (BI RNN), Long Short-Term
effectively illustrates the most important drivers of demand Memory (LSTM), Bidirectional LSTM (BiLSTM), Gated
by grouping the categories or elements in descending order Recurrent Unit (GRU), and Bidirectional GRU (BiGRU),
of their influence on drug demand [7]. [Fig.2, 3] to do this. Each of these models was created
independently as a part of our research strategy.
The Pareto chart is a useful tool for pinpointing the
"vital few" classes or elements that significantly influence Recurrent Neural Network (RNN) [Fig.2, 3]: RNN is
drug demand. It enables scholars and decision-makers to essential in anticipating medication demand because of
concentrate their attention and resources on these significant its capacity to handle sequential data and capture
areas first. Stakeholders can create focused interventions, dependencies between previous and present inputs. RNN
improve inventory management methods, and more wisely can find hidden patterns and trends in past sales data that
deploy resources by knowing which categories or factors might not be visible using conventional statistical
most influence demand. techniques. The RNN's memory cells allow the model to
keep track of data from earlier time steps, enabling it to
The Pareto graphic also makes it easier to have data- factor previous observations into its forecasts. Since
driven debates and make decisions. Through the visual historical sales data significantly affects future demand,
portrayal of complex information, stakeholders may better this skill is particularly useful in predicting drug
understand the distribution of drug demand and pinpoint demand. RNN helps in the correct prediction of drug
areas for improvement. The Pareto chart can be used in the demand, assisting in the best management of medical
study to gain a more thorough understanding of the main inventory, by using its grasp of temporal dependencies
factors influencing the demand for drugs, which will help [5].
Mean Absolute Percentage Error (MAPE) is a To find Reorder point multiply the average daily usage
commonly used metric in forecasting to measure the by the average lead time in days, and then add the safety
accuracy of predictions relative to the actual values. It stock to determine the reorder point
calculates the percentage difference between the predicted
values and the corresponding actual values, averaging these Method For Determining The Safety Stock
differences across the entire dataset. Safety stock refers to the additional stock held by a
company or organisation as a buffer to mitigate the risk of
MAPE is calculated using the following formula: stockouts or supply disruptions. It serves as a cushion to
account for uncertainties in demand, lead time, and supply
MAPE = (1/n) * Σ(|(Actual_i - Predicted_i)/Actual_i| * variability. The purpose of safety stock is to ensure that
100) there is sufficient inventory on hand to meet customer
demands during unexpected fluctuations or delays in the
Where: supply chain
Actual_i represents the actual value of the target variable To calculate the Reorder point, we must first be aware
for the i-th observation. of our safety stock. Safety stock is calculated as follows:
Predicted_i represents the predicted value of the target
variable for the i-th observation. Safety stock = (maximum daily usage x maximum lead
n represents the total number of observations. time in days) – (average daily usage x average lead time in
days)
MAPE provides a relative measure of forecasting
accuracy, allowing us to understand the average percentage To calculate the safety stock, businesses take into
difference between our predictions and the actual values. A account the maximum daily usage, which represents the
lower MAPE indicates higher prediction accuracy, while a highest quantity of a product used or sold in a single day,
higher MAPE suggests a larger discrepancy between and the maximum lead time in days, which is the longest
predicted and actual values [4]. duration it takes for an order to be placed with a supplier
and for the inventory to be received. Subtracting the product
of the average daily usage and the average lead time in days
from this value results in the safety stock.
Average Lead Time in Days: The proposed implementation of this model involves
The average time it takes for the drugs to be integrating real-time data streams from healthcare sources
replenished once an order is placed with the supplier. such as hospitals and public health agencies. The proactive
management of inventory and timely availability of
Safety Stock: important pharmaceuticals made possible by this innovative
The buffer quantity of drugs kept on hand to account technique helps healthcare professionals improve patient
for unexpected fluctuations in demand or delays in the care while also maximising the management of medical
replenishment process. inventory.