Application of the K-Means Algorithm for Patient Clustering Based on Length of Hospital Stay Characteristics at Kutacane Hospital
Keywords:
K-Means Clustering, Patient Segmentation, Length of Hospital Stay, Data Mining, Machine Learning, Hospital Management.Abstract
Length of hospital stay is an important indicator for evaluating healthcare service efficiency, patient care management, and hospital resource utilization. Variations in hospitalization duration are influenced by several demographic and clinical characteristics, including patient age, gender, medical diagnosis, disease category, and individual health conditions. This study aims to apply the K-Means Clustering algorithm to group patients based on length of hospital stay characteristics at Kutacane Hospital. The research employs a quantitative approach using data mining techniques to identify similarities and differences among inpatient records. The research methodology consists of six stages: data collection, data preprocessing, feature selection and data normalization, K-Means clustering implementation, cluster evaluation, and cluster interpretation. The selected attributes include patient age, gender, medical diagnosis, disease category, admission date, discharge date, and length of hospital stay, depending on the availability and quality of medical records. The Elbow method is utilized to determine the optimal number of clusters by analyzing the Within-Cluster Sum of Squares (WCSS), while the Silhouette Score is employed to evaluate cluster cohesion and separation. The clustering process is designed to identify distinct patient groups characterized by relatively short, moderate, and long hospitalization durations. The resulting cluster profiles are expected to provide information regarding patient distribution and hospitalization patterns. Furthermore, this approach is expected to support hospital management in evaluating inpatient services, planning bed capacity, improving healthcare resource allocation, and supporting data-driven operational decision-making. This study highlights the potential of unsupervised machine learning techniques to transform hospital medical records into meaningful analytical information for improving healthcare service management.
References
H. W. Dhany, F. Izhari, and S. Komputer, “Jurnal ICT : Information and Communication Technologies, 15 (2) (2024) 48-54 Prediction analysis condition animal use algorithm (SVM+KNN),” 2024. [Online]. Available: www.ejournal.marqchainstitute.or.id/index.php/JICT
Z. Sitorus, D. Prayogi, M. A. Rizko, A. G. Suteja, and M. R. Harahap, “Implementation of the Insertion Sort Algorithm to Sort Positive Integers in Ascending Order Using Flowgorithm,” Journal of Information Technology, computer science and Electrical Engineering (JITCSE), vol. 1, no. 3, pp. 323–328, 2024, doi: 10.30596/jitcse.
L. Cao, “On Machine Learning and Public Administration,” Frontiers in Management Science, vol. 1, no. 1, Aug. 2022, doi: 10.56397/fms.2022.08.01.
K. Khairul, A. H. Nasyuha, A. Ikhwan, M. H. Aly, and A. Ahyanuardi, “Implementation of Multiple Linear Regression to Estimate Profit on Sales of Screen Printing Equipment,” JURNAL INFOTEL, vol. 15, no. 2, pp. 55–61, Jun. 2023, doi: 10.20895/infotel.v15i2.934.
M. S. Novelan and S. Aryza, “OPTIMIZATION CVRP WITH MACHINE LEARNING FOR IMPROVED CLASSIFICATION OF IMBALANCED DATA FOOD DISTRIBUTION,” JITK (Jurnal Ilmu Pengetahuan dan Teknologi Komputer), vol. 10, no. 4, pp. 917–925, Jun. 2025, doi: 10.33480/jitk.v10i4.6467.
N. Sekar Ramadhanti and W. Ananta Kusuma, “OPTIMASI DATA TIDAK SEIMBANG PADA INTERAKSI DRUG TARGET DENGAN SAMPLING DAN ENSEMBLE SUPPORT VECTOR MACHINE,” vol. 7, no. 6, 2020, doi: 10.25126/jtiik.202072857.
R. Farta Wijaya, F. Kurniawan, R. R. Putrai, A. Alvin, F. Sains, and D. Teknologi, “OPTIMIZING THE MANAGEMENT OF VILLAGE ACTIVITIES THROUGH INFORMATION SYSTEMS FOR TRANSPARENCY AND ACCOUNTABILITY IN PERTUMBUKAN VILLAGE, WAMPU DISTRICT,” 2024.
M. M. Maulana, A. I. Suroso, Y. Nurhadryani, and K. B. Seminar, “The Smart Governance Framework and Enterprise System’s Capability for Improving Bio-Business Licensing Services,” Informatics, vol. 10, no. 2, Jun. 2023, doi: 10.3390/informatics10020053.
A. Putera Utama Siahaan, N. Azizah Harahap, R. Yuni Simanullang, and P. Wanny, “Analysis of Inpatient Data Using Cluster Analysis on Simulation Dataset,” Bulletin of Information Technology (BIT), vol. 6, no. 1, pp. 33–39, 2025, doi: 10.47065/bit.v5i2.1830.
M. S. Novelan, S. Efendi, P. Sihombing, and H. Mawengkang, “VEHICLE ROUTING PROBLEM OPTIMIZATION WITH MACHINE LEARNING IN IMBALANCED CLASSIFICATION VEHICLE ROUTE DATA,” Eastern-European Journal of Enterprise Technologies, vol. 5, no. 3(125), pp. 49–56, 2023, doi: 10.15587/1729-4061.2023.288280.
M. Iqbal and S. Efendi, “Data-Driven Approach for Credit Risk Analysis Using C4.5 Algorithm,” ComTech: Computer, Mathematics and Engineering Applications, vol. 14, no. 1, pp. 11–20, May 2023, doi: 10.21512/comtech.v14i1.8243.
L. Zhu, Y. Zhang, Z. Pan, R. Wang, S. Kwong, and Z. Peng, “Binary and multi-class learning based low complexity optimization for HEVC encoding,” IEEE Transactions on Broadcasting, vol. 63, no. 3, pp. 547–561, Sep. 2017, doi: 10.1109/TBC.2017.2711142.
W. Cetera, W. Gogołek, A. Żołnierski, and D. Jaruga, “Potential for the use of large unstructured data resources by public innovation support institutions,” J. Big Data, vol. 9, no. 1, Dec. 2022, doi: 10.1186/s40537-022-00610-6.
G. Rajeshkumar et al., “Smart office automation via faster R-CNN based face recognition and internet of things,” Measurement: Sensors, vol. 27, Jun. 2023, doi: 10.1016/j.measen.2023.100719.
M. Overton, S. Larson, L. J. Carlson, and S. Kleinschmit, “Public data primacy: the changing landscape of public service delivery as big data gets bigger,” Global Public Policy and Governance, vol. 2, no. 4, pp. 381–399, Dec. 2022, doi: 10.1007/s43508-022-00052-z.
J. Ilmiah, E. & Erudisi, A. Zahara, M. I. Kabullah, and R. E. Putera, “JIEE: Effectiveness of the OSSRBA (Online Single Submission Risk Based Approach) System in Business Licensing Services in Payakumbuh City DPMPTSP,” vol. 3, pp. 22–40, 2023.
L. Von Rueden et al., “Informed Machine Learning - A Taxonomy and Survey of Integrating Prior Knowledge into Learning Systems,” IEEE Trans. Knowl. Data Eng., vol. 35, no. 1, pp. 614–633, Jan. 2023, doi: 10.1109/TKDE.2021.3079836.
W. Jin, “Challenges and Innovative Countermeasures Faced by Public Administration in the Context of Big Data and Internet of Things,” Math. Probl. Eng., vol. 2022, 2022, doi: 10.1155/2022/8949365.
S. D. A. Bujang et al., “Multiclass Prediction Model for Student Grade Prediction Using Machine Learning,” IEEE Access, vol. 9, pp. 95608–95621, 2021, doi: 10.1109/ACCESS.2021.3093563.
M. Genkin, “Zero-Shot Machine Learning Technique for Classification of Multi-User Big Data Workloads,” in Proceedings - 2020 IEEE International Conference on Big Data, Big Data 2020, Institute of Electrical and Electronics Engineers Inc., Dec. 2020, pp. 5046–5055. doi: 10.1109/BigData50022.2020.9378023.
P. Hasan Putra, M. Syahputra Novelan, and M. Rizki, “ANALYSIS K-NEAREST NEIGHBOR METHOD IN CLASSIFICATION OF VEGETABLE QUALITY BASED ON COLOR.”
Ill. ) IEEE Technology and Engineering Management Society. Conference (2018 : Evanston, Institute of Electrical and Electronics Engineers, and IEEE Technology and Engineering Management Society, TEMSCON 2018 : 2018 IEEE Technology & Engineering Management Conference (TEMSCON).
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Maisya Fitri Anugrah; Muhammad Syahputra Novelan

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.




