This study implements the K-Means algorithm in a web-based information system to cluster generic drug sales data at Apotek Attar. Sales records had previously been stored mainly as archives and had not been used to identify sales patterns for inventory control. The system was developed using Rapid Application Development (RAD), PHP, and MySQL. The dataset contains 50 generic drugs with total sales in 2025. K-Means produced three groups: 9 drugs in the high-sales cluster, 17 in the medium-sales cluster, and 24 in the low-sales cluster. Post-hoc internal validation yielded a Silhouette Score of 0.532 and a Davies-Bouldin Index of 0.534. Black Box Testing covered 32 scenarios across the Head of Pharmacy, Admin, and Cashier roles, and all scenarios produced the expected results. The system integrates transactions, drug management, clustering, monitoring, and reports so that cluster information can support inventory prioritization. The main limitations are the dataset size, the use of a single primary sales attribute, and the absence of usability testing.
Copyrights © 2026