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. Consider a backport extension
If you’re looking to emulate elements in a future version of FHIR, there is an established way to do that using backport extensions.
4. 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
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). Without a StructureDefinition you won’t be able to validate against your new extension.
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.
Steps 6 and 7 are only required if you intend to validate resources that use your 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
---