Classification of Dental and Oral Diseases using the K-Nearest Neighbor Algorithm based on Patient Medical Record Data

Authors

  • Aprilia Zahara STMIK KAPUTAMA
  • Novriyenni STMIK KAPUTAMA
  • I Gusti Prahmana STMIK KAPUTAMA

DOI:

https://doi.org/10.59934/jaiea.v6i1.3014

Keywords:

Classification; Dental and Oral Disease; K-Nearest Neighbor; Medical Record; SMOTE

Abstract

Dental and oral diseases are still one of the largest public health burdens in Indonesia, and most of the cases are handled at the primary health care level. At Puskesmas Kebun Lada, 700 patient visits with dental and oral complaints were recorded from March 2025 to February 2026, while the determination of the initial diagnosis still depends entirely on the experience and the availability of dental health staff, so it has not been fast, objective, and reproducible. This study applies the k-nearest neighbor algorithm to classify dental and oral diseases based on patient medical record data. The medical records were cleaned from 700 records into 695 records, then 228 variations of free-text symptom sentences were standardised into 19 standard symptoms in binary form, while age and pain scale were transformed into category codes, so that 21 input attributes and six disease classes were obtained. The data were divided into 556 training records and 139 testing records, and only the training data were balanced with SMOTE into 1,542 records. The model was built with K = 5 and the Euclidean distance. The testing produces an accuracy of 96.40 percent with a macro precision of 0.8278, a macro recall of 0.8987, and a macro F1-score of 0.8547, namely 134 of 139 patients were classified correctly, and every testing record together with its predicted class can be traced one by one through the web interface of the program. The testing of K from 1 to 15 confirms that K = 5 is the best value because it produces the highest accuracy and the highest macro F1-score at the same time. The remaining errors are concentrated on class pairs that are clinically adjacent, namely periapical abscess with acute gingivitis and pulpitis with caries of dentine, so the model can be used as an early screening aid and not as a replacement of the diagnosis of dental health staff.

Downloads

Download data is not yet available.

References

Kementerian Kesehatan Republik Indonesia, Laporan Nasional Riset Kesehatan Dasar (Riskesdas) 2018. Jakarta: Badan Penelitian dan Pengembangan Kesehatan, 2018.

L. Febiani, F. Fadly, and Poltekkes Kemenkes Tasikmalaya, “Tinjauan kelengkapan pengisian rekam medis gigi pada kasus nekrosis pulpa di Puskesmas X tahun 2022,” J-REMIKES: Jurnal Rekam Medis dan Informasi Kesehatan, vol. 2, no. 1, 2022.

Peraturan Menteri Kesehatan Republik Indonesia Nomor 269/MENKES/PER/III/2008 tentang Rekam Medis. Jakarta: Kementerian Kesehatan Republik Indonesia, 2008.

S. Lakhotia et al., “Machine learning in dentistry: a scoping review,” PLOS Digital Health, vol. 4, no. 7, 2025, doi: 10.1371/journal.pdig.0000940.

A. Yudha, F. Maulana Riswahyudi, and R. Rizkyatul Basir, “Rancang bangun aplikasi web diagnosa penyakit gigi menggunakan metode Naïve Bayes dan K-Nearest Neighbor,” vol. 2, no. 1, 2024.

A. Kalalo, Rosmini, and Anto, “Klasifikasi penyakit karies gigi menggunakan algoritma Modified K-Nearest Neighbor,” Journal of Big Data Analytic and Artificial Intelligence, vol. 7, no. 2, pp. 48–54, 2024.

R. K. Halder, M. N. Uddin, M. A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” Journal of Big Data, vol. 11, no. 1, 2024, doi: 10.1186/s40537-024-00973-y.

R. Siddalingappa and S. Kanagaraj, “K-nearest-neighbor algorithm to predict the survival time and classification of various stages of oral cancer: a machine learning approach,” F1000Research, vol. 11, p. 70, 2022, doi: 10.12688/f1000research.75469.1.

A. Surdu, D. G. Budala, I. Luchian, L. G. Foia, G. E. Botnariu, and M. M. Scutariu, “Using AI in optimizing oral and dental diagnoses—a narrative review,” Diagnostics, vol. 14, no. 24, 2024, doi: 10.3390/diagnostics14242804.

T. Hartung, A. Ahmed Shamala, J. Chang, and J. S. Patel, “Developing and testing a prediction model for periodontal disease using machine learning and big electronic dental record data,” 2022.

O. Tirkkonen et al., “An explainable and transparent machine learning approach for predicting dental caries: a cross-national validation study,” BMC Oral Health, vol. 26, no. 1, 2026, doi: 10.1186/s12903-026-07660-9.

A. M. Puspitasari, D. E. Ratnawati, and A. W. Widodo, “Klasifikasi penyakit gigi dan mulut menggunakan metode Support Vector Machine,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 2, no. 2, 2018.

R. Buaton, M. Zarlis, and V. Yasin, Konsep Data Mining dalam Implementasi. Jakarta: Mitra Wacana Media, 2021.

I. H. Sarker, “Machine learning: algorithms, real-world applications and research directions,” SN Computer Science, vol. 2, no. 3, p. 160, 2021, doi: 10.1007/s42979-021-00592-x.

H. Azis, Purnawansyah, F. Fattah, and I. P. Putri, “Performa klasifikasi K-NN dan cross validation pada data pasien pengidap penyakit jantung,” ILKOM Jurnal Ilmiah, vol. 12, no. 2, pp. 81–86, 2020, doi: 10.33096/ilkom.v12i2.507.81-86.

S. Sathyanarayanan, “Confusion matrix-based performance evaluation metrics,” African Journal of Biomedical Research, pp. 4023–4031, 2024, doi: 10.53555/ajbr.v27i4s.4345.

G. Jesslyn, B. O. Iskandar, and T. Suwartini, “Perawatan endodontik sekali kunjungan molar pertama kiri mandibula dengan nekrosis pulpa disertai periodontitis apikalis asimptomatik: laporan kasus,” Jurnal Kedokteran Gigi Universitas Padjadjaran, vol. 36, no. 4, p. 196, 2024, doi: 10.24198/jkg.v36i4.49884.

I. A. Bulan, K. Dewi, W. Agus, and W. Pratama, “Prevalensi kasus abses periapikal pada pasien di Poliklinik Gigi UPTD Puskesmas Baturiti I, Tabanan Bali,” Jurnal Kesehatan Gigi, 2025, doi: 10.33992/jkg.v9i1.3433.

A. Fresno Argadianti, H. Tuti Hendarti, and D. Radithia, “Stomatitis aftosa yang diperparah oleh iritasi kimiawi obat tradisional,” Clinical Dental Journal UGM, vol. 6, 2020.

Febby Wilyani, Q. N. Arif, and F. Aslimar, “Pengenalan dasar pemrograman Python dengan Google Colaboratory,” Jurnal Pelayanan dan Pengabdian Masyarakat Indonesia, vol. 3, no. 1, pp. 8–14, 2024, doi: 10.55606/jppmi.v3i1.1087.

N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: synthetic minority over-sampling technique,” Journal of Artificial Intelligence Research, vol. 16, pp. 321–357, 2002, doi: 10.1613/jair.953.

Downloads

Published

2026-10-15

How to Cite

Zahara, A., Novriyenni, & I Gusti Prahmana. (2026). Classification of Dental and Oral Diseases using the K-Nearest Neighbor Algorithm based on Patient Medical Record Data. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 1511–1518. https://doi.org/10.59934/jaiea.v6i1.3014