Developers new to FHIR are afraid of extensions

There’s something about extensions that say “advanced” or “here be dragons” to a developer in their early weeks (and sometimes months) of FHIR development.

Here’s how the conversation typically goes:

– I have this value, but it doesn’t fit anywhere in the Condition resource. Can I put it in the Note element?

– Is it a note?

– No

– Then you can’t put it in the Note element

– Then where should I put it?

Sound familiar?

FHIR resources are designed with the 80/20 rule in mind. If 80% of users and use cases have no need for an attribute, it was not incorporated into the resource.

For the 20% — where the attribute is less commonly used or is unique to a particular business case — it belongs in an extension. Either in an existing pre-defined extension or in a custom extension.

The answer to the Dev earlier — with their Note element — is:

– Use an extension

The lesson here is don’t fear extensions. They’re part of FHIR and most real world use cases require them.

More about extensions here: https://hl7.org/fhir/extensibility.html

In the FHIR documentation, you’ll find a list of existing and commonly used extensions for each resource by clicking on the resource’s Profiles & Extensions tab. Here are the pre-defined extensions for the Patient resource:

https://hl7.org/fhir/patient-profiles.html#extensions

Discussion

---

Sign up to “The Tuesday FHIR Sessions” and receive an email every Tuesday where I go deep on a single FHIR topic.