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

  • Solihin M
  • Sari T
  • Sophia Carolina Shani
N/ACitations
Citations of this article
6Readers
Mendeley users who have this article in their library.

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.

Cite

CITATION STYLE

APA

Solihin, M., Sari, T., & Sophia Carolina Shani. (2025). Patient Segmentation Based on Visit Patterns and Diagnoses Using the K-Means Clustering Algorithm on Medical Records from XYZ Clinic in 2024. Journal of Industrial Engineering and Halal Industries, 6(2), 30–40. https://doi.org/10.14421/jiehis.5377

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free