Skip to content
FHIRVendors

FHIR R4 vs R4B vs R5: What Changed and Which Version to Use

R5 brings topic-based subscriptions, CodeableReference and a batch of new resources, yet most production systems still run R4. Here is what changed and how to decide.

ArchitectureUpdated 5 min readBy the FHIR Vendors Editorial Team

Key takeaways

  • R4 (4.0.1) was the first FHIR release with normative content and remains the version most EHRs, payers and US regulations are built on.
  • R4B (4.3.0) is a limited update aimed mainly at medication definition and evidence-based medicine resources; it is not a general upgrade path for clinical data exchange.
  • R5 (5.0.0, published 2023) redesigns subscriptions around SubscriptionTopic, introduces the CodeableReference data type and adds and restructures many trial-use resources.
  • Choose R4 plus the relevant implementation guides for anything that touches certified EHRs or US regulatory APIs today; consider R5 features selectively, for example through the Subscriptions R5 Backport IG.

The version timeline in brief

FHIR has gone through several major releases: DSTU2, STU3, R4, R4B and R5, with R6 under development. Each release is a complete specification, and resources from different releases are not wire-compatible by default, so a client and server must agree on one. A server advertises its version in the fhirVersion element of its CapabilityStatement.

ReleaseVersionKey characteristic
R44.0.1First release with normative content (core infrastructure plus resources such as Patient and Observation). Basis of US Core and most production APIs.
R4B4.3.0Narrow update focused on medication definition and evidence resources; normative content unchanged from R4.
R55.0.0Published in 2023. Broad changes to trial-use resources, new data types and a redesigned subscriptions framework.

Normative content in R4 carries HL7's backward-compatibility commitment, which is one reason R4 has proven durable. Trial-use resources do not carry that commitment, so most of the differences between R4 and R5 are concentrated there.

What R4B is, and is not

R4B was published to give certain communities, notably regulatory medication definition and evidence-based medicine work, stable versions of resources they needed before R5 was ready. It reworked resources in those areas and added the SubscriptionTopic and SubscriptionStatus resources to support the subscriptions backport. For typical clinical integration, R4B behaves very much like R4 and offers little reason to move; treat it as a special-purpose release unless an implementation guide you depend on requires it.

Notable changes in R5

R5 is a large release. The changes below are the ones most likely to affect architects and developers; the full list is in the version history and difference pages of the R5 specification.

Topic-based subscriptions

In R4, a Subscription carries a search-style criteria string and the server notifies the client whenever matching resources change. That proved hard to implement consistently and hard to scale. R5 replaces it with a topic-based model: servers publish SubscriptionTopic resources describing events they support (for example, an encounter starting), clients subscribe to a topic with optional filters, and notifications arrive as Bundles that include a SubscriptionStatus. Servers can document exactly what they support, and clients no longer need to guess.

Because this model is valuable on its own, HL7 publishes the Subscriptions R5 Backport implementation guide, which lets R4 and R4B systems use topic-based subscriptions without upgrading the whole stack.

CodeableReference and data type changes

R5 introduces CodeableReference, which can hold a concept, a reference to a resource, or both. It replaces many pairs of elements that previously split the same idea, such as a reasonCode alongside a reasonReference. R5 also adds the integer64 data type for large integers. These changes are small individually, but they touch many resources and are a common source of mapping work.

New and restructured resources

  • New resources include SubscriptionTopic, SubscriptionStatus, ActorDefinition, Requirements, Permission, Transport and inventory-related resources.
  • The Media resource was removed; its use cases are covered by DocumentReference.
  • DeviceUseStatement became DeviceUsage.
  • Several workflow and administrative resources, including Encounter, were restructured, so mappings that work in R4 often need revisiting.

Why most production systems remain on R4

Version choice is driven less by features than by who you need to exchange data with. In the United States, the ONC certification criteria for standardized API access reference US Core and SMART App Launch, and the US Core versions named there are built on R4. CMS interoperability rules for payer APIs likewise point to R4-based implementation guides. Major EHR platforms expose R4 APIs to meet those requirements. A new system that speaks only R5 would struggle to connect to the EHRs and payers it actually needs.

