An Intelligent System for Pharmaceutical Inventory Management Based on Demand Forecasting and Expiry-Risk Prediction

Managing a pharmaceutical inventory requires holding enough medicine to meet needs while avoiding surplus purchases, since any stock that outlives its expiry date must be discarded. Most inventory software stores quantities and expiry dates but cannot indicate whether a particular batch will be sold before it expires. This paper presents a decision-support framework that predicts weekly demand for every medicine, applies the prediction to estimate how much of each batch will still be unsold on its expiry date, and converts these estimates into reorder suggestions and expiry alerts. A naïve forecast, an 8-week moving average and a Random Forest were compared, and the complete framework was evaluated in a weekly inventory simulation using 100 randomly generated datasets of 15 medicines each. Real batch records were unavailable, so every dataset is synthetic; the findings illustrate how the method behaves and do not measure the savings a real pharmacy would obtain. The moving average produced the smallest one-week-ahead error (WAPE 25.2%), whereas the Random Forest was more accurate for total demand over 12 weeks (19.9% versus 22.9%). When batches were examined 12 weeks before expiry, the forecast-based rule issued 109 alerts for 1,563 batches, compared with 1,563 alerts from a date-only rule, and achieved 89% precision and 83% recall for batches that finished with at least one fifth of their stock unsold. Capping order quantities according to expiry risk cut average stock value by roughly 5%, yet it did not significantly reduce expiry losses and it lowered the fill rate for slow-moving medicines. The alerts were therefore the more valuable component of the framework in this study. We also built a web prototype around the framework using Python and Flask, a SQLite or PostgreSQL database, role-based login, batch-wise stock, billing and a dashboard. Only the operation of this prototype was verified, and its outputs are excluded from the experiments.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-25
DOI
https://doi.org/10.5281/zenodo.24525324
Primary Topic
Supply Chain and Inventory Management
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

An Intelligent System for Pharmaceutical Inventory Management Based on Demand Forecasting and Expiry-Risk Prediction

Kanika Khurana, Nilesh Paliwal, Kirti, Aditya Solanki et al.
Zenodo (CERN European Organization for Nuclear Research)
Supply Chain and Inventory Management
article

An Intelligent System for Pharmaceutical Inventory Management Based on Demand Forecasting and Expiry-Risk Prediction

Kanika Khurana, Nilesh Paliwal, Kirti, Aditya Solanki, Pradeep
article en

Abstract

Managing a pharmaceutical inventory requires holding enough medicine to meet needs while avoiding surplus purchases, since any stock that outlives its expiry date must be discarded. Most inventory software stores quantities and expiry dates but cannot indicate whether a particular batch will be sold before it expires. This paper presents a decision-support framework that predicts weekly demand for every medicine, applies the prediction to estimate how much of each batch will still be unsold on its expiry date, and converts these estimates into reorder suggestions and expiry alerts. A naïve forecast, an 8-week moving average and a Random Forest were compared, and the complete framework was evaluated in a weekly inventory simulation using 100 randomly generated datasets of 15 medicines each. Real batch records were unavailable, so every dataset is synthetic; the findings illustrate how the method behaves and do not measure the savings a real pharmacy would obtain. The moving average produced the smallest one-week-ahead error (WAPE 25.2%), whereas the Random Forest was more accurate for total demand over 12 weeks (19.9% versus 22.9%). When batches were examined 12 weeks before expiry, the forecast-based rule issued 109 alerts for 1,563 batches, compared with 1,563 alerts from a date-only rule, and achieved 89% precision and 83% recall for batches that finished with at least one fifth of their stock unsold. Capping order quantities according to expiry risk cut average stock value by roughly 5%, yet it did not significantly reduce expiry losses and it lowered the fill rate for slow-moving medicines. The alerts were therefore the more valuable component of the framework in this study. We also built a web prototype around the framework using Python and Flask, a SQLite or PostgreSQL database, role-based login, batch-wise stock, billing and a dashboard. Only the operation of this prototype was verified, and its outputs are excluded from the experiments.

Zenodo (CERN European Organization for Nuclear Research)
Supply Chain and Inventory Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon