FHIR Chat · Extension cardinality · implementers

Stream: implementers

Topic: Extension cardinality


view this post on Zulip Richard Kavanagh (Sep 07 2016 at 09:54):

For a simple extension (one with a single data point) should the cardinality of the value[x] property be 1:1 ? If not how does it work if the extension is used in a resource with a cardinality of 1:1 and the extension data point has a cardinality of 0:1?

view this post on Zulip Mirjam Baltus (Sep 07 2016 at 10:27):

I agree you should set the cardinality of value[x] to 1..1, or it would make no sense. Couldn't find this in the text in the specs though.

view this post on Zulip Grahame Grieve (Sep 07 2016 at 12:27):

extensions that contain extensions do not have a value. That's why value is 0..1. If you have a simple extension, then you set value to 1..1

view this post on Zulip Michel Rutten (Sep 07 2016 at 14:06):

Regarding Extension cardinality, the new snapshot generator in the FHIR .NET API deals with extensions in resource profiles in the same way as other element type constraints. Starting with the extension element as inherited from the base resource, first the external extension (element type) profile is merged, and then any differential constraints on the extension element in the resource profile. So the cardinality in the referenced extension definition profile overrides the extension element cardinality specified by the base profile, and the referencing profile can override both by specifying inline differential constraints on the extension element. And as always, overrides can only constrain, not relax. This way, we have a consistent mental model and implementation logic for both ordinary type constraints and extensions. I hope this makes sense.

view this post on Zulip Patrick Werner (Dec 01 2016 at 13:47):

what is the meaning of the cardinality column in the extension registry or in the Extension resource itself?
e.g. http://build.fhir.org/extension-iso21090-adxp-streetname.html has 0..* Whats the meaning of this, what's the difference to the cardinality of the profile using the extension?
I couldn't find an explanation in the FHIR Doku.

view this post on Zulip Grahame Grieve (Dec 01 2016 at 18:39):

if you say that the extension cardinality is 1..1, then when you use the extension, you have to have a cardinality of 1..1 for it. If you say it's 0..*, then when you use the extension, it can have any cardinality you want

view this post on Zulip Patrick Werner (Dec 02 2016 at 08:15):

thanks @Grahame Grieve this is what we expected. Maybe this can be mentioned somewhere in the documentation?

view this post on Zulip Grahame Grieve (Dec 02 2016 at 10:44):

it is, surely. but, no, apparently not. Can you create a gForge task?

view this post on Zulip Patrick Werner (Dec 02 2016 at 11:25):

created G#12413


Last updated: Apr 12 2022 at 19:14 UTC