Stream: implementers
Topic: Validator extension slicing error
Noemi Deppenwiese (Aug 13 2019 at 13:14):
When using the official Validator to validate some custom profiles with fitting example resources, I get the following error:
Could not match discriminator ([url]) for slice Organization.extension:dataCategory in profile https://fhir.bbmri.de/StructureDefinition/Collection - the discriminator [url] does not have fixed value, binding or existence assertions
I created both profiles and extensions with Forge. I had a similar error with another slicing discriminator (Organization.contact.purpose) and was able to fix it by specifying a fixedCodeableConcept in the profile. How can I fix this error for extensions?
(The profiles & examples are here: https://github.com/samply/bbmri-fhir-ig/tree/feature/organizationExamples)
Thanks!
Rob Hausam (Aug 13 2019 at 13:26):
@Noemi Deppenwiese I believe this is the same issue that @Michel Rutten answered here.
Michel Rutten (Aug 13 2019 at 13:27):
Hi @Noemi Deppenwiese, there is a know issue in Forge R4 where extension definitions are serialized without the (required) Extension.url
element. This might explain why the validator complains. This issue will be fixed in the next Forge release. As a workaround, you could manually edit your extension definitions and add the missing constraints, for example:
<element id="Extension.url"> <path value="Extension.url"/> <fixedUri value="<CANONICAL_URL>"/> </element>
Per definition, the Extension.url
element has a fixed value that is equal to the canonical url (StructureDefinition.url
).
Noemi Deppenwiese (Aug 13 2019 at 13:27):
Didn't see that Topic... Thank You!
Last updated: Apr 12 2022 at 19:14 UTC