Automated Drug Name Mapping Using Weighted Ensemble Natural Language Processing and Machine Learning Reranker

Authors

  • Azmi Fadhilah Hasibuan Politeknik Caltex Riau
  • Shumaya Resty Ramadhani Politeknik Caltex Riau
  • Akhas Rahmadeyan GUE Ecosystem

DOI:

https://doi.org/10.57152/malcom.v6i4.2679

Keywords:

Drug Name Mapping, Ensemble Scoring, Fuzzy String Matching, Machine Learning Reranker, NLP

Abstract

Drug names in Electronic Medical Records (EMR) are often entered by healthcare workers as free text, resulting in spelling errors, inconsistent formatting, and ambiguous abbreviations that hinder automated mapping to standardized drug databases. This study proposes an automated drug name-mapping system that integrates multi-method ensemble scoring with a supervised machine learning reranker. The system employs Term Frequency–Inverse Document Frequency (TF-IDF) character n-grams for candidate retrieval, followed by a weighted ensemble of five similarity methods, including Best Matching 25 and fuzzy string-matching variants, supplemented by pharmaceutical-domain features. A Random Forest reranker is subsequently applied to improve ranking accuracy. Experiments were conducted on 9,326 free-text prescriptions against a master database of 55,078 drug entries, using an 80:20 stratified split to train and evaluate the reranker. The proposed system achieved a Top-1 Accuracy of 79.53%, representing an 18.53 percentage-point improvement over the Euclidean Distance baseline (61.00%). The confidence-scoring mechanism categorized predictions into three tiers: HIGH-confidence cases achieved 87.44% accuracy, and LOW-confidence cases achieved 28.30% accuracy, enabling selective automation for HIGH-confidence cases and targeted manual review for ambiguous cases. These results confirm that ensemble-based Natural Language Processing, combined with machine-learning-based reranking, provides a reliable solution for automated drug name standardization in clinical information systems.

Downloads

Download data is not yet available.

References

Kementerian Kesehatan Republik Indonesia, Peraturan Menteri Kesehatan Republik Indonesia Nomor 24 Tahun 2022 tentang Rekam Medis. 2022, pp. 1–20.

K. Ulum, I. L. Hilmi, and S. Salman, “Review Artikel?: Implementasi dan Evaluasi Peresepan Elektronik Dalam Upaya Menurunkan Kesalahan Pengobatan,” Journal of Pharmaceutical and Sciences, vol. 6, no. 1, pp. 192–198, Jan. 2023, doi: 10.36490/journal-jps.com.v6i1.19.

W. H. Organization, Global Burden of Preventable Medication-Related Harm in Health Care : A Systematic Review. World Health Organization, 2024.

L. Naseralallah, D. Stewart, M. Price, and V. Paudyal, “Prevalence, Contributing Factors, and Interventions to Reduce Medication Errors in Outpatient and Ambulatory Settings: A Systematic Review,” Int. J. Clin. Pharm., vol. 45, no. 6, pp. 1359–1377, Dec. 2023, doi: 10.1007/s11096-023-01626-5.

A. E. Amalia and M. Basabih, “Overview of Medication Error Incidence in Hospitals in Various Countries: Literature Review,” Jurnal Administrasi Kesehatan Indonesia, vol. 11, no. 1, pp. 145–153, May 2023, doi: 10.20473/jaki.v11i1.2023.145-153.

S. Suwarti, E. Rachmani, and E. Rimawati, “Electronic Medical Records in Increasing User Satisfaction: Literature Review,” Management Analysis Journal, vol. 14, no. 1, pp. 14–22, 2025, [Online]. Available: http://maj.unnes.ac.id

A. A’aqoulah et al., “Trends and Types of Medical Errors Reporting Following the Implementation of Electronic Health Record System,” 2026, doi: 10.2147/DHPS.S558973.

D. Septiani and I. Isabela, “Analisis Term Frequency Inverse Document Frequency (TF-IDF) dalam Temu Kembali Informasi pada Dokumen Teks,” SINTESIA: Jurnal Sistem dan Teknologi Informasi Indonesia, vol. 01, no. 2, pp. 81–88, 2022.