Outside the US the picture is similar: many national and international implementation guides, including the International Patient Summary, have been published on R4. That ecosystem of profiles, test tools, libraries and trained developers is a strong reason to stay put until the guides you depend on move.

Check the guide, not just the base version

The practical question is usually not R4 versus R5 but which version of which implementation guide your trading partners and regulators require. Pin that first, and the base version follows.

Migration considerations

Moving between FHIR versions is a data and contract migration, not a library upgrade. Plan it as you would any FHIR migration project:

  1. Inventory the resources, profiles, extensions, search parameters and operations you use today.
  2. Map each element across versions. HL7 publishes cross-version extensions and conversion maps that help, but every mapping needs human review, particularly for restructured resources.
  3. Decide whether to run dual endpoints during the transition. Many organisations expose R4 to external partners while using newer features internally.
  4. Re-validate stored data against the new profiles; data that was valid in R4 can fail R5 validation.
  5. Update clients, test suites and documentation, and give partners a clear deprecation timeline.

For greenfield internal systems with no regulatory exposure, starting on R5 can be reasonable, especially if topic-based subscriptions are central. Even then, check that your chosen server and client libraries support R5 fully; the FHIR server architecture guide covers what to evaluate.

Tooling, libraries and testing across versions

The base version also determines which tools you can rely on. Validators, client libraries, code generators, test kits and implementation guide publishing all target specific releases. Mature open-source servers such as HAPI FHIR support several versions, but each server instance or endpoint typically serves one version, and features introduced in R5 may arrive in libraries before they are hardened in production servers.

  • Confirm that your server, client SDKs and validator all support the exact version and package of each implementation guide you plan to use.
  • Use the FHIR version parameter on the application/fhir+json media type when an endpoint might serve more than one version, so clients and servers can negotiate explicitly.
  • Conformance test kits, including ONC's Inferno tests for US certification criteria, are built around R4-based guides; plan your test strategy around what your partners will test you with.
  • Keep version-specific code paths isolated. A thin mapping layer between an internal model and the external FHIR version makes later upgrades far cheaper.

If the version decision is tangled up with vendor selection, an independent FHIR consulting review of your partners' requirements is usually cheaper than discovering a mismatch during integration testing.

A practical decision guide

SituationSensible default
Integrating with US EHRs or building ONC-certified functionalityR4 with the required US Core and SMART versions
Payer APIs under CMS interoperability rulesR4 with the implementation guides named by CMS
Need real-time event notifications on an R4 platformR4 plus the Subscriptions R5 Backport IG
Medication definition or evidence-based medicine workCheck whether the relevant IG targets R4B or R5
Greenfield internal platform with no external FHIR partnersR5 is viable; confirm tooling support first

Frequently asked questions

Is R5 backward compatible with R4?

Only for normative content, which is a minority of the specification. Many trial-use resources changed in R5, so R4 resources generally need conversion before an R5 server will accept them.

Should a new project start on R5?

If it must exchange data with US EHRs, payers or regulated APIs, start on R4 with the relevant implementation guides. R5 is reasonable for internal systems without those dependencies, provided your server and libraries support it well.

Can I use R5 subscriptions without upgrading to R5?

Yes. The Subscriptions R5 Backport implementation guide defines how R4 and R4B servers can offer topic-based subscriptions, and it is used by several other implementation guides for that purpose.

What happened to FHIR R6?

R6 is in development at HL7. Its goal includes bringing more content to normative status. Until it is published and adopted by the implementation guides you depend on, it should not drive production decisions.

References

  1. HL7 FHIR R4 (4.0.1)
  2. HL7 FHIR R4B (4.3.0)
  3. HL7 FHIR R5 (5.0.0)
  4. HL7 FHIR publication directory
  5. Subscriptions R5 Backport IG
  6. HL7 US Core Implementation Guide

FHIR® is a registered trademark of HL7 International. This guide is independent educational content and is not legal or compliance advice.

Related guides

Related FHIR services

Find the Right FHIR Integration Partner for Your Healthcare Project

Tell us what you need to build or connect. We review every request and share a short list of relevant vendors from our directory — no obligation.