FHIR Chat · extensions on nested paths · shorthand

Stream: shorthand

Topic: extensions on nested paths


view this post on Zulip David Hay (Jul 23 2020 at 18:58):

I'm creating a profile on PlanDefinition that has nested action elements, and want to add an extension to the action. If I add the extension to the element thusly:

* action.extension contains
    $TOD named timing-of-days 0..*

It only works at that 'level'. To specify it at a different level, it needs to be explicitly added like so:

* action.action.action.extension contains
    $TOD named timing-of-days 0..*

view this post on Zulip Chris Moesel (Jul 24 2020 at 12:36):

PlanDefinition.action.action is a contentReference to PlanDefinition.action. A contentReference is kind of like a symbolic link to the original definition of what it points to. Since contentReferences do not inherit constraints, I don't think we can expect an extension at the top-level to be automatically inherited by the nested definition. From the contentReference documentation:

ContentReferences... always reference the non-constrained definition.

view this post on Zulip David Pyke (Jul 24 2020 at 12:43):

But the definition of contentReference says "ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc." If it's bringing that all across, why not extensions?

view this post on Zulip Chris Moesel (Jul 24 2020 at 12:46):

@David Pyke -- based on the additional comment that they "reference the non-constrained definition", I think the description you cite refers to the elements within the original definition (e.g., as defined by the core FHIR resource or datatype). I feel like I've brought this ambiguity up before though. Let me see if I can find on old thread that talks about this.

view this post on Zulip Chris Moesel (Jul 24 2020 at 12:50):

OK. Found the old conversation and it did not end as conclusively as I thought. See: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Clarification.20on.20contentReference

I'll poke on that thread and see if Grahame was able to flesh that out in an example or not.

view this post on Zulip David Hay (Jul 24 2020 at 19:00):

Oh, interesting! It's certainly not a blocker in my Use Case as I'm being specific about the levels in use but can see other scenarios where that may be be so simple. I'll follow the conversation with interest...


Last updated: Apr 12 2022 at 19:14 UTC