FHIR-Former: enhancing clinical predictions through Fast Healthcare Interoperability Resources and large language models

Merlin Engelke, Giulia Baldini, Jens Kleesiek, Felix Nensa, Amin DadaJ. Am. Medical Informatics Assoc 2025 · DOI

TL;DR

This paper introduces FHIR-Former, a novel framework that automates clinical prediction tasks by seamlessly integrating Fast Healthcare Interoperability Resources (FHIR) with large language models (LLMs). By eliminating manual feature engineering and adapting to diverse FHIR implementations, FHIR-Former promises to make predictive healthcare analytics more scalable, interoperable, and readily deployable in clinical workflows.

What Problem Does This Paper Address?

The increasing digitalization of healthcare has led to an explosion of electronic health record (EHR) data, creating a huge opportunity for predictive modeling to improve patient outcomes and optimize resource allocation. However, existing predictive models face significant hurdles:

  • Data Heterogeneity: EHRs contain a mix of structured (e.g., lab results, medications) and unstructured (e.g., clinical notes) data, making it difficult to integrate them into a cohesive model.
  • Manual Feature Engineering: Many models require extensive manual effort to select and engineer features, which is time-consuming, error-prone, and limits their adaptability to new datasets or clinical tasks.
  • Lack of Interoperability: Different institutions have varying FHIR implementations, creating preprocessing burdens and hindering the seamless integration of predictive models into existing clinical workflows.

This paper aims to bridge this gap by providing a standardized, automated, and flexible framework for clinical prediction.

Methods

FHIR-Former is an end-to-end pipeline designed to address the aforementioned challenges. Its core components and novel approaches include:

  • FHIR Integration: It leverages FHIR resources to standardize and extract both structured and unstructured clinical data, eliminating the need for institution-specific preprocessing.
  • Large Language Models (LLMs): The framework utilizes pre-trained LLMs (specifically GeBERTa for German clinical text) to process and understand complex clinical information, including unstructured notes.
  • Automated Feature Engineering: FHIR-Former dynamically configures input sources, including clinical reports, lab values, and medications, removing the need for manual feature selection.
  • Configurable Pipeline: The system is orchestrated through a command-line interface (CLI) and configuration files, allowing researchers to easily adapt it to new tasks, select specific FHIR resources, and define temporal parameters.
  • Hyperparameter Optimization: Bayesian optimization, integrated with Weights & Biases (W&B), is used to systematically tune model hyperparameters for optimal performance.
  • Clinical Workflow Integration: Predictions are converted into FHIR RiskAssessment resources, allowing them to be seamlessly integrated into existing EHR systems and displayed to clinicians without disrupting their workflows.
  • Data Sampling Strategies: The framework supports both "sliding window" (treating each hospital encounter as independent) and "expanding window" (continuously updating with daily events) approaches for handling longitudinal patient data.

Datasets

The study utilized a retrospective dataset of 450,218 patients admitted between 2017 and 2022. This dataset was used to train and evaluate models for four distinct predictive tasks:

  • 30-day hospital readmission: Cohort size of 295,605 patients.
  • In-hospital mortality: Cohort size of 408,267 patients.
  • Imaging study prediction: Cohort size of 111,842 patients.
  • ICD-10 code classification: Cohort size of 54,151 patients.

The paper does not introduce a new benchmark dataset but rather demonstrates the framework's ability to work with existing FHIR-formatted data.

Key Insights and Ideas

  • FHIR as a Unifier: The paper strongly advocates for FHIR as a crucial standard for overcoming data silos and enabling interoperable AI in healthcare.
  • LLMs for Clinical Text: The successful application of LLMs like GeBERTa highlights their power in extracting meaningful insights from complex, unstructured clinical notes.
  • Automation is Key: The elimination of manual feature engineering is presented as a major breakthrough, significantly reducing development time and increasing model adaptability.
  • Task-Specific Resource Relevance: The analysis of feature importance reveals that different FHIR resources are critical for different prediction tasks, underscoring the need for a flexible approach.
  • Bridging the Gap: By outputting predictions as FHIR RiskAssessment resources, the framework directly addresses the challenge of integrating AI insights into clinician workflows.

Key Results

FHIR-Former demonstrated promising performance across the evaluated tasks:

  • 30-day Readmission: Achieved an F1-score of 70.7% and accuracy of 72.9%.
  • In-hospital Mortality: Achieved an F1-score of 51.8% and accuracy of 88.1%.
  • Imaging Study Prediction: Achieved a macro F1-score of 61%.
  • ICD-10 Code Prediction: Achieved an accuracy of 94% and a macro F1-score of 48%.

The framework also showed scalability across these diverse tasks without requiring manual feature engineering.

Limitations and Future Work

The authors acknowledge several limitations and suggest future directions:

  • Model Interpretability: While the framework provides resource importance, the transformer architecture's "black box" nature limits deep interpretability of individual predictions.
  • Dataset Comparability: Direct comparison with existing models is challenging due to the lack of publicly available, FHIR-bundled benchmark datasets and the multimodal nature of FHIR-Former.
  • Generalizability: The study focused on inpatient settings, limiting generalizability to outpatient or ambulatory care. Models are also dependent on the specific institution's FHIR implementation and data quality.
  • Resource Completeness: Variability in local coding practices and resource completeness may necessitate institution-specific tuning of extraction logic.
  • Future Work:
    • Expanding to include outpatient settings and multimodal data (e.g., wearables, genomics).
  • Investigating model distillation or quantization for resource-constrained environments.
  • Conducting prospective studies to evaluate real-world impact and validate risk scores in live clinical workflows.
  • Exploring generative tasks with transformer decoder models for synthesizing clinical notes or treatment plans.

Summary updated

BibTeX
@article{engelke2025fhir,
  author = {Merlin Engelke and Giulia Baldini and Jens Kleesiek and Felix Nensa and Amin Dada},
  title = {{FHIR-Former: enhancing clinical predictions through Fast Healthcare Interoperability Resources and large language models}},
  journal = {J. Am. Medical Informatics Assoc.},
  year = {2025},
  doi = {10.1093/jamia/ocaf165},
}
Figure