Getting started with FHIR is easy. Moving beyond the basics — not so much.
Developers new to FHIR often assume they have it all covered after a week or two of writing code using their SDK.
But there’s a lot more to FHIR than updating and querying resources.
Here are 7 FHIR concepts a new dev working with FHIR will almost certainly encounter in their first year — but maybe not in their first month.
1. Resource version history
Most FHIR servers store a full version history of changes to a resource. These earlier versions can be accessed using the “_history” query parameter and via most SDKs. Hugely valuable and under utilized by developers.
Example: https://hapi.fhir.org/baseR4/Patient/20-gT7aVFiUBGQ/_history/2
2. Contained resources
FHIR resources can contain other resources. This often happens when incomplete or partial data is being imported to your FHIR server from an external source. Examples might be anonymized Patient data or Practitioner resources without identifiers.
http://hl7.org/fhir/R4/domainresource-definitions.html#DomainResource.contained
3. Conditional PUT requests
A common mistake made by devs new to FHIR is to run a GET request followed by a PUT or POST depending on what comes back. A conditional update is a more efficient way to achieve the same outcome, as it allows you to specify a query that determines whether a resource is created or updated.
4. Nested extensions
Extensions can be more than a “url / value” pair. They can run many levels deep and represent complex data objects. Here’s an example of the ethnicity extension from US Core which contains three nested extensions:
https://vanyalabs.com/files/us-core-extension.png
5. Custom SearchParameters
Search parameters exist for most commonly used resource elements. But what if you want to search on a less used element or on an extension that you created? You can do this by creating a new SearchParameter and applying it to your FHIR server
6. Profiles
Creating profiles is pushing into advanced FHIR territory, but most devs will encounter existing profiles at some point, often as part of an Implementation Guide they must conform to. You should understand the basics.
https://hl7.org/FHIR/profiling.html
7. The $everything operation
Probably the most commonly used of all FHIR operations, $everything returns all resources connected to a specific Patient or Encounter. Valuable for certain use cases, but try not to over use it. A well crafted query is almost always better.
https://www.hl7.org/fhir/patient-operation-everything.html
---
Sign up to “The Tuesday FHIR Sessions” and receive an email every Tuesday where I go deep on a single FHIR topic.