Abstract
Accurate pharmaceutical demand forecasting is challenging because hospital medicine consumption exhibits heterogeneous patterns, including seasonal, volatile, and intermittent demand. This study proposes the regime-aware forecasting framework (RAFF), a reproducible benchmarking approach that combines structural demand diagnostics, leakage-controlled walk-forward validation, statistical comparison, and regime-stratified evaluation. Ten years of monthly demand records covering 300 pharmaceutical items were evaluated using Seasonal Naive, seasonal autoregressive integrated moving average with exogenous factors (SARIMAX), and long short-term memory (LSTM) models. Relative to Seasonal Naive, SARIMAX reduced mean absolute error by 18.20%, and root mean squared error by 20.58%, while LSTM reduced them by 16.48% and 21.75%, respectively. SARIMAX achieved the lowest aggregate mean absolute error, whereas LSTM achieved the lowest root mean squared error and greater stability as volatility increased. The results show that forecasting performance depends on demand structure, supporting regime-aware model selection for hospital inventory and procurement planning.