M. Maryamah, G. Wilsen, C. T. Suhalim, R. Septiana, A. Fajar, and M. I. Solihin, “Hybrid Information Retrieval with Masked and Permuted Language Modeling (MPNet) and BM25L for Indonesian Drug Data Retrieval,” in 2024 16th International Conference on Knowledge and Smart Technology (KST), IEEE, Feb. 2024, pp. 242–247. doi: 10.1109/KST61284.2024.10499674.

M. L. Wallace et al., “Use and Misuse of Random Forest Variable Importance Metrics in Medicine: Demonstrations Through Incident Stroke Prediction,” BMC Med. Res. Methodol., vol. 23, no. 1, p. 144, Jun. 2023, doi: 10.1186/s12874-023-01965-x.

H. Le et al., “Rxnorm for Drug Name Normalization: A Case Study of Prescription Opioids in The FDA Adverse Events Reporting System,” Frontiers in Bioinformatics, vol. 3, Jan. 2024, doi: 10.3389/fbinf.2023.1328613.

I. Azam, K. Jiang, and G. B. Bernard, “Normalizing Health Concepts with Biomedical Embedding and LLMs,” 2026. [Online]. Available: https://github.com/Medical-NLP/COVID-19-Sig

Z. Xu, Z. Huang, S. Zhuang, and V. Srikumar, “Distillation versus Contrastive Learning: How to Train Your Rerankers.” [Online]. Available: https://github.com/zhichaoxu-shufe/

F. Neha, D. Bhati, and D. K. Shukla, “Retrieval-Augmented Generation (RAG) in Healthcare: A Comprehensive Review,” AI, vol. 6, no. 9, pp. 1–29, Sep. 2025, doi: 10.3390/ai6090226.

M. Triartama Manurung, G. Ngurah, L. Wijayakusuma, I. Putu, and W. Gautama, “Named Entity Recognition for Medical Records of Heart Failure Using a Pre-trained BERT Model,” 2025. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC

M. H. Rifki, Y. R. W. Utami, and P. Harsadi, “Text Mining Untuk Analisis Sentimen Review Film Menggunakan Algoritma Naïve Bayes,” JuSiTik?: Jurnal Sistem dan Teknologi Informasi Komunikasi, vol. 7, no. 2, pp. 77–86, Jul. 2024, doi: 10.32524/jusitik.v7i2.1168.

A. Hermawan, I. Jowensen, J. Junaedi, and Edy, “Implementasi Text-Mining untuk Analisis Sentimen pada Twitter dengan Algoritma Support Vector Machine,” JST (Jurnal Sains dan Teknologi), vol. 12, no. 1, pp. 129–137, Apr. 2023, doi: 10.23887/jstundiksha.v12i1.52358.

H. Aditya, Ardiansyah, Sidik, and W. Gata, “Analisis Sentimen Penggunaan Twitter Terhadap Penggunaan Cairan Desinfektan Menggunakan Metode Term Frequency-Inverse Document Frequency Dan Support Vector Machine,” Jurnal Ilmu-ilmu Informatika dan Manajemen, vol. 14, no. 2, pp. 167–174, 2020, Accessed: May 18, 2025. [Online]. Available: https://media.neliti.com/media/publications/414201-none-8fa7a6de.pdf

Sintia, S. Defit, and G. Widi Nurcahyo, “Product Codefication Accuracy with Cosine Similarity and Weighted Term Frequency and Inverse Document Frequency (TF-IDF),” Journal of Applied Engineering and Technological Science, vol. 2, no. 2, pp. 14–21, 2021, Accessed: May 18, 2025. [Online]. Available: https://journal.yrpipku.com/index.php/jaets/article/view/210/175

I. S. Wibowo, A. Witanti, and I. Susilawati, “Keyword Extraction Judul Berita Online Di Indonesia Menggunakan Metode TF-IDF,” Jurnal Teknik Informatika dan Sistem Informasi, vol. 11, no. 1, pp. 99–111, [Online]. Available: http://jurnal.mdp.ac.id

