FHIR Chat · Complex vs Simple FHIR Extensions · implementers

Stream: implementers

Topic: Complex vs Simple FHIR Extensions


view this post on Zulip Shamil Nizamov (Oct 04 2019 at 15:11):

What are the best practices for extension design, whether to group multiple related extension elements together?
The choice of complex vs simple may impact development complexity, when an additional code needs to be built to iterate through FHIR extensions.

view this post on Zulip Jean Duteau (Oct 04 2019 at 15:17):

I don't think there is a real best practices other than normal data modeling best practices. You could potentially group all of your additional elements into one extension, but if those elements don't actually conceptually belong together than that would not make real sense.
Basically, I create extensions as independent as I can so that they can have potential reuse. I do make complex extensions when I have a number of data elements that belong together. As an example, I created an 'initialFillInformation' for MedicationRequest.dispenseRequest. That extension had a number of data elements - quantity, expectedDuration, interval, etc. and they were put in the one complex extension because it makes sense for them to be sent and kept together.

view this post on Zulip Lloyd McKenzie (Oct 04 2019 at 15:42):

If the related elements repeat as a group or there are rules that they can only appear as a group, then nesting is appropriate. Otherwise, it's generally best to leave them as independent. That makes it easier to re-use some but not all and/or to use certain extensions in additional contexts. It also keeps the overall instances 'flatter'.


Last updated: Apr 12 2022 at 19:14 UTC