Analysis of Drug Inventory Patterns Using the K-Means Algorithm

Authors

  • Dedi Setiadi Institut Teknologi Pagar Alam, Indonesia
  • Debi Gusmaliza Institut Teknologi Pagar Alam, Indonesia

DOI:

https://doi.org/10.30983/knowbase.v5i2.10420

Keywords:

Clustering, CRIPS-DM, Drugs, Elbow Method, K-Means

Abstract

Efficient drug inventory management is a critical challenge for the Sandar Angin Community Health Center to ensure the availability of drugs needed by customers without incurring excessive storage costs. Data mining with the K-Means algorithm was used to determine drug inventory more effectively. Drug data for the past year was used as a sample in this study. The Elbow method was used to determine the optimal number of clusters, and the results showed that three clusters were most appropriate for grouping drug sales data. The first cluster consisted of drugs with high and consistent sales, the second cluster included drugs with moderate and fluctuating sales, while the third cluster contained drugs with low and inconsistent sales. The results of this clustering provide clear guidance in drug inventory management. Drugs in the first cluster require larger stocks, the second cluster requires moderate stocks and promotional strategies tailored to the season, while the third cluster requires minimal stocks and regular evaluations to determine the continuation of its supply. The implementation of the K-Means method has proven effective in reducing storage costs, increasing customer satisfaction, and optimizing inventory management. This study concluded that data mining using the K-Means algorithm can help the Sandar Angin Community Health Center make better decisions regarding drug inventory. The results showed that out of a total of 506 drug data sets, 496 fell into cluster 0, or 98% of the data. One drug data set fell into cluster 1, and nine drug data set fell into cluster 2.

References

D. Fitriyani, M. Jajuli, and G. Garno, “Implementasi Algoritma K-Means Untuk Klasterisasi Dalam Pengelolaan Persediaan Obat (Studi Kasus: Apotek Naza),” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 3, 2024.

S. Farzin, F. N. Chianeh, M. V. Anaraki, and F. Mahmoudian, “Introducing a framework for modeling of drug electrochemical removal from wastewater based on data mining algorithms, scatter interpolation method, and multi criteria decision analysis (DID),” J. Clean. Prod., vol. 266, p. 122075, 2020.

R. D. Parinduri, S. Defit, and G. W. Nurcahyo, “Implementasi Algoritma Apriori dalam Data Mining untuk Optimalisasi Stok Obat di Apotik,” J. KomtekInfo, pp. 89–97, 2024.

R. M. Febrialdo and Y. Wendra, “Penerapan Data Mining Memprediksi Penjualan Obat Menggunakan Metode K-Nearest Neighbor (Studi Kasus: Apotek Difana),” J. Sains Inform. Terap., vol. 4, no. 3, pp. 526–533, 2025.

R. A. N. Rolan, “Penerapan Data Mining Pengelompokan Penjualan Obatdengan Algoritma K-Means Clustering Pada Toko Obat Sanjaya,” J. Data Sci. Penusa, vol. 1, no. 1, pp. 242–247, 2024.

M. I. Habibi, A. Nazir, E. Haerani, and E. Budianita, “Application of Data Mining for Ceramic Sales Data Association Using Apriori Algorithm,” Knowbase Int. J. Knowl. Database, vol. 4, no. 2, pp. 105–114, 2024.

A. Azis, A. T. Zy, and A. S. Sunge, “Prediksi Penjualan Obat Dan Alat Kesehatan Terlaris Menggunakan Algoritma K-Nearest Neighbor,” J. Teknol. Dan Sist. Inf. Bisnis, vol. 6, no. 1, pp. 117–124, 2024.

D. Puspita, D. Setiadi, and R. Wulandari, “Implementation of the Linear Discriminant Analysis (LDA) Method in Potato Fruit Classification,” Jusikom J. Sist. Komput. Musirawas, vol. 9, no. 2, pp. 89–97, 2024.

P. W. Rahayu, I. N. Bernadus, and A. I. Datya, “Penerapan Data Mining Dalam Mengetahui Pola Transaksi Pembelian Obat Menggunakan Algoritma Apriori Di Apotek Kharisma Farma Tiga,” J-Icon J. Komput. Dan Inform., vol. 12, no. 1, pp. 44–55, 2024.

B. T. Admaja, “Data Mining Using K-Means Algorithm for Clustering Snack Sales at CV Sinar Pangan Utama,” J. Artif. Intell. Eng. Appl., vol. 5, no. 1, pp. 946–953, 2025.

N. Hendrastuty, “Penerapan Data Mining Menggunakan Algoritma K-Means Clustering Dalam Evaluasi Hasil Pembelajaran Siswa,” J. Ilm. Inform. dan Ilmu Komput., vol. 3, no. 1, pp. 46–56, 2024.

I. Rinaldi and H. Harmayani, “Penggunaan algoritma clustering K-Means untuk mengelompokkan pola cuaca,” J. Sci. Soc. Res., vol. 8, no. 1, pp. 343–348, 2025.

F. Khalish, N. M. Piranti, and O. Martadireja, “Implementasi Data Mining Menggunakan Teknik Clustering dengan Metode K-Means,” JIIP-Jurnal Ilm. Ilmu Pendidik., vol. 8, no. 5, pp. 5392–5397, 2025.

