Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

FHIR Server Architecture: HL7 RESTful APIs, Repository vs. Facade Models, Bulk Data ($export), and Open-Source Platforms

Technical guide to HL7 FHIR servers covering RESTful CRUD and Search APIs, CapabilityStatement metadata, Repository vs. Facade models, and Bulk Data.

Written and maintained by CASRAI Editorial Board

Last updated

A FHIR server is a clinical software backend that implements the HL7 Fast Healthcare Interoperability Resources (FHIR) specification to validate, store, index, query, and exchange structured health data over HTTP/HTTPS. Rather than relying on point-to-point HL7 v2 pipe-delimited messages or monolithic C-CDA XML documents, a FHIR server exposes granular FHIR resources—such as Patient, Observation, Condition, MedicationRequest, and DiagnosticReport—as addressable JSON or XML objects governed by a uniform RESTful API.

In both hospital health information technology and clinical research informatics, FHIR servers serve as the foundational interoperability layer required by the Office of the National Coordinator for Health Information Technology (ONC, now ASTP) Cures Act Final Rule (45 CFR § 170.315(g)(10)) and the Centers for Medicare & Medicaid Services (CMS) Interoperability and Prior Authorization Final Rule (CMS-0057-F).

What Is a FHIR Server? Core Architectural Functions

