FHIR-RAG-MEDS: Integrating HL7 FHIR with Retrieval-Augmented Large Language Models for Enhanced Medical Decision Support
Background: Evidence-based clinical guidelines are essential for high-quality care yet translating them into personalized clinical decision support remains resource-intensive and time-consuming. Large language models (LLMs) show promise for supporting clinical decision-making, but their limited access to patient-specific data and explicit guideline sources constrains trustworthiness, personalization, and clinical applicability. Retrieval-augmented generation (RAG) addresses part of this challenge by grounding model outputs in curated evidence sources; however, true personalization requires structured access to electronic health record data. Methods: This study presents FHIR-RAG-MEDS, a medical decision support system that integrates HL7 Fast Healthcare Interoperability Resources (FHIR) with an RAG-enhanced LLM to enable patient-specific, guideline-concordant clinical recommendations. Through SMART on FHIR, the system retrieves real-time patient data from FHIR servers, generates structured medical summaries, and incorporates this personalized context into the RAG pipeline, grounding responses in evidence-based clinical guidelines stored in a vector database. Results: FHIR-RAG-MEDS was evaluated using 139 physician-generated clinical questions covering dementia, chronic obstructive pulmonary disease, hypertension, and sarcopenia. Performance was assessed using automated metrics, RAG-specific evaluation frameworks, and independent expert physician review. The system consistently outperformed state-of-the-art medical LLMs, demonstrating higher semantic accuracy, improved faithfulness to guideline content, and stronger clinical relevance. Conclusions: Integrating HL7 FHIR with RAG-based LLMs enables trustworthy, personalized clinical decision support, bridging the gap between static language models and real-world, patient-centered care.
Authors
- Yildiray Kabak (ORCID: https://orcid.org/0000-0001-7657-8886)
- Asuman Doğaç (ORCID: https://orcid.org/0009-0008-1076-3112)
- Pedro Abizanda (ORCID: https://orcid.org/0000-0002-4707-2963)
- Ali Anıl Sınacı (ORCID: https://orcid.org/0000-0003-4397-3382)
- Rubén Alcantud Córcoles (ORCID: https://orcid.org/0000-0002-5773-0835)
- Mert Gençtürk (ORCID: https://orcid.org/0000-0003-2697-5722)
- Gökçe Banu Laleci Ertürkmen (ORCID: https://orcid.org/0000-0002-6201-3849)
- Tuncay Namlı (ORCID: https://orcid.org/0000-0003-1157-8994)
- Cristina Gómez Ballesteros (ORCID: https://orcid.org/0000-0003-4639-2882)
Institutions
- Ankara University (TR)
- Instituto de Salud Carlos III (ES)
- Software Research and Development Consulting (TR)
- Centro de Investigación Biomédica en Red de Fragilidad y Envejecimiento Saludable (ES)
- Complejo Hospitalario Universitario de Albacete (ES)
- University of Castilla-La Mancha (ES)
Publication Details
- Journal
- AI
- Published
- 2026-07-02
- DOI
- https://doi.org/10.3390/ai7070246
- Primary Topic
- Machine Learning in Healthcare
- Type
- preprint
- Field-Weighted Citation Impact
- 0.00
Funders
- European Commission