M. R. Nur, A. Ranggareksa, F. Adiba, and A. Husna, “Clustering The Use Of Puskesmas Soreang Medicine Using The Fuzzy C-Means Method,” J. Heal. Innov. Technol., vol. 1, no. 1, pp. 1–8, 2025.

R. S. Qosimah, G. W. Sasmito, and D. Apriliani, “Drug Data Management Application at Telu Tegal Pharmacy Using Website-Based K-Means Algorithm,” J. Appl. Informatics Sci., vol. 1, no. 1, pp. 18–23, 2025.

M. A. vafky Ideal and I. Fitriyanto, “Implementation of a K-Means-Based Intelligent Patient Complaint Clustering System to Identify Handling Priorities,” Knowbase Int. J. Knowl. Database, vol. 5, no. 1, pp. 69–80, 2025.

M. A. Septianto, A. Faqih, and A. R. Rinaldi, “Klasterisasi data produksi pertanian di Kabupaten Cirebon dengan algoritma K-Means,” J. Inform. dan Tek. Elektro Terap., vol. 13, no. 2, 2025.

L. N. Azizah, L. Utari, L. T. Ningrum, and D. Rahmiyati, “Penerapan Algoritma K-Means untuk Pemetaan Kebutuhan Obat Sesuai Prioritas dalam Pengadaan,” KERNEL J. Ris. Inov. Bid. Inform. dan Pendidik. Inform., vol. 6, no. 1, pp. 162–169, 2025.

D. Setiadi, S. Sasmita, and M. Yolanda, “Penerapan Algoritma Regresi Linier Berganda Untuk Memprediksi Hasil panen Padi Di Kota Pagar Alam,” Kesatria J. Penerapan Sist. Inf. (Komputer dan Manajemen), vol. 5, no. 2, pp. 337–438, 2024.

D. Setiadi, “Analisis Prediksi Harga Beras Berbasis Kualitas Menggunakan Algoritma K-Nearest Neighbord,” J. Ilm. Inform. Glob., vol. 15, no. 3, pp. 106–115, 2024.

C. Schröer, F. Kruse, and J. M. Gómez, “A systematic literature review on applying CRISP-DM process model,” Procedia Comput. Sci., vol. 181, pp. 526–534, 2021.

D. Setiadi, S. Sasmita, and Y. I. Mukti, “Optimization Of Agricultural Production In South Sumatera Using Multiple Linear Regression Algorithm,” Knowbase Int. J. Knowl. Database, vol. 4, no. 2, pp. 168–179, 2024.

A. M. Shimaoka, R. C. Ferreira, and A. Goldman, “The evolution of CRISP-DM for data science: Methods, processes and frameworks,” SBC Rev. Comput. Sci., vol. 4, no. 1, pp. 28–43, 2024.

G. Wulandari, S. Sasmita, and F. Rahmadayanti, “Implementasi Data Mining Menggunakan Algoritma Apriori Dalam Menentukan Persediaan Obat,” J. Tek. Inf. dan Komput., vol. 7, no. 1, pp. 144–150, 2024.

F. D. Agustiar, B. N. Sari, and I. Maulana, “Penerapan Data Mining Untuk Pengelompokan Produk Penjualan Menggunakan Algoritma K-Means,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 1, pp. 58–67, 2025.

D. B. Saputra, V. Atina, and F. E. Nastiti, “Penerapan Model CRISP-DM pada Prediksi Nasabah Kredit Menggunakan Algoritma Random Forest,” IDEALIS Indones. J. Inf. Syst., vol. 7, no. 2, pp. 240–247, 2024.

M. Fauzie, “Klasifikasi Pengadaan Obat Jaminan Kesehatan Nasional Melalui E-Purchasing Menggunakan Algoritma K-Nearest Neighbor,” J. Komputer, Inf. dan Teknol., vol. 4, no. 2, p. 10, 2024.

M. A. F. Razan, N. J. Alifah, Q. A’yuni, and M. Wati, “Application of K-Means Clustering Algorithm for Air Quality Pattern Analysis in Jakarta,” J. Teknol. DAN ILMU Komput. PRIMA, vol. 8, no. 1, pp. 64–80, 2025.

C. A. Fransiska and D. Dafid, “Application of K-Means Clustering Algorithm for Disease Grouping at Blessing Dental Care Clinic,” J. Artif. Intell. Softw. Eng., vol. 5, no. 3, pp. 1119–1132, 2025.

D. Setiadi, A. Arif, and A. Oktaria, “Comparison of K-Nearest Neighbor and Naive Bayes Algorithms for Tuberculosis Diagnosis Classification,” J. Artif. Intell. Softw. Eng., vol. 5, no. 1, pp. 176–187, 2025.

A. Rahmawati, A. Hananto, and F. Nurapriani, “Analisis Segmentasi Pelanggan Menggunakan K-Means Clustering Untuk Optimalisasi Penjualan Sembako,” J. Ilm. Ilk. Komput. Inform., vol. 8, no. 2, pp. 233–243, 2025.

Downloads

Published

2025-12-11

How to Cite

Setiadi, D., & Gusmaliza, D. (2025). Analysis of Drug Inventory Patterns Using the K-Means Algorithm. Knowbase : International Journal of Knowledge in Database, 5(2), 121–131. https://doi.org/10.30983/knowbase.v5i2.10420

Citation Check