Journal of Industrial Engineering and Halal Industries
Vol. 6 No. 2 (2025): Journal of Industrial Engineering and Halal Industries (JIEHIS)

Patient Segmentation Based on Visit Patterns and Diagnoses Using the K-Means Clustering Algorithm on Medical Records from XYZ Clinic in 2024

Solihin, Muhammad (Unknown)
Sari, Titi (Unknown)
Sophia Carolina Shani (Unknown)



Article Info

Publish Date
31 Dec 2025

Abstract

Outpatient clinics in Indonesia routinely generate extensive health data through patient visits; however, such data remain underutilized for strategic and clinical decision-making. This study aims to segment patients based on visit frequency, diagnosis codes, demographic characteristics, and payment types using three clustering techniques: K-Means, Agglomerative Hierarchical Clustering, and DBSCAN. The objective is to determine the most effective method for patient stratification in a primary healthcare setting. Patient visit data from Klinik Pratama UIN Sunan Kalijaga for the year 2024 were analyzed. K-Means produced the most granular structure with nine clusters, DBSCAN identified seven clusters including a noise group, while Hierarchical Clustering yielded three macro-clusters. Internal validation using Silhouette Score, Davies-Bouldin Index, and Calinski-Harabasz Index revealed Hierarchical Clustering as the optimal model, achieving the highest cluster cohesion and separation with a Silhouette Score of 0.502, Calinski-Harabasz Index of 2134.87, and Davies-Bouldin Index of 0.668. The dendrogram and principal component analysis visualization confirmed the natural separation into three clinically meaningful patient segments. Cluster 0 comprised patients with acute respiratory and digestive conditions exhibiting sporadic visits. Cluster 1 consisted predominantly of male BPJS-insured patients with musculoskeletal and dental complaints and moderate visit frequency. Cluster 2 included female BPJS-insured patients with chronic metabolic and vascular diseases requiring consistent and frequent care. These findings demonstrate the efficacy of hierarchical clustering in producing interpretable patient segments and provide a valuable foundation for targeted healthcare management and resource allocation in outpatient clinics.

Copyrights © 2025






Journal Info

Abbrev

JIEHIS

Publisher

Subject

Religion Decision Sciences, Operations Research & Management Engineering Industrial & Manufacturing Engineering

Description

JIEHIS aims to improve the academic atmosphere in the publication of scientific papers in industrial engineering and halal issues in the industrial world. This journal is open for publics, researchers, students, lecturers and academics staffs from all countries. We cover wide range areas within ...