Stream: Profiling Academy
Topic: Cardinality slicing
Shamil Nizamov (Oct 02 2020 at 18:09):
Is it possible to slice the first level element of the resource with simple data type (e.g., Observation.note, Observation.subject), so that one slice has this element as required (cardinality 1..1 or 1..*) and another or default slice has this element as optional? Creating two resource profiles obviously is an option but that's what I'd like to avoid in such particular case.
Richard Townley-O'Neill (Oct 13 2020 at 06:08):
You cannot slice on the root, you cannot slice Observation so that in one slice Observation.subject is required and in another slice it is optional.
You can use an invariant, see the two rules on the Observation node for examples.
Last updated: Apr 12 2022 at 19:14 UTC