Predicting Tablet Drug Expenditures Using Python-Based Facebook Prophet in Pharmaceutical Installations
Abstract
The increasing complexity of pharmaceutical logistics requires accurate forecasting to ensure drug availability and minimize the risk of stock shortages. This study aims to develop a forecasting model to predict monthly tablet drug expenditure in the Pharmacy Department. The research stages include problem identification, data collection from historical drug expenditure records, data pre-processing, and implementation of the forecasting model. The method used is Facebook Prophet, which was chosen for its ability to capture seasonal patterns, trends, and holidays in time series data. Model performance evaluation was conducted using Mean Absolute Percentage Error (MAPE) and Mean Absolute Error (MAE). The results showed that the model produced an MAE of 3,621.25 and a MAPE of 4.93%, indicating that the prediction accuracy level was in the good category. These findings prove that the Prophet method is capable of providing reliable results in drug expenditure forecasting. The results of this study are expected to support decision-making in drug requirement planning and improve the efficiency of pharmaceutical logistics management.
Downloads
References
N. Nasution, D. R. Sitompul, and W. Walhidayat, “Application Of Sales Forecasting Using The Least Square Method In Web-Based Information Systems,” J. Teknol. Dan Open Source, vol. 6, no. 1, pp. 11–22, 2023, doi: 10.36378/jtos.v6i1.2580.
R. Indonesia, “Undang-undang No 7 tentang Farmasi,” Peratur. Pemerintah Republik Indones., no. 10, pp. 1–5, 1963.
Hernadewita, Y. K. Hadi, M. J. Syaputra, and D. Setiawan, “Peramalan Penjualan Obat Generik Melalui Time Series Forecasting Model Pada Perusahaan Farmasi di Tangerang: Studi Kasus,” J. Ind. Eng. Manag. Res. ( Jiemar), vol. 1, no. 2, pp. 35–36, 2020, [Online]. Available: https://jiemar.org/index.php/jiemar/article/view/38
T. Safitri, Sugiman, and N. Dwidayati, “Perbandingan Peramalan Menggunakan Metode Exponential Smoothing Holt-Winters dan Arima,” Unnes J. Math., vol. 6, no. 1, pp. 48–58, 2017, [Online]. Available: http://journal.unnes.ac.id/sju/index.php/ujm
D. Ajeng and M. Khulafa Alief Rahman, “A Periodic Review Inventory Control of Medicine at Hospital ARTICLE HISTORY,” J. Adv. Inf. Syst. Technol., vol. 6, no. 1, pp. 43–45, 2024.
A. A. Suryanto, “Penerapan Metode Mean Absolute Error (Mea) Dalam Algoritma Regresi Linear Untuk Prediksi Produksi Padi,” Saintekbu, vol. 11, no. 1, pp. 78–83, 2019, doi: 10.32764/saintekbu.v11i1.298.
I. Setiawan, “Rancang Bangun Aplikasi Peramalan Persediaan Stok Barang Menggunakan Metode Weighted Moving Average (Wma) Pada Toko Barang Xyz,” J. Tek. Inform. Vol. 13, No. 3, Agustus 2021, vol. 13, no. 3, pp. 1–9, 2021.
S. J. Taylor and B. Letham, “Forecasting at Scale,” Am. Stat., vol. 72, no. 1, pp. 37–45, 2018, doi: 10.1080/00031305.2017.1380080.
F. Oktavia and A. Witanti, “Implementasi Prophet Forecasting Model Dalam Prediksi Kualitas Udara Daerah Istimewa YogyakartaOktavia, Feliana Witanti, Arita,” Jl. Jemb. Merah No. 84 C Gejayan Yogyakarta, vol. 11, no. 1, pp. 64–74, 2024, [Online]. Available: http://jurnal.mdp.ac.id
S. Kwarteng and P. Andreevich, “Comparative Analysis of ARIMA, SARIMA and Prophet Model in Forecasting,” Res. Dev., vol. 5, no. 4, pp. 110–120, 2024, doi: 10.11648/j.rd.20240504.13.
M. I. Syahroni, “Prosedur Penelitian Kuantitatif,” J. Al-Mustafa, vol. 2, no. 3, pp. 43–56, 2010.
Felicia Eldora and S. Panggabean, “Prediksi Retur Produk Farmasi dan Klasifikasi Risiko Menggunakan Model ARIMA,” Griya J. Math. Educ. Appl., vol. 5, no. 2, pp. 223–235, 2025, doi: 10.29303/griya.v5i2.611.
M. S. Rahman and A. B. Shiddik, “Utilizing artificial intelligence to predict and analyze socioeconomic, environmental, and healthcare factors driving tuberculosis globally,” Sci. Rep., vol. 15, no. 1, pp. 1–14, 2025, doi: 10.1038/s41598-025-96973-w.
A. G. Nurfansepta, L. Muflikhah, and B. D. Setiawan, “Deteksi Mutasi Epidermal Growth Factor Receptor pada Kanker Paru Menggunakan Extreme Gradient Boosting,” J. Pengemb. Teknol. Inf. dan Ilmu kKmputer, vol. 9, no. 4, pp. 1–10, 2025.
S. Meisenbacher et al., “Review of automated time series forecasting pipelines,” Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 12, no. 6, pp. 1–42, 2022, doi: 10.1002/widm.1475.
U. Azmi, Z. N. Hadi, and S. Soraya, “ARDL METHOD: Forecasting Data Curah Hujan Harian NTB,” J. Varian, vol. 3, no. 2, pp. 73–82, 2020, doi: 10.30812/varian.v3i2.627.
D. Junianto, P. Suseno, and Y. R. Mahariani, “Perbandingan Metode Peramalan Berdasarkan Tingkat Akurasi Untuk Memprediksi Produksi Bawang Merah Di Kabupaten Nganjuk,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 10, no. 2, pp. 1734–1742, 2025, doi: 10.29100/jipi.v10i2.7738.
M. A. Ilham, S. Achmadi, and K. A. Sari, “Implementasi Metode Double Exponential Smoothing untuk Sistem Peramalan Penjualan Alat Musik,” J. Teknol. Terpadu, vol. 10, no. 2, pp. 125–133, 2024, doi: 10.54914/jtt.v10i2.1490.
D. Meilantika, “Visualisasi Data Mahasiswa Jurusan Teknologi Informasi Menggunakan Looker Studio Di Politeknik Negeri Lampung,” JUSIM (Jurnal Sist. Inf. Musirawas), vol. 9, no. 2, pp. 141–148, 2024.
A. Samosir, S. Sulistiyanto, K. N. Wijaya, and F. P. Kusuma, “Visualisasi Data Dosen Prodi Managemen Institut Informatika dan Bisnis Darmajaya dengan Data Studio,” J. Penelit. Inov., vol. 4, no. 3, pp. 1045–1050, 2024, doi: 10.54082/jupin.409.
Ardiansyah, Risnita, and M. S. Jailani, “Teknik Pengumpulan Data Dan Instrumen Penelitian Ilmiah Pendidikan Pada Pendekatan Kualitatif dan Kuantitatif,” J. IHSAN J. Pendidik. Islam, vol. 1, no. 2, pp. 1–9, 2023, doi: 10.61104/ihsan.v1i2.57.
A. S. Yaro, F. Maly, and P. Prazak, “Outlier Detection in Time-Series Receive Signal Strength Observation Using Z-Score Method with Sn Scale Estimator for Indoor Localization,” Appl. Sci., vol. 13, no. 6, 2023, doi: 10.3390/app13063900.
C. Chandra and S. Budi, “Analisis Komparatif ARIMA dan Prophet dengan Studi Kasus Dataset Pendaftaran Mahasiswa Baru,” J. Tek. Inform. dan Sist. Inf., vol. 6, no. 2, pp. 278–287, 2020, doi: 10.28932/jutisi.v6i2.2676.
G. A. Danarwindu, V. A. Noviani Sugianto, and H. Prihatmoko, “Perbandingan Metode Peramalan Volume Transaksi Sistem Resi Gudang: Prophet, Exponential Smoothing dan Sarima,” Emerg. Stat. Data Sci. J., vol. 3, no. 2, pp. 525–536, 2025, doi: 10.20885/esds.vol3.iss.2.art8.
D. R. Wibisono, G. A. A. R. Damayanthi, N. F. Widiatmoko, and M. Cristiano, “Perbandingan Metode Peramalan Berbasis Pola Tren Musiman untuk Prediksi Permintaan Obat dengan Model Holt-Winter’s Exponential Smoothing dan ARIMA,” Talent. Publ. Univ. Sumatera Utara, vol. 7, no. 1, pp. 108–117, 2024, doi: 10.32734/ee.v7i1.2177.
D. A. Kristiyanti and Y. Sumarno, “Penerapan Metode Multiplicative Decomposition (Seasonal) Untuk Peramalan Persediaan Barang Pada PT. Agrinusa Jaya Santosa,” J. Sist. Komput. dan Kecerdasan Buatan, vol. III, no. 2, pp. 45–51, 2020.
T. Widya Sulaiman, R. Bagas Fitriansyah, A. Rafif Alaudin, M. Hasyim Ratsanjani, and P. Negeri Malang, “Literature Review: Penerapan Big Data Dalam Kesehatan Masyarakat,” Satukata J. Sains, Teknol. dan Kemasyarakatan, vol. 1, no. 3, pp. 129–138, 2023, [Online]. Available: https://publish.ojs-indonesia.com/index.php/SATUKATA/index
O. Y. Inonu, K. Magda, and A. Amarudin, “Analisis Kinerja Algoritma Random Forest Dengan Model Machine Learning Pada Dataset Penyakit Diabetes,” Expert J. Manaj. Sist. Inf. dan Teknol., vol. 15, no. 1, p. 1, 2025, doi: 10.36448/expert.v15i1.4312.
I. Ismedsyah and S. Rahayu, “Evaluasi Perencanaan Obat dan Perbekalan Farmasi di Depo Pusat Jantung Terpadu Rumah Sakit Umum Haji Adam Malik Medan,” J. Surya Med., vol. 4, no. 2, pp. 41–50, 2019, doi: 10.33084/jsm.v4i2.546.
Copyright (c) 2025 Kaka Rizki Maulana, Widiyono Widiyono, Arief Soma Darmawan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This is an open-access article distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License which permits unrestricted use, distribution, and reproduction in any medium. Users are allowed to read, download, copy, distribute, search, or link to full-text articles in this journal without asking by giving appropriate credit, provide a link to the license, and indicate if changes were made. All of the remix, transform, or build upon the material must distribute the contributions under the same license as the original.












