FHIR Chat · root node min/max · implementers

Stream: implementers

Topic: root node min/max


view this post on Zulip Nick George (Sep 20 2018 at 20:36):

Hello, I'm curious about min/max restrictions on the root ElementDefinition on a StructureDefinition. E.g., the ElementDefinition for the root element "Patient" on the "Patient" structure definition has min: 0, max: "*" (true for all resources, not just patient). Given that this is the definition for the patient resource, this seems to imply that a given patient resource can have many root patient nodes. Should this be min:1 max:"1"?

view this post on Zulip Lloyd McKenzie (Sep 20 2018 at 21:48):

This means that when something points to Patient it's allowed to have a minimum cardinality as low as 0 and a maximum cardinality as high as . For all resources and data types, the root cardinality is always 0... However, some extension profiles will tighten the cardinality of the root to 0..1 or 1..1. That means that any model that references that extension has to have a cardinality that fits within that constraint. This allows you to define extensions that are only allowed to appear once in a particular location or that must be mandatory when referenced by a profile.


Last updated: Apr 12 2022 at 19:14 UTC