Infherno: End-to-end Agent-based FHIR Resource Synthesis from Free-form Clinical Notes

Johann Frei Nils Feldhus Lisa Raithel Roland Roller Alexander Meyer Frank Kramer, IT-Infrastructure for Translational Medical Research, University of Augsburg, BIFOLD – Berlin Institute for the Foundations of Learning and Data Technische Universität Berlin, German Research Center for Artificial Inte · 2025

Read Infherno: End-to-end Agent-based FHIR Resource Synthesis from Free-form Clinical Notes by Johann Frei Nils Feldhus Lisa Raithel Roland Roller Alexander Meyer Frank Kramer, IT-Infrastructure for Translational Medical Research, University of Augsburg, BIFOLD – Berlin Institute for the Foundations of Learning and Data Technische Universität Berlin, German Research Center for Artificial Inte (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-12261.txt.

Introduction

Johann Frei and five co-authors build a system that turns free-form clinical notes into structured records in the FHIR standard, the format health systems use to share data. Earlier tools handled only narrow tasks or forced language models into rigid molds, which hurt accuracy and rule-following. Their system, Infherno, uses a team of language model agents that can run code and look up medical terms in standard databases.

The goal is records that match the FHIR document rules while capturing what the notes say. In tests on made-up and real clinical text, the system competed well with a human baseline at predicting structured records. One large commercial model performed best in their checks. The authors note open problems: notes can be ambiguous, and gathering true reference records is hard. They offer the tool, with a front end for custom data, to support data sharing across hospitals.

Catalog record

CREATORJohann Frei Nils Feldhus Lisa Raithel Roland Roller Alexander Meyer Frank Kramer, IT-Infrastructure for Translational Medical Research, University of Augsburg, BIFOLD – Berlin Institute for the Foundations of Learning and Data Technische Universität Berlin, German Research Center for Artificial Inte
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE29 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-12261

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Infherno: End-to-end Agent-based FHIR Resource Synthesis from Free-form Clinical Notes Johann Frei Nils Feldhus Lisa Raithel Roland Roller Alexander Meyer Frank Kramer, IT-Infrastructure for Translational Medical Research, University of Augsburg, BIFOLD – Berlin Institute for the Foundations of Learning and Data Technische Universität Berlin, German Research Center for Artificial Intelligence (DFKI), Berlin, DHZC Medical Data Science, Charité - Universitätsmedizin Berlin Abstract For clinical data integration and healthcare services, the HL7 FHIR standard has established itself as a desirable format for interoperability between complex health data. Previous attempts at automating the translation from free-form clinical notes into structured FHIR resources rely on modular, rule-based systems or LLMs with instruction tuning and constrained decoding. Since they frequently suffer from limited generalizability and structural inconformity, we propose an end-to-end framework powered by LLM agents, code execution, and healthcare terminology database tools to address these issues. Our solution, called Infherno , is designed to adhere to the FHIR document schema and competes well with a human baseline in predicting FHIR resources from unstructured text. The implementation features a front end for custom and synthetic data and both local and proprietary models, supporting clinical data integration processes and interoperability across institutions. 1 Introduction Large language models (LLMs) have demonstrated strong performance in clinical and biomedical domains, as they have been shown to encode domain-specific knowledge Singhal et al. 2023 ; Moor et al. 2023 . They are increasingly used to answer clinical questions by processing relevant documents at inference time Zakka et al. 2024 ; Chen et al. 2025a ; Wang et al. 2024 . However, this retrieval-based incurs significant latency and computational cost, as documents must be reprocessed for every query. This limits usability for tasks such as retrospective analysis or study planning, where multiple queries over the same data are common Coromilas et al. 2021 ; Leibig et al. 2022 . A more scalable solution is to extract structured representations from clinical text in advance. If the extracted structure preserves the relevant information, it can be queried and reused instantly across multiple applications. This is particularly important for healthcare service providers and clinical data integration efforts Leroux et al. 2017 ; Hong et al. 2019 ; Pimenta et al. 2023 . Here, the FHIR (Fast Healthcare Interoperability Resources) 1 1 1 https://fhir.org/ standard provides a flexible and interoperable format for representing healthcare data and is increasingly adopted to support standardized access to complex medical information. Figure 1: Illustrative example of how Infherno , an agentic approach for FHIR resource synthesis, processes a discharge letter (top left, cyan) using SNOMED CT tools (light blue) and code search (green) and fhir.resources code loops (purple, right). After a few iterations including tool calls and observations from a Python executor, the LLM agent proceeds to produce a final answer (red) in a FHIR/JSON format, representing the clinical information on patients and medications. Conventional information extraction (IE) methods, such as classical named entity recognition, are typically designed for narrowly defined tasks and fixed schemata. As such, they lack the flexibility to adapt to complex, variable clinical contexts and often fail to produce complete, structured clinical representations. In contrast, LLMs have shown promise for IE methods when they are framed as structured prediction tasks Dagdelen et al. 2024 . A recurring challenge in such tasks is ensuring that the generated output adheres to a specified schema, particularly when downstream components require well-structured inputs Tavanaei et al. 2024 . This is especially true in domains like healthcare, where semantic correctness and schema compliance are essential. Various approaches have been proposed to guide LLM outputs toward structural conformity, including fine-tuning, pre-training, instruction tuning, or constrained decoding Shin et al. 2021 ; Geng et al. 2023 . Some of them have dealt with text-to-FHIR translation Sharma et al. 2023 ; Li et al. 2024 ; Tabari et al. 2025 ; Pope and Patooghy 2025 , but often encountered inconsistencies with the desired schema. Agentic LLM approaches that “reason” through intermediate steps using external tools, have emerged as a promising solution. Inspired by frameworks like Toolformer Schick et al. 2023 and ReAct Yao et al. 2023 , models perform multiple tool-augmented reasoning steps, with validation and retry mechanisms to ensure correct output. To fill the current gaps, we propose an end-to-end framework that transforms unstructured clinical text into rich, semantically accurate FHIR representations using an agentic LLM-approach. This enables holistic information extraction Zhang et al. 2025 ; Shao et al. 2025 , supports integration of both legacy and new data, and fosters interoperability across institutions. Our contributions are: • An agent-based implementation for text-to-FHIR translation with SNOMED CT terminology integration and FHIR schema validation; • Evaluation on a synthetic benchmark, including detailed error analysis to characterize failures and their severity; • A lightweight demonstrator with front-end functionality, supporting both local and proprietary state-of-the-art LLMs. 2 Background FHIR (Fast Healthcare Interoperability Resources) is a widely adopted standard for exchanging healthcare-related data, developed by the HL7 organization. FHIR defines resources as nested documents, often encoded in JSON, with well-defined types, required fields, enumerations, and references to other resources. A single FHIR resource can represent a broad range of entities, from patients and conditions to administrative structures like coverage or questionnaires. 2 2 2 See an example for a Patient resource object at: https://hl7.org/fhir/R4/patient-example.json.html Due to the richness and expressiveness of the standard, it enables the structured encoding of complex medical information and data in an interoperable fashion. A key feature of FHIR is the integration of internal and external code systems, composed as ValueSets to reference specific entities and concepts. Certain data elements may be constrained to a fixed, FHIR-internal code system to define the set of valid data values. 3 3 3 For instance, Condition.clinicalStatus only allows the values active , recurrence , relapse , inactive , remission , and resolved . For certain fields, concepts can be referenced from external coding systems such as SNOMED CT 4 4 4 https://www.snomed.org/what-is-snomed-ct or LOINC 5 5 5 https://loinc.org/get-started/what-loinc-is/ , and the set of valid data values can be further constrained by individual ValueSets, e.g., in order to limit data entries for body site to the subset of SNOMED CT concepts that only refer to body structures. To search for codes and terms in a specific ValueSet, FHIR terminology servers provide a standardized interface for querying valid concepts. These servers commonly support multiple external code systems like SNOMED CT and LOINC in addition to the FHIR-internal code systems. While the FHIR schema is capable to accurately and verbosely capture complex clinical situations, it may not be used by individual actors to its fullest extent, and only a subset of data elements may be used effectively in some situations depending on use cases and context. In addition, the standard does not always enforce the encoding of certain information into an unambiguous representation. For instance, a bone fracture of the left limb may be expressed as a Fracture of bone SNOMED CT concept along with the bodySite element referring to the Structure of left hand concept, or purely by referring to the Fracture of bone of left hand concept. Dosage information could be phrased only by a free-form text element, or by fully utilizing all relevant structured elements,

Read the complete text