Clinical data capture with large language models: an architecture using Fast Healthcare Interoperability Resources artifacts as executable models
DOI:
https://doi.org/10.59681/2175-4411.v18.2026.1759Keywords:
Health Information Interoperability, Electronic Health Records, Large Language ModelsAbstract
Objective: to evaluate an architecture that treats FHIR artifacts as executable models to constrain interpretation by large language models (LLM) and to validate conformance before persistence. Methods: direct LLM-to-FHIR generation (A), model-guided extraction without validation (B) and the full architecture with a validation gate (C) were compared on 72 synthetic cases, three Questionnaires, two LLM providers and five repetitions, using a pre-specified mixed model. The Unsafe Persistence Rate measures the storage of a resource that is non-conformant according to an independent external evaluator. Results: under C, this rate was zero for both providers, against 0.236 (OpenAI) and 0.253 (Gemini) under A, and 0.000 and 0.439 under B (Holm p 5.1×10-12); the Persistence Coverage of C was 1.000 with OpenAI and 0.561 with Gemini. All blocks came from validation execution failures caused by dates outside the FHIR format. Model-guided extraction did not increase F1 in the confirmatory analysis (p = 0.263). Across five protocol changes, only A required a code change. Conclusion: validation before persistence prevented the storage of non-conformant resources, at a coverage cost that depended on the provider.
Downloads
References
[1] Bender D, Sartipi K. HL7 FHIR: an agile and RESTful approach to healthcare information exchange. In: Proceedings of the 26th IEEE International Symposium on Computer-Based Medical Systems; 2013 jun 20-22; Porto, Portugal. Piscataway (NJ): IEEE; 2013. p. 326-31. doi: https://doi.org/10.1109/CBMS.2013.6627810
[2] Li Y, Wang H, Yerebakan HZ, Shinagawa Y, Luo Y. FHIR-GPT enhances health interoperability with large language models. NEJM AI. 2024;1(8):AIcs2300301. doi: https://doi.org/10.1056/AIcs2300301
[3] Idrissi-Yaghir A, Arzideh K, Schäfer H, Eryilmaz B, Bahn M, Wen Y, et al. Using a diverse test suite to assess large language models on Fast Health Care Interoperability Resources knowledge: comparative analysis. J Med Internet Res. 2025;27:e73540. doi: https://doi.org/10.2196/73540
[4] Ji Z, Lee N, Frieske R, Yu T, Su D, Xu Y, et al. Survey of hallucination in natural language generation. ACM Comput Surv. 2023;55(12):248. doi: https://doi.org/10.1145/3571730
[5] Omar M, Sorin V, Collins JD, Reich D, Freeman R, Gavin N, et al. Multi-model assurance analysis showing large language models are highly vulnerable to adversarial hallucination attacks during clinical decision support. Commun Med (Lond). 2025;5(1):330. doi: https://doi.org/10.1038/s43856-025-01021-3
[6] Lim KH, Kang U, Li X, Kim JS, Jung YC, Park S, et al. Susceptibility of large language models to user-driven factors in medical queries. J Healthc Inform Res. 2026;10(2):498-522. doi: https://doi.org/10.1007/s41666-025-00218-4
[7] Zhang W, Jiang B, Fu Y, Cheng H, Hummel M, Scotti V, et al. Large language models in model-driven engineering: a systematic mapping study. Empir Softw Eng. 2027;32(1):3. doi: https://doi.org/10.1007/s10664-026-10921-4
[8] Health Level Seven International. Structured Data Capture implementation guide. Version 4.0.0 [Internet]. 2026 [citado 2026 ago 29]. Disponível em: https://hl7.org/fhir/uv/sdc/STU4/
[9] Braga RD. Chatbot baseado em Large Language Models (LLMs) e Fast Healthcare Interoperability Resources (FHIR) para monitoramento de indivíduos com risco para o câncer de boca [trabalho de conclusão de curso de especialização]. São Carlos (SP): Universidade de São Paulo, Instituto de Ciências Matemáticas e de Computação; 2025. doi: https://doi.org/10.11606/003294654
[10] Braga RD, Pedrosa L, Ferraz CT. Clinical data capture with large language models: an architecture using Fast Healthcare Interoperability Resources artifacts as executable models (code and data) [conjunto de dados e software]. Geneva: Zenodo; 2026. doi: https://doi.org/10.5281/zenodo.24615889
[11] Health Level Seven International. Validating resources. In: FHIR Release 4, version 4.0.1 [Internet]. 2019 [citado 2026 ago 29]. Disponível em: https://hl7.org/fhir/R4/validation.html
[12] Zuchowski LC, Zuchowski ML, Nagel E. A trust based framework for the envelopment of medical AI. NPJ Digit Med. 2024;7(1):230. doi: https://doi.org/10.1038/s41746-024-01224-3
[13] Schmidt DC. Guest editor's introduction: model-driven engineering. Computer (Long Beach Calif). 2006;39(2):25-31. doi: https://doi.org/10.1109/MC.2006.58
[14] Sendall S, Kozaczynski W. Model transformation: the heart and soul of model-driven software development. IEEE Softw. 2003;20(5):42-5. doi: https://doi.org/10.1109/MS.2003.1231150
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Renata Dutra Braga, Leandro Pedrosa, Carolina Toledo Ferraz

This work is licensed under a Creative Commons Attribution 4.0 International License.