firely-net-sdk icon indicating copy to clipboard operation
firely-net-sdk copied to clipboard

Support type slices without slicing elements

Open ewoutkramer opened this issue 2 years ago • 1 comments

We have discovered there exist differentials that express type slices neither using a choice type rename, nor using explicit slicing:

 {
   "id": "Observation.value[x]",
   "path": "Observation.value[x]",
   "type": [  ( a list of some allowed types ) ],
 },
 {
   "id": "Observation.value[x]:valueQuantity",
   "path": "Observation.value[x]",
   "sliceName": "valueQuantity",
   "type": [ { "code": "Quantity" } ],
 }

Our snapshot generator does not fully handle this case, and it is unclear whether we really should, since this differential is probably invalid. On the other hand, I have now encountered multiple cases where this kind of slicing was used, and the Java snapgen does correct for it.

Should we?

See also:

  • https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Error.20w.2F.20type.20slices.20missing.20discriminator
  • https://chat.fhir.org/#narrow/stream/179177-conformance/topic/Choice.20Type.20Renaming/near/256257320

ewoutkramer avatar Sep 09 '22 11:09 ewoutkramer

This PR has been pulled, I think we can close this issue?

ewoutkramer avatar Oct 03 '22 13:10 ewoutkramer

BTW: This ended up in 4.3.0 - but we forgot to the the administration for this one, it's also not mentioned in the release notes.

ewoutkramer avatar Nov 04 '22 13:11 ewoutkramer