FHIR Chat · extension profile validation error · committers

Stream: committers

Topic: extension profile validation error


view this post on Zulip Rik Smithies (Aug 12 2020 at 19:38):

I am getting an error profile validation error, on a profile that works with an old version of the validator (4.1.44) but not the latest (5.0.7-SNAPSHOT, but still with the -version 4.0 setting).

It now complains that the extension is not allowed at this point. I have no context element on the extension, so it should be allowed anywhere I thought.

If I add a context element it then says this, but the incorrect location it states seems to be correct (other than the "x:"):

*FAILURE* validating examples\MATest-create-r401(forR5validator).xml:  error:1 warn:3 info:0
  Error @ MedicinalProductAuthorization (line 3, col60) : The extension http://ema.europa.eu/fhir/extension/targetSpecies
is not allowed to be used at this point (allowed = x:MedicinalProductAuthorization;
this element is [[MedicinalProductAuthorization])

view this post on Zulip Grahame Grieve (Aug 13 2020 at 02:38):

how to reproduce this?

view this post on Zulip Vassil Peytchev (Aug 13 2020 at 15:52):

I am getting an error profile validation error, on a profile that works with an old version of the validator (4.1.44) but not the latest (5.0.7-SNAPSHOT, but still with the -version 4.0 setting).

The latest validator is 5.1.1, isn't it?

view this post on Zulip Rik Smithies (Aug 13 2020 at 18:06):

profile is:

<StructureDefinition xmlns="http://hl7.org/fhir">
   <url value="http://hl7.org/fhir/StructureDefinition/MAProfileTest-Create"/>
   <fhirVersion value="4.0.1"/>
   <kind value="resource"/>
   <abstract value="false"/>
   <type value="MedicinalProductAuthorization"/>
   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization"/>
   <derivation value="constraint"/>
   <differential>
      <element id="MedicinalProductAuthorization.extension:targetSpecies">
         <path value="MedicinalProductAuthorization.extension"/>
         <sliceName value="targetSpecies"/>
         <min value="1"/>
         <max value="*"/>
         <type>
            <code value="Extension"/>
            <profile value="http://ema.europa.eu/fhir/extension/targetSpecies"/>
         </type>
      </element>
   </differential>
</StructureDefinition>

extension is:

<StructureDefinition xmlns="http://hl7.org/fhir">
   <id value="EMATargetSpecies"/>
   <url value="http://ema.europa.eu/fhir/extension/targetSpecies"/>
   <name value="EMATargetSpecies"/>
   <status value="draft"/>
   <kind value="complex-type"/>
   <abstract value="false"/>
   <!-- originally this context was not present. but the profile doesnt work with new validator (extention context is not recognised),
        so I have added this to try to force it. It didnt help but the error message is now a little clearer -->
   <context>
      <type value="extension"/>
      <expression value="MarketingAuthorization"/>
   </context>
   <type value="Extension"/>
   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension"/>
   <derivation value="constraint"/>
   <differential>
      <element id="Extension.url">
         <path value="Extension.url"/>
         <fixedUri value="http://ema.europa.eu/fhir/extension/targetSpecies"/>
      </element>
   </differential>
</StructureDefinition>

example that fails is:

<MedicinalProductAuthorization xmlns="http://hl7.org/fhir">
    <extension url="http://ema.europa.eu/fhir/extension/targetSpecies">
        <valueString value="dog"/>
    </extension>
</MedicinalProductAuthorization>

view this post on Zulip Rik Smithies (Aug 13 2020 at 18:10):

@Vassil Peytchev maybe but this is the one at build.fhir.org today and in both the R5 preview 1 and preview 2 releases, so I went for stability. I didn't get if direct from github.

view this post on Zulip Vassil Peytchev (Aug 13 2020 at 19:01):

@Josh Mandel - I am not sure if this is an issue or not, but the CI build seems to not be tracking the updates to the validator

view this post on Zulip Josh Mandel (Aug 13 2020 at 20:00):

That sounds like an issue!

view this post on Zulip Josh Mandel (Aug 13 2020 at 20:00):

Which validator? Can you point me to a built IG with this issue so we can look at the build log and see where/how it (wrongly) fetched the validator?

view this post on Zulip Grahame Grieve (Aug 13 2020 at 20:06):

It's on my todo list today to update the build to the latest validator / core

view this post on Zulip Grahame Grieve (Aug 13 2020 at 20:07):

@Josh Mandel it's the ivy.xml, but updating it has many consequences I have to work through, and I finally have a clean build based on the current release

view this post on Zulip Josh Mandel (Aug 13 2020 at 20:13):

OK, thanks for the clarification!

view this post on Zulip Rik Smithies (Sep 09 2020 at 22:26):

the new validator still shows the same issue I was getting. A profile that works in older validator no longer does. Don't know it is a validator or structure definition issue.

view this post on Zulip Grahame Grieve (Sep 14 2020 at 05:51):

how do I reproduce this?

view this post on Zulip Rik Smithies (Sep 14 2020 at 10:47):

I gave the XML that reproduces it earlier in this thread


Last updated: Apr 12 2022 at 19:14 UTC