Real world FHIR projects need custom extensions. It’s expected and necessary.
These steps take your extension from idea to production. I wanted a list like this a year ago but couldn’t find one.
1. Look for an approved extension that meets your needs
You’ll find these on the “Profiles & Extensions” tab of each FHIR resource page in the documentation.
2. If there isn’t one, look for an unapproved extension
Sign up for a free account at Simplifier and see what you can find. Use an existing extension where possible.
3. Unless your extension is simple, assume you need a nested extension
Don’t create a host of related single value extensions. Example of a nested extension from US Core: https://vanyalabs.com/files/us-core-extension.png
4. Build out your extension on paper
Treat it like any other data object. Nested extensions can go as many levels deep as necessary.
5. Verify the URL for your new extension
When it reaches a production FHIR server, its URL should be resolvable. No more example.com.
6. Create the StructureDefinition resource
This defines the extension. You can use a tool like Simplifier, or write it yourself in Notepad++ (not recommended).
7. POST the StructureDefinition resource to your FHIR server
Your extension is now live and ready to use.
8. Build a JSON resource that includes your extension
Use Postman to POST it to your FHIR server and check that everything looks ok.
9. Create any custom SearchParameters required for the new extension
If this is new to you, look at some examples on the Hapi test server, and explore FHIRPath for creating expressions.
10. Rebuild your Implementation Guide
If you have one. Also, ensure your server’s CapabilityStatement contains the new extension.
The above steps assume you’ve pulled in and communicated with all the relevant stakeholders. Depending on the project size and scope, this could be a lot of people and teams.
More about extensions: http://hl7.org/fhir/extensibility.html
---
Sign up to “The Tuesday FHIR Sessions” and receive an email every Tuesday where I go deep on a single FHIR topic.