Inferensys

Glossary

FHIR Facade

An architectural pattern where a FHIR-compliant API is layered on top of a non-FHIR legacy data source, translating FHIR requests into the backend's native query language in real-time.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
INTEROPERABILITY ARCHITECTURE

What is FHIR Facade?

A FHIR Facade is an architectural pattern that provides a standards-compliant FHIR API interface while translating requests in real-time to a non-FHIR legacy backend system.

A FHIR Facade is a software layer that presents a fully compliant Fast Healthcare Interoperability Resources (FHIR) API to external clients while internally translating those RESTful requests into the native query language of a non-FHIR data source. This pattern enables legacy clinical data repositories, relational databases, or proprietary EHR systems to participate in modern interoperability ecosystems without requiring a costly, full-scale data migration or a complete backend replacement. The facade acts as a real-time translator, parsing incoming FHIR search parameters and resource requests, executing the corresponding native query, and dynamically transforming the returned results into valid FHIR resources.

This approach is critical for federated learning architectures in healthcare, where a central aggregator must query distributed, heterogeneous data nodes without centralizing protected health information. A FHIR Facade allows each institution to expose its clinical data—stored in diverse formats like OMOP CDM or legacy SQL schemas—through a uniform, standards-based interface. By leveraging the facade pattern, federated queries for cohort discovery or model training data can be executed consistently across sites, while the underlying data remains in its original format and location, preserving existing investments and minimizing disruption to clinical operations.

ARCHITECTURAL PATTERNS

Key Characteristics

The FHIR Facade is not a simple proxy; it is a sophisticated translation engine that maps RESTful FHIR semantics onto legacy backend systems in real-time.

01

Real-Time Query Translation

The core mechanism involves intercepting a FHIR RESTful request (e.g., GET /Patient/123) and dynamically translating it into the legacy system's native query language. This is not a static mapping; the facade parses FHIR search parameters like _lastUpdated, _include, and chained parameters, converting them into equivalent SQL, NoSQL, or proprietary API calls. The result set from the backend is then transformed into a valid FHIR Bundle resource before returning it to the client, ensuring the legacy system appears fully FHIR-native without any code modification.

< 200 ms
Typical Translation Overhead
02

On-Demand Resource Normalization

Legacy data rarely conforms to FHIR profiles. The facade applies a mapping layer that normalizes non-standard data models into compliant FHIR Resources during the read path. This includes:

  • Structural transformation: Flattening nested legacy objects into distinct FHIR resources.
  • Terminology mapping: Translating local proprietary codes into standard terminologies like SNOMED CT or LOINC using a pre-configured ConceptMap.
  • Identifier translation: Assigning a logical FHIR ID to a record that may have a composite key in the source system, maintaining a stable identity for external consumers.
03

Operation Support & Write-Back

A robust facade supports not only reads but also transactional writes. It exposes standard FHIR operations like create, update, and $validate. When a client sends a FHIR Transaction Bundle, the facade decomposes it into discrete operations, executes them against the legacy system's API or database in the correct order, and manages the rollback logic if a step fails. This allows modern SMART on FHIR applications to write data back to an aging mainframe or proprietary clinical data repository as if it were a native FHIR server.

04

FHIRPath & Search Parameter Engine

To support complex querying, the facade must implement a subset of the FHIRPath specification and the full FHIR search syntax. This engine evaluates conditional references, reverse chaining, and _has parameters without materializing the entire dataset. For instance, a query for Observation?subject:Patient._has:Condition:subject:code=XYZ requires the facade to execute a sub-query against the legacy system's diagnosis table to filter observations, a capability that distinguishes a true facade from a simple REST wrapper.

05

Stateless Architecture & Scalability

The facade is designed as a stateless, horizontally scalable middleware layer. It stores no clinical data itself; it is a pure compute layer that relies entirely on the source of truth in the legacy backend. This design ensures that the facade does not create a new data silo. It leverages caching only for performance-critical reference data like StructureDefinitions and ValueSets. This statelessness simplifies deployment in containerized environments like Kubernetes, allowing the translation layer to scale independently of the often-monolithic legacy database.

06

Conformance & Capability Exposure

The facade dynamically generates a CapabilityStatement resource that accurately reflects the intersection of what the FHIR standard allows and what the legacy system can actually support. It does not falsely advertise full FHIR conformance. If the backend cannot support a specific search parameter, the facade omits it from the CapabilityStatement.rest.resource.searchParam list. This honest signaling is critical for FHIR Validator tools and client applications to programmatically discover the real limits of the legacy system without encountering runtime errors.

FHIR FACADE ARCHITECTURE

Frequently Asked Questions

A technical deep dive into the architectural pattern that bridges legacy healthcare data silos with modern interoperability standards without costly data migration.

A FHIR Facade is an architectural pattern where a FHIR-compliant RESTful API is layered on top of a non-FHIR legacy data source, translating FHIR requests into the backend's native query language in real-time. Unlike a full data migration or a static data warehouse, the facade acts as a just-in-time translator. When a client sends a FHIR query—for example, GET [base]/Patient?identifier=12345—the facade intercepts this request, parses the FHIR semantics, converts them into a SQL query against a legacy relational database (or a proprietary API call to an old mainframe system), retrieves the raw data, and dynamically maps it into a valid FHIR Patient resource before returning it. This pattern preserves the single source of truth in the legacy system while exposing a modern, standards-based interface for downstream consumers like SMART on FHIR apps or federated learning nodes.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.