Comparative Analysis of LSTM Architectures for BPJS Drug Expenditure Forecasting Using Walk-Forward Validation

Authors

  • Rizkinawati . Universitas Nahdlatul Ulama Sunan Giri
  • Ifnu Wisma Dwi Prasetya Universitas Nahdlatul Ulama Sunan Giri Bojonegoro
  • Nur Mahmudah Universitas Nahdlatul Ulama Sunan Giri Bojonegoro

DOI:

https://doi.org/10.30871/jaic.v10i3.12969

Keywords:

Bidirectional LSTM, BPJS Health, Drug Expenditure Forecasting, Time Series Forecasting, Walk-Forward Validation

Abstract

Drug demand planning in health facilities collaborating with BPJS Kesehatan is an important aspect in maintaining drug availability and improving service efficiency. However, drug expenditure data generally forms complex time series patterns that are fluctuating, nonlinear, and influenced by trend and seasonal components, making them difficult to model using conventional forecasting methods. Therefore, this study aims to compare the performance of Long Short-Term Memory (LSTM), Bidirectional LSTM (Bi-LSTM), and Stacked LSTM models in forecasting BPJS patient drug expenditure by medication type at Basuki Rahmat Pharmacy using Walk-Forward Validation. The dataset used consists of monthly drug expenditure transaction data from January 2023 to May 2025 covering 41 types of drugs. The data preprocessing stages include data cleaning, transformation into time series format, Min-Max normalization, and windowing for input-output sequence generation. Time series characteristic analysis was conducted using the Augmented Dickey-Fuller (ADF) test, trend analysis, and seasonality analysis. The results showed that most drug data were stationary with p-values below 0.05, although several drugs still exhibited non-stationary patterns requiring additional transformation. Trend analysis indicated both increasing and decreasing consumption patterns, while seasonality analysis showed that all drug data exhibited seasonal patterns. The forecasting models were evaluated using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). Experimental results using Walk-Forward Validation showed that the Bidirectional LSTM model achieved the best forecasting performance with MAE of 51.99, RMSE of 72.06, and MAPE of 402.90, outperforming Single LSTM and Stacked LSTM models. These findings indicate that Bidirectional LSTM is more effective in capturing complex temporal dependencies in BPJS drug expenditure data and has potential to support decision-making in drug inventory management within healthcare facilities.

Downloads

Download data is not yet available.

References

[1] M. A. Saragih and R. Gurusinga, “Analisis Faktor-Faktor Ketersediaan Obat Di UPT . Puskesmas Untuk Pasien BPJS Analysis of Factors Affecting the Availability of Medication at UPT Puskesmas for BPJS Patients,” Anal. Fakt. Ketersediaan Obat Di UPT. Puskesmas Untuk Pasien BPJS, no. c, pp. 289–297, 2025.

[2] V. Puspadina, M. R. A, and R. D. S, “Evaluasi Ketersediaan Obat Kronis Untuk Pasien Rujuk Balik BPJS Pada Masa Pandemi Periode Oktober-Desember Tahun 2020,” J. Farm. Indones., vol. 3, no. 2, pp. 11–20, 2022.

[3] Sandi Ashriel Nugraha, Diana Laily Fithri, and Yudie Irawan, “Optimasi Stok Obat Di Apotik Adin Farma Dengan Metode Fefo Solusi Efisien Menghindari Kadaluarsa,” JEKIN - J. Tek. Inform., vol. 5, no. 1, pp. 396–407, 2025, doi: 10.58794/jekin.v5i1.1309.

[4] W. W. Rohimah and Y. Siyamto, “Optimalisasi Pengelolaan Perbekalan Farmasi dalam Menunjang Ketersediaan Obat di Rumah Sakit,” J. Ilm. Keuang. Akunt. Bisnis, vol. 3, no. 3, pp. 590–596, 2024, doi: 10.53088/jikab.v3i3.167.

[5] M. Ilham, Y. Sonatha, D. Satria, J. T. Informasi, and N. Padang, “Optimasi Pengelolaan Stok Obat dengan Metode Weighted Moving Average,” Bitwise J. Teknol. Inf. dan Komputasi, vol. 1, no. 1, pp. 38–45, 2025, [Online]. Available: https://jurnal-bitwise.org/index.php/bitwise/article/view/5

