FHIR Chat · Root cardinality · argonaut

Stream: argonaut

Topic: Root cardinality


view this post on Zulip Jay Lyle (May 16 2019 at 20:16):

In the Argonaut Medication profile, there is a Cardinality specification of 0..* at the root level. It's unclear what a root cardinality would mean - can I use a bag of medications instead of one? That seems counter to the 'relaxing the constraint' principle, intuitively. I ask because we have cases where an order for one medication may result in dispensing many, and I'd like to put them all in a single Dispense instance, but it looks like I may need several.

view this post on Zulip Lloyd McKenzie (May 16 2019 at 20:19):

It means that when including the resource elsewhere, it's allowed to be optional and is allowed to repeat. That's true of all resources. However, when we put constraints on certain profiles, we might tighten down the number of times it's allowed to appear. Most typically when defining extensions. E.g. "If you're going to declare support for this extension, minOccurs must be at least 1" or "If you declare support for this extension, it's not allowed to repeat".

view this post on Zulip Jay Lyle (May 20 2019 at 11:01):

Thanks. So the cardinality specified in the referring resource governs; this isn't a loophole.

view this post on Zulip Lloyd McKenzie (May 20 2019 at 14:29):

The cardinality in the referencing resource can't be looser than the cardinality defined on the referenced structure. (Doing so will trigger a validation error on the referencing profile)


Last updated: Apr 12 2022 at 19:14 UTC