Abstract
Cutaneous adverse drug reactions (CADRs) are the most common form of adverse drug reactions, ranging from mild rashes to life-threatening diseases, such as Stevens–Johnson syndrome and toxic epidermal necrolysis. However, there is no effective tool to predict antibiotic-associated CADRs. In this study, we propose an antibiotic-associated CADR prediction model using electronic health record (EHR) foundation models (FMs). EHR FMs are based on the pretraining-finetuning paradigms of language models, corresponding medical codes and their sequences to words and sentences. We included 802,131 inpatients across three tertiary hospitals in Korea, combining EHR data with nursing statements and reports to extract skin rash records. Our approach achieved the best predictive performance compared to all the other baseline models across all datasets. To enhance clinical relevance, we classified CADRs into immediate and delayed types and conducted a detailed sub-analysis. Finally, we found that properly configured EHR FMs can effectively predict the risk of developing antibiotics-associated CADRs, particularly for delayed-type reactions where predictive testing options are limited.
Similar content being viewed by others
Data availability
The raw data used in this study are not publicly available to preserve participant privacy. The data generated and analyzed during the study are available from the corresponding author upon reasonable request.
Code availability
Source code for the experiments is publicly available at https://github.com/kicarussays/CDM-BERT.
References
Edwards, I. R. & Aronson, J. K. Adverse drug reactions: Definitions, diagnosis, and management. Lancet 356, 1255–1259 (2000).
Lazarou, J., Pomeranz, B. H. & Corey, P. N. Incidence of adverse drug reactions in hospitalized patients: A meta-analysis of prospective studies. JAMA 279, 1200–1205 (1998).
Seo, B. et al. Incidence and economic burden of adverse drug reactions in hospitalization: A prospective study in Korea. J. Korean Med. Sci. 38, e56 (2023).
Gomes, E. R. & Demoly, P. Epidemiology of hypersensitivity drug reactions. Curr. Opin. Allergy Clin. Immunol. 5, 309–316 (2005).
Thong, B. Y., Leong, K. P., Tang, C. Y. & Chng, H. H. Drug allergy in a general hospital: Results of a novel prospective inpatient reporting system. Ann. Allergy Asthma Immunol. 90, 342–347 (2003).
Frey, N. et al. The epidemiology of stevens-johnson syndrome and toxic epidermal necrolysis in the UK. J. Invest Dermatol 137, 1240–1247 (2017).
Lee, E. Y., Knox, C. & Phillips, E. J. Worldwide prevalence of antibiotic-associated Stevens-Johnson syndrome and toxic epidermal necrolysis: A systematic review and meta-analysis. JAMA Dermatol 159, 384–392 (2023).
Singh, M. P. et al. Antimicrobial utilization in a paediatric intensive care unit in India: A step towards strengthening antimicrobial stewardship practices. PLOS ONE 19, e0310515 (2024).
Rossi, G., da Silva Cartell, A. & Marchiori Bakos, R. Dermoscopic aspects of cutaneous adverse drug reactions. Dermatol. Pract. Concept. 11, e2021136 (2021).
Finkelstein, Y., Macdonald, E. M., Li, P., Hutson, J. R. & Juurlink, D. N. Recurrence and mortality following severe cutaneous adverse reactions. Jama 311, 2231–2232 (2014).
Duong, T. A., Valeyrie-Allanore, L., Wolkenstein, P. & Chosidow, O. Severe cutaneous adverse reactions to drugs. Lancet 390, 1996–2011 (2017).
Parasrampuria, S. & Henry, J. Hospitals’ use of electronic health records data, 2015–2017. ONC Data Brief. 46, 13 (2019).
Liang, J. et al. Adoption of electronic health records (EHRs) in China during the past 10 years: consecutive survey data analysis and comparison of sino-american challenges and experiences. J. Med. Internet Res. 23, e24813 (2021).
Lee, K. et al. Digital health profile of South Korea: A cross sectional study. Int. J. Environ. Res. Public Health 19, 6329 (2022).
Huang, D., Cogill, S., Hsia, R. Y., Yang, S. & Kim, D. Development and external validation of a pretrained deep learning model for the prediction of non-accidental trauma. npj Digital Med. 6, 131 (2023).
Shang, J., Ma, T., Xiao, C. & Sun, J. In 28th International Joint Conference on Artificial Intelligence, IJCAI 2019, 5953–5959 (International Joint Conferences on Artificial Intelligence, 2019).
Li, Y. et al. BEHRT: Transformer for electronic health records. Sci. Rep. 10, 7155 (2020).
Rasmy, L., Xiang, Y., Xie, Z., Tao, C. & Zhi, D. Med-BERT: Pretrained contextualized embeddings on large-scale structured electronic health records for disease prediction. npj Digital Med. 4, 86 (2021).
Pang, C. et al. In Proceedings of Machine Learning for Health Vol. 158 (eds Roy Subhrajit et al.) 239–260 (PMLR, Proceedings of Machine Learning Research, 2021).
Li, Y. et al. Hi-BEHRT: Hierarchical transformer-based model for accurate prediction of clinical events using multimodal longitudinal electronic health records. IEEE J. Biomed. Health Inform. 27, 1106–1117 (2023).
Devlin, J., Chang, M.-W., Lee, K. & Toutanova, K. In Proc. 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers). 4171–4186 (2019).
Wornow, M., Thapa, R., Steinberg, E., Fries, J. & Shah, N. Ehrshot: An ehr benchmark for few-shot evaluation of foundation models. Adv. Neural Inf. Process. Syst. 36, 67125–67137 (2023).
Kim, J. et al. Pretrained patient trajectories for adverse drug event prediction using common data model-based electronic health records. Commun. Med. 5, 232 (2025).
Fiszenson-Albala, F. et al. A 6-month prospective survey of cutaneous drug reactions in a hospital setting. Br. J. Dermatol 149, 1018–1022 (2003).
Hernández-Salazar, A. et al. Epidemiology of adverse cutaneous drug reactions. A prospective study in hospitalized patients. Arch. Med. Res. 37, 899–902 (2006).
Park, C. S. et al. The use of an electronic medical record system for mandatory reporting of drug hypersensitivity reactions has been shown to improve the management of patients in the university hospital in Korea. Pharmacoepidemiol Drug Saf. 17, 919–925 (2008).
Breiman, L. Random forests. Mach. Learn. 45, 5–32 (2001).
Jerome, H. F. Greedy function approximation: A gradient boosting machine. Ann. Stat. 29, 1189–1232 (2001).
Graves, A. in Supervised Sequence Labelling with Recurrent Neural Networks (ed Graves A.) 37–45 (Springer Berlin Heidelberg, 2012).
Chung, J., Gulcehre, C., Cho, K. & Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555 (2014).
Choi, E. et al. Retain: An interpretable predictive model for healthcare using reverse time attention mechanism. Advances in neural information processing systems 29 https://doi.org/10.48550/arXiv.1608.05745 (2016).
Guo, L. L. et al. EHR foundation models improve robustness in the presence of temporal distribution shift. Sci. Rep. 13, 3767 (2023).
Vovk, V. Cross-conformal predictors. Ann. Math. Artif. Intell. 74, 9–28 (2015).
Sun, J. et al. Applying mondrian cross-conformal prediction to estimate prediction confidence on large imbalanced bioactivity data sets. J. Chem. Inf. Model. 57, 1591–1598 (2017).
Ding, T., Angelopoulos, A., Bates, S., Jordan, M. & Tibshirani, R. J. Class-conditional conformal prediction with many classes. Adv. neural Inf. Process. Syst. 36, 64555–64576 (2023).
Zhao, J., Henriksson, A., Asker, L. & Boström, H. Predictive modeling of structured electronic health records for adverse drug event detection. BMC Med Inf. Decis. Mak. 15, S1 (2015).
Bampa, M. & Papapetrou, P. Aggregate-eliminate-predict: Detecting adverse drug events from heterogeneous electronic health records. ArXiv abs/1907.06058 (2019).
Khan, D. A. et al. Drug allergy: A 2022 practice parameter update. J. Allergy Clin. Immunol. 150, 1333–1393 (2022).
Broyles, A. D. et al. Practical guidance for the evaluation and management of drug hypersensitivity: Specific drugs. J. Allergy Clin. Immunol. Pr. 8, S16–s116 (2020).
Doña, I. et al. An algorithm for the diagnosis of beta-lactam allergy, 2024 update. Allergy 80, 633–637 (2025).
Yoon, S. Y. et al. Validation of the cephalosporin intradermal skin test for predicting immediate hypersensitivity: A prospective study with drug challenge. Allergy 68, 938–944 (2013).
Kwon, J. W. et al. Results of intradermal skin testing with cefazolin according to a history of hypersensitivity to antibiotics. J. Korean Med Sci. 34, e319 (2019).
Sousa-Pinto, B. et al. Accuracy of penicillin allergy diagnostic tests: A systematic review and meta-analysis. J. Allergy Clin. Immunol. 147, 296–308 (2021).
Kardaun, S. H. et al. Drug reaction with eosinophilia and systemic symptoms (DRESS): an original multisystem adverse drug reaction. Results from the prospective RegiSCAR study. Br. J. Dermatol 169, 1071–1080 (2013).
Broyles, A. D., Banerji, A. & Castells, M. Practical guidance for the evaluation and management of drug hypersensitivity: General concepts. J. Allergy Clin. Immunol. Pract. 8, S3–s15 (2020).
Brockow, K. et al. EAACI position paper on how to classify cutaneous manifestations of drug hypersensitivity. Allergy 74, 14–27 (2019).
Biedermann, P. et al. Standardizing registry data to the OMOP Common Data Model: experience from three pulmonary hypertension databases. BMC Med. Res. Methodol. 21, 238 (2021).
Benson, T. Principles of health interoperability HL7 and SNOMED. (Springer Science & Business Media, 2012).
Liu, S., Wei, M., Moore, R., Ganesan, V. & Nelson, S. RxNorm: prescription for electronic drug information exchange. IT Professional 7, 17–23 (2005).
McDonald, C. J. et al. LOINC, a universal standard for identifying laboratory observations: A 5-year update. Clin. Chem. 49, 624–633 (2003).
Ke, G. et al. in Proceedings of the 31st International Conference on Neural Information Processing Systems 3149–3157 (Curran Associates Inc., Long Beach, California, USA, 2017).
Wolf, T. et al. Huggingface’s transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771 https://doi.org/10.48550/arXiv.1910.03771 (2019).
Vaswani, A. et al. Attention is all you need. Advances in neural information processing systems 30 (2017).
DeLong, E. R., DeLong, D. M. & Clarke-Pearson, D. L. Comparing the areas under two or more correlated receiver operating characteristic curves: A nonparametric approach. Biometrics 44, 837–845 (1988).
Wilson, E. B. Probable inference, the law of succession, and statistical inference. J. Am. Stat. Assoc. 22, 209–212 (1927).
Acknowledgements
This work was supported by the Korea Institute of Drug Safety & Risk Management and the AI Institute at Seoul National University. S.H.K. receives funding from Korea Institute of Drug Safety & Risk Management, and J.K. is supported by the fellowship program of the AI Institute at Seoul National University. The funder played no role in study design, data collection, analysis and interpretation of data, or the writing of this manuscript.
Author information
Authors and Affiliations
Contributions
S.H.K. and J.K. contributed to the conceptualization and design of the study. J.K. handled and mainly analyzed the research data, and all authors interpreted the results. J.K. constructed the machine learning and deep learning models and conducted statistical analysis. J.K. and K.K. wrote the original draft of the paper. S.H.K. and K.K. reviewed the clinical evidence of the study. K.S.K., S.Y., and M.G.K. provided the data, and J.K. verified the quality of the data. J.K., S.H.K., K.S.K., M.G.K., and S.Y. had full access to the raw data. All authors had the final responsibility to submit for publication.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Kim, J., Kim, K., Yun, JE. et al. Prediction of antibiotic-associated cutaneous adverse drug reactions using electronic health record foundation models. npj Digit. Med. (2026). https://doi.org/10.1038/s41746-026-02503-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41746-026-02503-x


