Pharmacy inventory management faces major challenges in balancing stockout and overstock risks caused by high demand uncertainty and the perishable nature of medicines. Conventional methods such as Reorder Point (ROP) and Economic Order Quantity (EOQ) assume stable demand, making them less responsive to real fluctuations. This study proposes a predict-then-optimize framework that integrates demand forecasting using a Hybrid Long Short-Term Memory–Gated Recurrent Unit (LSTM-GRU) model with a mathematical optimization (Solver) model for inventory control of 146 category-A medicines at Alkafi Pharmacy. Four years of historical sales data were used to train the forecasting model, and the results served as input for a perishable-inventory optimization model that minimizes total ordering, holding, shortage, and expiration costs. Testing on 52 weeks of data showed the Hybrid LSTM-GRU model achieving MAE 1.18, RMSE 5.10, MAPE 17.64%, and R² 0.52, outperforming rolling-mean, seasonal-naive, and naive baselines. Integrating the forecast with the Solver produced an order recommendation of 14,696.64 units against a forecast demand of 28,678.42 units, with zero lost sales, a simulated service level of 100%, and 6,162.80 expired units, markedly better than the manual system, which recorded 6,527.50 lost-sales units and 43,314.25 expired units per year.
Copyrights © 2026