Table of Contents
Fetching ...

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

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 address narrowly defined tasks and rely on modular approaches or LLMs with instruction tuning and constrained decoding. As those solutions 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. Gemini 2.5-Pro excels in our evaluation on synthetic and clinical datasets, yet ambiguity and feasibility of collecting ground-truth data remain open problems.

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

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 address narrowly defined tasks and rely on modular approaches or LLMs with instruction tuning and constrained decoding. As those solutions 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. Gemini 2.5-Pro excels in our evaluation on synthetic and clinical datasets, yet ambiguity and feasibility of collecting ground-truth data remain open problems.

Paper Structure

This paper contains 25 sections, 5 figures, 3 tables.

Figures (5)

  • 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 terminology 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.
  • Figure 2: Front end of Infherno showing a short input text and the final answer as given by Gemini-2.5-Pro in the Agent Chat function.
  • Figure 3: Front end of Infherno showing an intermediate step (Terminology Search) during the text-to-FHIR translation with the Log Replay function.
  • Figure 4: Extended example of clinical note synthesis with Infherno including the System Prompt and a longer snippet from the tool calls and generated Python code which yields the FHIR Resource.
  • Figure 5: The full text from the first document from the synthetic corpus.