IMPLEMENTATION OF AN API KEY-BASED LARGE LANGUAGE MODEL FOR ICD CODE RECOMMENDATION IN HOSPITALS

Authors
  • Budi Fajar Supriyanto

    Politeknik Negeri Jember, Jember, Indonesia
  • Muhammad Hilmy Haidar Fawwazie

    Universitas Brawijaya, Malang, Indonesia
  • Brian Rizky Solehuddin Bachtiar

    Universitas Bina Nusantara, Jakarta, Indonesia
  • Syafa Alviatur Sudarto Putri

    Politeknik Negeri Jember, Jember, Indonesia
  • Wafiq Nawa Sabila

    Politeknik Negeri Jember, Jember, Indonesia
  • Dzulfiqor Aflahi Hasan Mumtaz

    Politeknik Negeri Jember, Jember, Indonesia
Keywords:
Artificial intelligence, Hospital information system, Icd coding, Large language model, Medical record
Abstract

Objective: This study aimed to design, implement, and evaluate the accuracy and usability of a Large Language Model (LLM)-based ICD code recommendation feature, integrated into a hospital information system (SIMRS) through an Application Programming Interface (API) key, to support coders during the abstracting and coding process. Method: This was a quantitative Research and Development (R&D) study with a cross-sectional evaluation design, conducted as an early proof-of-concept using synthetic data rather than real patient records. A total sample of 25 synthetic diagnosis narratives, co-developed with health information management (RMIK) students and lecturers to represent Chapter I of ICD-10 (Certain Infectious and Parasitic Diseases, A00–B99), was used to test a prototype architecture connecting a coding-support module to a commercial LLM via a secured API key, guided by a retrieval-augmented prompt referencing the ICD-10 index. LLM-generated recommendations were compared against the codes assigned by RMIK lecturers acting as expert validators (reference standard). Accuracy, precision, recall, F1-score, and Cohen's Kappa were calculated, and 20 RMIK students and lecturers assessed the prototype's usability using the System Usability Scale (SUS). Results: The prototype produced a top-1 accuracy of 64.0% (16/25) and a top-3 accuracy of 76.0% (19/25) against the expert validators' codes, with moderate agreement (Kappa = 0.58) and a mean SUS score of 74.5 (category: Good). Response time per case averaged 3.2 seconds. Novelty: Integrating an LLM through an API key into a coding-support prototype is technically feasible and shows promising early accuracy and usability for ICD code recommendation on a limited, single-chapter synthetic dataset.

References

[1] J. Ong et al., "Applying large language model artificial intelligence for retina International Classification of Diseases (ICD) coding," J. Med. Artif. Intell., 2023, doi: 10.21037/jmai-23-106.

[2] X. Jiang et al., "The performance boundaries of knowledge prompts: a study on injection strategies and scale effects for ICD coding tasks in large language models," Digit. Health, vol. 12, 2026, doi: 10.1177/20552076261434052.

[3] P. Naliyatthaliyazchayil, R. Muthyala, J. Gichoya, and S. Purkayastha, "Evaluating the reasoning capabilities of large language models for medical coding and hospital readmission risk stratification: zero-shot prompting approach," J. Med. Internet Res., vol. 27, 2025, doi: 10.2196/74142.

[4] K. Arzideh et al., "Automated tumor International Classification of Diseases coding of real-world pathology reports using self-hosted large language models," JCO Clin. Cancer Inform., vol. 10, Art. no. e2500254, 2026, doi: 10.1200/cci-25-00254.

[5] A. Gershon, S. Soffer, G. N. Nadkarni, and E. Klang, "Automatic ICD coding using LLMs: a systematic review," medRxiv, preprint, 2025, doi: 10.1101/2025.07.30.25330916.

[6] S. Li et al., "Verification is all you need: prompting large language models for zero-shot clinical coding," IEEE J. Biomed. Health Inform., vol. 29, pp. 8536–8549, 2025, doi: 10.1109/jbhi.2025.3593028.

[7] J. S. Boyle, A. Kascenas, P. Lok, M. Liakata, and A. Q. O'Neil, "Automated clinical coding using off-the-shelf large language models," arXiv, preprint arXiv:2310.06552, 2023, doi: 10.48550/arxiv.2310.06552.

[8] Z. Hou, H. Liu, J. Bian, X. He, and Z. Yan, "Enhancing medical coding efficiency through domain-specific fine-tuned large language models," NPJ Health Syst., vol. 2, 2025, doi: 10.1038/s44401-025-00018-3.

[9] D. Yoon et al., "Redefining health care data interoperability: empirical exploration of large language models in information exchange," J. Med. Internet Res., vol. 26, 2024, doi: 10.2196/56614.

[10] Y. Artsi et al., "Large language models in real-world clinical workflows: a systematic review of applications and implementation," Front. Digit. Health, vol. 7, 2025, doi: 10.3389/fdgth.2025.1659134.

[11] V. A. De Almeida et al., "Large language models as medical code selectors: a benchmark using the International Classification of Primary Care," JAMIA Open, vol. 9, no. 1, Art. no. ooag017, 2026, doi: 10.1093/jamiaopen/ooag017.

[12] C.-W. Huang, S.-C. Tsai, and Y.-N. Chen, "PLM-ICD: automatic ICD coding with pretrained language models," arXiv, preprint arXiv:2207.05289, 2022, doi: 10.48550/arxiv.2207.05289.

[13] J. Brooke, "SUS: A 'quick and dirty' usability scale," in Usability Evaluation in Industry, P. W. Jordan, B. Thomas, B. A. Weerdmeester, and I. L. McClelland, Eds. London, U.K.: Taylor & Francis, 1996, pp. 189–194.

[14] D. Fauzi, M. Isnan, K. S. Nugroho, and B. Pardamean, Machine Learning & Deep Learning. Padang, Indonesia: Media Scitech, 2025.

[15] J. R. Landis and G. G. Koch, "The measurement of observer agreement for categorical data," Biometrics, vol. 33, no. 1, pp. 159–174, Mar. 1977, doi: 10.2307/2529310.