Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Vol. 6 No. 1 (2026): October 2026

Clustering Outpatient and Inpatient Medical Records Based on Patient Complaints using K-Means

Nery Adelia Br Purba (STMIK Kaputama)
Magdalena Simanjuntak (STMIK KAPUTAMA)
Marto Sihombing (STMIK KAPUTAMA)



Article Info

Publish Date
15 Oct 2026

Abstract

Medical record archives contain patterns that can support hospital service planning, but large datasets are difficult to analyze manually. This study developed a clustering application to group outpatient and inpatient medical records at Delia Hospital based on age, patient complaint, and type of service. A total of 600 medical records from 2025 were selected, cleaned, transformed into numerical codes, and processed in MATLAB using the K-means algorithm with squared Euclidean distance. Three scenarios were evaluated, namely K = 3, K = 4, and K = 5, using cluster variance and the distribution of members as comparison measures. The cluster variance decreased from 4.7356 at K = 3 to 2.8841 at K = 4 and 2.0662 at K = 5. The five-cluster solution produced 129, 95, 122, 127, and 127 members, respectively, with dominant complaints of asthma, vertigo, diabetes, fractures, and gastritis. The results indicate that K = 5 provides the most compact and detailed grouping. The resulting information can support the evaluation of outpatient services, inpatient capacity, and hospital resource planning.

Copyrights © 2026






Journal Info

Abbrev

JAIEA

Publisher

Subject

Automotive Engineering Computer Science & IT Control & Systems Engineering

Description

The Journal of Artificial Intelligence and Engineering Applications (JAIEA) is a peer-reviewed journal. The JAIEA welcomes papers on broad aspects of Artificial Intelligence and Engineering which is an always hot topic to study, but not limited to, cognition and AI applications, engineering ...