J. Pokrywka, “Passage Retrieval of Polish Texts Using OKAPI BM25 and an Ensemble of Cross Encoders,” Sep. 2023, pp. 1265–1269. doi: 10.15439/2023F9253.

P. Jiang and X. Cai, “A Survey of Text-Matching Techniques,” Information (Switzerland), vol. 15, no. 6, pp. 1–53, Jun. 2024, doi: 10.3390/info15060332.

S. Pawestri and Y. Suyanto, “Analisis Perbandingan Metode Similarity untuk Kemiripan Dokumen Bahasa Indonesia pada Deteksi Kemiripan Teks Bahasa Indonesia,” Jurnal Media Informatika Budidarma, vol. 8, no. 3, pp. 1440–1450, Jul. 2024, doi: 10.30865/mib.v8i3.7648.

A. Dzaky, H. Musta’in, A. Sanjaya, and A. B. Setiawan, “Penerapan Regular Expression dan Cosine Similarity pada Uji Kemiripan Kalimat Bahasa Indonesia,” INOTEK, vol. 9, pp. 154–162, 2025.

Q. Hu, Y. Chen, D. Zou, Z. He, and T. Xu, “Predicting Adverse Drug Event Using Machine Learning Based on Electronic Health Records: A Systematic Review and Meta-Analysis,” Front. Pharmacol., vol. 15, pp. 1–17, Nov. 2024, doi: 10.3389/fphar.2024.1497397.

M. M. Alvanof, Bustami, and R. K. Dinata, “Penerapan Algoritma Random Forest dalam Deteksi dan Klasifikasi Ransomware,” Jurnal Elektronika dan Teknologi Informasi, vol. 5, no. 2, pp. 23–31, 2024.

M. Li et al., “Using Semantic Text Similarity calculation for question matching in a rheumatoid arthritis question-answering system,” Quant. Imaging Med. Surg., vol. 13, no. 4, pp. 2183–2196, Apr. 2023, doi: 10.21037/QIMS-22-749/COIF.

O. Rainio, J. Teuho, and R. Klén, “Evaluation Metrics and Statistical Tests for Machine Learning,” Sci. Rep., vol. 14, no. 1, pp. 1–14, Dec. 2024, doi: 10.1038/s41598-024-56706-x.

C. T. Hoyt, M. Berrendorf, M. Galkin, V. Tresp, and B. M. Gyori, “A Unified Framework for Rank-based Evaluation Metrics for Link Prediction in Knowledge Graphs,” Apr. 2022, [Online]. Available: http://arxiv.org/abs/2203.07544

A. Wang, C. Liu, J. Yang, and C. Weng, “Fine-Tuning Large Language Models for Rare Disease Concept Normalization,” Journal of the American Medical Informatics Association, vol. 31, no. 9, pp. 2076–2083, Sep. 2024, doi: 10.1093/jamia/ocae133.

M. Li et al., “Using Semantic Text Similarity calculation for question matching in a rheumatoid arthritis question-answering system,” Quant. Imaging Med. Surg., vol. 13, no. 4, pp. 2183–2196, Apr. 2023, doi: 10.21037/qims-22-749.

L. Liu et al., “Web-Based Application Based on Human-in-the-Loop Deep Learning for Deidentifying Free-Text Data in Electronic Medical Records: Development and Usability Study,” Interact. J. Med. Res., vol. 12, pp. 1–17, Aug. 2023, doi: 10.2196/46322.

E. M. Voorhees, “The TREC-8 Question Answering Track Report,” 2000.

L. Breiman, “Random Forests,” 2001.

Downloads

Published

2026-10-30

How to Cite

Hasibuan, A. F., Ramadhani, . S. R., & Rahmadeyan, A. (2026). Automated Drug Name Mapping Using Weighted Ensemble Natural Language Processing and Machine Learning Reranker. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 6(4), 2087-2098. https://doi.org/10.57152/malcom.v6i4.2679