FHIR Chat · Choice slicing error · IG creation

Stream: IG creation

Topic: Choice slicing error


view this post on Zulip Giorgio Cangioli (Nov 08 2018 at 14:18):

I tried to slice a choice (in particular observation.effective[x]); but this is the error that the IG returns.
Caused by: org.hl7.fhir.exceptions.DefinitionException: Attempt to a slice an element that does not repeat: Observation.effective[x]/Observation.effective[x] from http://hl7.org/fhir/StructureDefinition/Reference in http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-status-uv-ips.

Any suggestion ?

view this post on Zulip Lloyd McKenzie (Nov 08 2018 at 14:32):

Declare the cardinality on the slicing element - that's sometimes helped for some reason

view this post on Zulip Giorgio Cangioli (Nov 08 2018 at 15:27):

Thanks, In this way it seems to work :-)

view this post on Zulip Lloyd McKenzie (Nov 08 2018 at 16:53):

If you like, you can submit a change request for us to chase down why declaring the cardinality matters - and either make it not matter or at least provide a better error message...


Last updated: Apr 12 2022 at 19:14 UTC