firely-net-sdk
firely-net-sdk copied to clipboard
BodyTemp Profile Snapshot contains additional slices in value[x]
Describe the bug The following profile https://simplifier.net/packages/hl7.fhir.r4.core/4.0.1/files/80181/~overview restricts value[x] to valueQuantity, including a closed slicing. The generated snapshot contains all additional slices and doesn't properly constrain the allowed types in value[x]. Also the information that the slicing is closed is no longer present in the snapshot.
Expected behavior When validating the attached example instance, valueCodeableConcept should be rejected by the validator.
Version used:
- FHIR Version: R4
- Version: 1.9.0
This is about implicit slicing and happens when you create a profile and you want to constrain a choice of data types. A few years ago there was a discussion about this for snapshot generation and a Jira ticket was made by Chris Grenz. We implemented that. Especially point 2 is interesting: "[..] The inclusion of a type specific path (such as "Patient.deceasedBoolean" shall not be interpreted as constraining allowed types)."
We interpreted that when you include a type that does not mean that is the only type allowed. So an open slicing. Grahame (I think) interpreted that in another way: it is the only allowed type (closed slicing). That is why we see a difference in the snapshot.
Let's discuss this with Grahame soon.
Still needs to be discussed with Grahame.
This was discussed extensively at the Baltimore WGM in September 2022 (https://chat.fhir.org/#narrow/stream/179177-conformance/topic/Choice.20Type.20Renaming, TL;DR: read from sept 9, 2022).
It turned out that our behaviour and interpretation was correct, and Grahame had even built in that behaviour, but the IG generator was misconfigured.
No further action necessary on our end, closing this issue.