You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For SUSHI 3.0: do not create a type slice for elements when the choice has already been restricted to a single type. For example, consider this FSH:
Profile: MyObservation
Parent: Observation
* value[x] only CodeableConcept
* valueCodeableConcept from http://example.org/foo
Currently, whenever SUSHI sees a type-specific path (like valueCodeableConcept), it uses the standard type slicing mechanism to represent it. It does this even after value[x] has been constrained to a single type (as above). So you end up w/ a differential something like this:
Technically, this type slicing is totally unnecessary since value[x] can only be a single type -- therefore you don't need slices to disambiguate. Since slicing adds complexity, we like to avoid it when we can. To that end, SUSHI should detect when this happens (type slice on a choice that has already been constrained to a single type) and apply any constraints directly to the choice element instead. This would effectively be the same as:
Profile: MyObservation
Parent: Observation
* value[x] only CodeableConcept
* value[x] from http://example.org/foo
For SUSHI 3.0: do not create a type slice for elements when the choice has already been restricted to a single type. For example, consider this FSH:
Currently, whenever SUSHI sees a type-specific path (like
valueCodeableConcept
), it uses the standard type slicing mechanism to represent it. It does this even aftervalue[x]
has been constrained to a single type (as above). So you end up w/ a differential something like this:Technically, this type slicing is totally unnecessary since
value[x]
can only be a single type -- therefore you don't need slices to disambiguate. Since slicing adds complexity, we like to avoid it when we can. To that end, SUSHI should detect when this happens (type slice on a choice that has already been constrained to a single type) and apply any constraints directly to the choice element instead. This would effectively be the same as:Resulting in this much simpler differential:
This was proposed on Zulip and received positive feedback. See: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Type.20Slices.20on.20Choices.20w.2F.20a.20Single.20Type/near/282241129
The text was updated successfully, but these errors were encountered: