FHIR Chat · Reference_REF_CantMatchChoice validation error · hapi

Stream: hapi

Topic: Reference_REF_CantMatchChoice validation error


view this post on Zulip Ingmar Puschnig (Mar 31 2022 at 14:23):

We want to include FHIR validation for our system (which is creating FHIR XML for the german EAU process). For testing I've set up a sample command line program following the HAPI documentation (https://hapifhir.io/hapi-fhir/docs/validation/instance_validator.html, section 12.2.4). Only difference is I'm parsing an XML file to obtain a Bundle. I'm using the HAPI release 5.7.1.

However, I see this validation error (in english it should be: Unable to find a match for profile ... among choices: ...):

ERROR - Es konnte kein passendes Profil für Condition/c5119bf9-5543-44b0-8399-5887fc54f1c2 unter den Auswahlmöglichkeiten [https://fhir.kbv.de/StructureDefinition/KBV_PR_EAU_Condition_ICD|1.0.2] gefunden werden - Bundle.entry[0].resource.ofType(Composition).section[0].entry[0]

Here is the relevant part of the XML that the reference in the error message refers to:

   <entry>
      <fullUrl value="http://192.168.2.155/fhir/Condition/c5119bf9-5543-44b0-8399-5887fc54f1c2"/>
      <resource>
         <Condition xmlns="http://hl7.org/fhir">
            <id value="c5119bf9-5543-44b0-8399-5887fc54f1c2"/>
            <meta>
               <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_EAU_Condition_ICD|1.0.2"/>
            </meta>

I checked that the ValidationSupportChain contains the StructureDefinition in question with the following query:

IBaseResource res = validationSupport.fetchStructureDefinition("https://fhir.kbv.de/StructureDefinition/KBV_PR_EAU_Condition_ICD|1.0.2");

The StructureDefinition is there (I also can find it via other URLs, e.g. without the version, or just by the name KBV_PR_EAU_Condition_ICD).

I don't understand why the above error is created since the structure definition is apparently available. What am I missing here, or rather, how can I fix this problem?

view this post on Zulip Grahame Grieve (Mar 31 2022 at 20:03):

does this work with the standalone validator?

view this post on Zulip Ingmar Puschnig (Apr 01 2022 at 06:51):

The program is a standalone java application, so no, it does not work there. Or did you mean something else by standalone?


Last updated: Apr 12 2022 at 19:14 UTC