[6] K. M. Siregar, Zahratul Fitri, and Fajriana, “Prediksi Stok Obat Tb Dengan Arima Dan Analisis Volatilitas Residual Di Puskesmas Banda Sakti,” Rabit J. Teknol. dan Sist. Inf. Univrab, vol. 10, no. 2, pp. 726–740, 2025, doi: 10.36341/rabit.v10i2.6398.

[7] M. Y. S. Basyar, M. A. M. Hayyat, and F. I. Rahman, “Prediksi Penjualan Obat Menggunakan Model Lstm Dan Analisis Time Series Pada Data Transaksi Pasien BPJS,” Mechatronics J. Prof. Entrep., vol. 7, pp. 29–36, 2025, [Online]. Available: http://files/93/Basyar et al. - Prediksi Penjualan Obat Menggunakan Model Lstm Dan Analisis Time Series Pada Data Transaksi Pasien B.pdf

[8] R. M. Nur, Y. Y. M. Zai, and H. Iskandar, “Analysis of Pharmacy Service Performance Improvement for BPJS Patients Using The Lean Method at XYZ Hospital,” J. Eng. Sci. Technol. Manag., vol. 5, no. 1, pp. 87–96, 2025, doi: 10.31004/jestm.v5i1.217.

[9] F. Brawijaya, A. T. W. Almais, and T. Chamidy, “Forcasting Analysis of Drug Use in Hospitals Based on Multivariate Long Short-Term Memory Networks,” G-Tech J. Teknol. Terap., vol. 9, no. 4, pp. 2248–2258, 2025, doi: 10.70609/g-tech.v9i4.8244.

[10] A. Udhata Swardana, F. Ely Nastiti, and S. Sumarlinda, “Sistem Prediksi Penjualan Obat di PT. Anugerah Pharmindo Lestari Menggunakan Metode LSTM,” Pros. Semin. Nas. Teknol. Inf. dan Bisnis, pp. 70–77, 2025, doi: 10.47701/90f7q142.

[11] D. R. S. Serrano, J. C. Rincón, J. Mejía-Restrepo, E. R. Núñez-Valdez, and V. García-Díaz, “Forecast of Medical Costs in Health Companies Using Models Based on Advanced Analytics,” Algorithms, vol. 15, no. 4, 2022, doi: 10.3390/a15040106.

[12] R. Pall, Y. Gauthier, S. Auer, and W. Mowaswes, “Predicting drug shortages using pharmacy data and machine learning,” Health Care Manag. Sci., vol. 26, no. 3, pp. 395–411, 2023, doi: 10.1007/s10729-022-09627-y.

[13] R. A. Nampira, J. M. Sambas, I. Nur, L. Fitriana, L. Adhi, and K. Sulung, “ARIMA and LSTM Comparison for Forecasting Healthcare Service Costs in Bogor,” vol. 6, no. 4, pp. 352–360, 2025, doi: 10.47065/bit.v5i2.2278.

[14] I. A. Zahra, “Analisis Perbandingan Teknik Peramalan Kebutuhan Obat Dengan Metode Arima Dan Single Eksponensial Smoothing Studi Kasus: Rsud Indramayu,” J. Tata Kelola dan Kerangka Kerja Teknol. Inf., vol. 6, no. 1, pp. 23–29, 2021, doi: 10.34010/jtk3ti.v6i1.2261.

[15] M. Melizsa, F. Kasumawati, and E. Nuryamin, “Analisis Pengendalian Persediaan Obat Bpjs Dengan Metode Analisis ABC, Metode Economic Order Quantity (EOQ), Dan Reorder Point (ROP),” Edu Masda J., vol. 5, no. 1, p. 73, 2021, doi: 10.52118/edumasda.v5i1.118.

[16] R. M. Salsabila, A. Fahmi, and F. Al Zami, “Optimized LSTM with TSCV for Forecasting Indonesian Bank Stocks,” vol. 9, no. 6, 2025.

[17] Y. R. Madhika, Kusrini, and T. Hidayat, “Gold Price Prediction Using the ARIMA and LSTM Models,” Sinkron, vol. 8, no. 3, pp. 1255–1264, 2023, doi: 10.33395/sinkron.v8i3.12461.

Downloads

Published

2026-06-14

How to Cite

[1]
R. ., I. W. Dwi Prasetya, and N. Mahmudah, “Comparative Analysis of LSTM Architectures for BPJS Drug Expenditure Forecasting Using Walk-Forward Validation”, JAIC, vol. 10, no. 3, pp. 2639–2647, Jun. 2026.

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.