Drug Expiration Data Clustering Using the K-Means Clustering Algorithm to Determine Drug Sales Priorities (Case Study: Tanjung Sari Farma Pharmacy)
Authors
| Issue | Vol. 11 No. 2 (2026) |
| Published | 19 October 2026 |
| Section | Articles |
| Categories | Information Technology |
| Pages | 98-106 |
Abstract
Manual monitoring of drug expiration dates still exposes community pharmacies to considerable operational risk, since staff must check each expiration record individually before the delay itself becomes a financial or clinical hazard. This condition occurs at Tanjung Sari Farma Pharmacy, which currently records drug data through Microsoft Excel without any feature to group medicines by how close they are to expiring. This applied study develops a web-based monitoring feature that applies the K-Means clustering algorithm to sort drug records according to the number of days remaining before expiration, a variable referred to as Expired Day (ED). The research follows the Knowledge Discovery in Database (KDD) stages, namely data selection, preprocessing, transformation, mining, and evaluation, and the resulting feature is embedded in a system built with the Laravel framework and a MySQL database. Out of 1,782 processed drug records and three manually determined initial centroids, the clustering process converged after five iterations and produced three categories, namely Critical, Alert, and Safe. Black-box and white-box testing confirmed that every system function performed as expected, with cyclomatic-complexity scores indicating a low-to-moderate program structure. The clustering output supports sales prioritization based on the First Expired First Out (FEFO) principle, allowing the pharmacy to act on near-expiry stock faster than before.
Keywords: K-Means Clustering, Monitoring Masa Kedaluwarsa Obat, Data Mining Data Mining, FEFO, Sistem Informasi Berbasis Web
How to Cite
file_copyCopyDownloads
References
[1] E. Haerani, E. Budianita, A. Nazir, and W. Mahesa, “Penerapan K-Means Clustering Pada Data Obat/Alkes di Apotik RSUD Selasih”,
Semin. Nas. Teknol. Informasi, Komun. dan Ind., vol. 1, no. 1, pp. 220–229, 2023.
[2] L. A. Prasetyo, I. Himawan, and R. A. Sihombing, “Pengelompokan Persediaan Obat Dengan Metode K-”, J. Rekayasa Sist. Inf. dan
Teknol., vol. 2, no. 2, pp. 759–768, 2024.
[3] 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, pp. 2841–2848, 2024, doi: 10.23960/jitet.v12i3.4921.
[4] F. P. Ferdy Pangestu, N. Y. Nur Yasin, R. C. Ronald Chistover Hasugian, and Y. Yunita, “Penerapan Algoritma K-Means Untuk Mengk-
lasifikasi Data Obat”, J. Sisfokom (Sistem Inf. dan Komputer), vol. 12, no. 1, pp. 53–62, 2023, doi: 10.32736/sisfokom.v12i1.1461.
[5] S. Syahputra and A. Yasir, “Penerapan Data Mining Dalam Menghitung Pengelompokan Obat-Obatan Kadaluarsa Menggunakan
K-Means”, Device J. Inf. Syst. Comput. Sci. Inf. Technol., vol. 4, no. 2, pp. 171–181, 2023, doi: 10.46576/device.v4i2.4060.
[6] D. K. Damanik, A. Antoni, and M. Z. Siambaton, “Algoritma K-Means untuk Klasterisasi Obat di Puskesmas Simpang Limun Kota
Medan”, Hello World J. Ilmu Komput., vol. 3, no. 2, pp. 100–110, 2024, doi: 10.56211/helloworld.v3i2.549.
[7] E. Wahyuni, F. Yunita, B. Rianto, U. I. Indragiri, I. Hilir, and K. Clustering, “IMPLEMENTASI METODE K-MEANS CLUSTERING
DALAM MENENTUKAN PRODUK FAST, MEDIUM DAN SLOW MOVING PADA APOTEK ZERINA”, vol. 8, pp. 1–10, 2026.
[8] Y. A. Pranoto and N. Vendyansyah, “Implementasi Metode K-Means Clustering pada Aplikasi Pengelompokan Daerah Produksi
Garam Implementation of the K-Means Clustering Method in Salt Production Area Grouping Applications”, J. Bumigora Inf.
Technol., vol. 5, no. 1, pp. 45–52, 2023, doi: 10.30812/bite/v5i1.2690.
[9] E. Tasia, E. Saputra, F. Muttakin, and A. Marsal, “Pengembangan Sistem Informasi Berbasis FEFO untuk Pengendalian Obat
Kadaluwarsa di Apotek Rahman”, J. Pendidik. dan Teknol. Indones., vol. 5, no. 1, pp. 23–38, 2025, doi: 10.52436/1.jpti.554.
