FHIR Chat · Cardinality of elements and slices · conformance

Stream: conformance

Topic: Cardinality of elements and slices


view this post on Zulip Saul Kravitz (Nov 19 2020 at 17:30):

This question isn't directly answered in http://hl7.org/fhir/R4/profiling.html#slice-cardinality .

How can I achieve the following:

- an element that is 0..*
- if the element is present, the element has a slice a that has cardinality 1..*

So, can the cardinality of the base element be 0.., and the cardinality of the slice be 1..?

Currently, Sushi assumes the answer is NO, and bumps the cardinality of the base element to 1..*.
@Chris Moesel. @Lloyd McKenzie @Grahame Grieve

view this post on Zulip Lloyd McKenzie (Nov 19 2020 at 20:08):

So what you're saying is "if present, one of the repetitions must look like this". That sounds legitimate to me, but I don't know that we've defined element slices as being conditional on "if present".

view this post on Zulip Saul Kravitz (Nov 19 2020 at 20:43):

Correct. Today, we have to do that with invariants, which is messier methinks.


Last updated: Apr 12 2022 at 19:14 UTC