At its core, an HL7 FHIR server performs five standardized engineering functions beyond a generic web API or document database:

  1. Resource Serialization and Parsing: Accepts and returns clinical payloads formatted in FHIR JSON (application/fhir+json), FHIR XML (application/fhir+xml), or Turtle RDF, ensuring strict data type conformance (such as ISO 8601 timestamps, UCUM units of measure, and URI-qualified coding systems).
  2. Profile and Terminology Validation: Validates incoming resources against base HL7 FHIR StructureDefinitions (such as FHIR R4 v4.0.1) and regional Implementation Guides (such as US Core), verifying cardinality rules, Must Support elements, and binding conformance to SNOMED CT, LOINC, RxNorm, and ICD-10-CM value sets.
  3. Search Parameter Indexing: Extracts searchable clinical attributes—such as patient identifiers, LOINC observation codes, encounter dates, and clinical status tokens—from nested resource paths using FHIRPath expressions so clients can execute complex clinical queries without writing SQL.
  4. Version History and Provenance Tracking: Maintains an immutable version sequence (meta.versionId and meta.lastUpdated) for every resource change and associates changes with FHIR Provenance and AuditEvent records.
  5. SMART on FHIR Authorization Enforcement: Integrates with an OAuth 2.0 and OpenID Connect identity provider to enforce granular scopes (such as patient/Observation.rs or system/*.read) before returning electronic protected health information (ePHI).

FHIR Repository vs. FHIR Facade Architectures

Health systems, electronic health record (EHR) vendors, and research data warehouses deploy FHIR servers using one of two primary architectural patterns: a Persistent FHIR Repository (also called a native or JPA server) or a FHIR Facade.

Architectural Dimension Persistent FHIR Repository Server FHIR Facade Server
Underlying Storage Model Stores FHIR resources natively in a dedicated database managed by the FHIR server (e.g., PostgreSQL JSONB, relational JPA tables, or MongoDB). Has no independent persistence layer; sits in front of an existing legacy EHR, LIMS, or enterprise SQL database.
Read/Search Execution Queries pre-indexed FHIR search tables directly for sub-second CRUD and multi-parameter searches. Translates incoming FHIR HTTP search parameters on the fly into native SQL queries, stored procedures, or internal EHR APIs, then maps results into FHIR JSON.
Write Operations (POST/PUT) Supported out of the box; validates and persists any conformant FHIR resource type and custom extensions. Requires custom write-back mappers into legacy database tables; often restricted to read-only or narrow write profiles.
Data Synchronization Requires an ingestion pipeline (HL7 v2-to-FHIR converters, CDC streams, or ETL) to stay synchronized with source clinical systems. Zero data duplication; always reflects the real-time state of the underlying system of record.
Typical Use Cases Clinical data repositories (CDRs), payer CMS-0057-F data hubs, multi-site research registries, and cloud analytics lakes. Wrapping an existing hospital EHR, laboratory information system (LIS), or clinical trial EDC system to expose a compliant FHIR endpoint.

HL7 FHIR RESTful API Interactions and Operations

The HL7 FHIR specification defines a standardized matrix of RESTful interactions grouped into three levels—Instance level, Type level, and Whole-system level—alongside extended operations prefixed with a dollar sign ($).

1. CapabilityStatement Discovery (GET /metadata)

Every conformant FHIR server must expose an unauthenticated or base endpoint at GET [base]/metadata that returns a CapabilityStatement resource. This machine-readable manifest declares which FHIR version the server runs (e.g., 4.0.1), which resource types it supports, which search parameters and _include chains are enabled for each resource, which Implementation Guides (such as US Core 6.1.0) are enforced, and the OAuth 2.0 token and authorization URLs inside its rest.security extension.

2. Instance, Type, and System Interactions

  • Instance-Level Interactions: Operate on a specific resource identified by its logical ID: read (GET [base]/[type]/[id]), vread (GET [base]/[type]/[id]/_history/[vid]), update (PUT [base]/[type]/[id]), patch (PATCH [base]/[type]/[id] using JSON Patch or FHIRPath Patch), and delete (DELETE [base]/[type]/[id]).
  • Type-Level Interactions: Operate across a resource collection: create (POST [base]/[type]) and search (GET [base]/[type]?[parameters] or POST [base]/[type]/_search). FHIR search supports data-type-specific modifiers (:exact, :contains, :below for hierarchical SNOMED/ICD codes), prefixes (ge, le for dates and lab values), chained parameters (Observation?patient.birthdate=1980-01-01), and reverse chaining (_has).
  • System-Level Interactions: Operate across the entire server: transaction and batch (POST [base] with a Bundle of type transaction for all-or-nothing ACID execution or batch for independent execution).

3. Extended Operations ($validate, $everything, $export)

Beyond standard CRUD, FHIR servers implement RPC-style extended operations:

  • $validate: Checks whether a candidate resource conforms to a base resource definition or a specified StructureDefinition profile without persisting it, returning an OperationOutcome listing any structural or terminology errors.
  • Patient/[id]/$everything: Retrieves a comprehensive compartment bundle containing all clinical records linked to a specific patient across resource types.
  • Bulk Data $export: Mandated under ONC 45 CFR § 170.315(g)(10) for population-level data extraction and research cohorts. A client initiates an asynchronous job via GET [base]/Group/[id]/$export with header Prefer: respond-async. The server returns 202 Accepted with a Content-Location polling URL, and upon completion delivers newline-delimited JSON (.ndjson) files partitioned by resource type.

Major Open-Source and Cloud FHIR Server Implementations

Informatics teams can choose between open-source self-hosted frameworks, enterprise commercial clinical data repositories, and hyperscale cloud managed services.

FHIR Server Platform Language / Stack License & Deployment Model Key Technical Capabilities
HAPI FHIR (JPA & Plain Server) Java (Spring Boot / Hibernate) Apache 2.0 open source Supports both Plain Server (Facade) and JPA Server (Persistent Repository); full DSTU2 through R5 support, Terminology Services, and Bulk Data $export.
Smile CDR Java (Built on HAPI FHIR) Commercial enterprise (on-prem / cloud) Adds enterprise HL7 v2 and C-CDA ingestion, Clinical Quality Language (CQL) engine, Master Data Management (EMPI), and CMS-0057-F payer modules.
LinuxForHealth (IBM) FHIR Server Java (Open Liberty) Apache 2.0 open source High-throughput modular R4/R4B server supporting PostgreSQL and Derby backends, native Bulk Data $export/$import, and SMART App Launch.
Firely Server (formerly Vonk) C# / .NET Core Commercial (free evaluation tier) Supports SQL Server, PostgreSQL, and MongoDB; includes pluggable custom facade middleware and native integration with Simplifier.net profile packages.
Microsoft FHIR Server / Azure Health Data Services C# / .NET Core MIT open source / Azure PaaS Open-source .NET engine backing Azure Health Data Services; supports Cosmos DB and SQL Server storage, DICOM Cast, and FHIR-to-Synapse analytics pipelines.
Google Cloud Healthcare API & AWS HealthLake Managed Cloud PaaS Commercial cloud services (HIPAA BAA) Serverless FHIR R4 stores with automated scaling; Google exports real-time streaming schemas to BigQuery, while AWS HealthLake integrates medical NLP and Athena queries.

Frequently Asked Questions

What is a FHIR server?

A FHIR server is a specialized healthcare backend application that implements the HL7 Fast Healthcare Interoperability Resources (FHIR) RESTful API specification. It enables clinical applications, EHRs, payers, and research platforms to create, read, update, delete, validate, and search standardized health data resources (such as Patient, Observation, and MedicationRequest) over HTTPS using JSON or XML formats.

What is the difference between a FHIR Facade and a FHIR Repository?

A FHIR Facade translates incoming FHIR API requests into real-time queries against an existing legacy database or EHR without storing a second copy of the data. A FHIR Repository persists FHIR resources natively inside its own indexed database, allowing it to store arbitrary FHIR extensions, execute complex multi-resource searches rapidly, and serve as a longitudinal clinical data warehouse.

How does a FHIR server handle terminology validation for LOINC and SNOMED CT?

A FHIR server can either use an built-in terminology module (loading code systems like LOINC, SNOMED CT, and RxNorm directly into its database) or delegate terminology operations (CodeSystem/$validate-code, ValueSet/$expand, and ConceptMap/$translate) to an external FHIR Terminology Server such as Ontoserver or Snowstorm.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about FHIR Server Architecture: HL7 RESTful APIs, Repository vs. Facade Models, Bulk Data ($export), and Open-Source Platforms

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →