Stream: implementers
Topic: Validation fails for Observation without component
Alexandre Santos (Apr 13 2018 at 17:06):
I implemented the validators according to the examples on HAPI FHIR and all Observation resources examples fail the validation if there is no component. I'm using the "Resource Validation Module: Schema/Schematron".
Is this a bug in the XSD provided?
Lloyd McKenzie (Apr 13 2018 at 17:15):
@James Agnew
Alexandre Santos (Apr 13 2018 at 17:16):
BTW, this is the output:
<OperationOutcome >
<issue>
<severity value="error"></severity>
<code value="processing"></code>
<diagnostics value="[error] Observation @ /:Observation[namespace-uri()='http://hl7.org/fhir'][1]; Test=not(exists(f:[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0); Message=obs-7: If code is the same as a component code then the value element associated with the code SHALL NOT be present"></diagnostics>
<location value="Observation @ /*:Observation[namespace-uri()='http://hl7.org/fhir'][1]"></location>
</issue>
</OperationOutcome>
Grahame Grieve (Apr 13 2018 at 23:32):
what version of FHIR, and what version of HAPI?
Alexandre Santos (Apr 16 2018 at 08:59):
what version of FHIR, and what version of HAPI?
DSTU3 and this happens with HAPI 3.3.0. If this message is used as a document in the HAPI Test Server (http://fhirtest.uhn.ca/validate) and we try to create a new resource, we don't see this error (the team that produces the specs for our FHIR messages uses that). But if we try to use the Validators then we see that error about the component.
Here is the permanent link from gazelle where you can see it: https://gazelle.ihe.net/EVSClient/detailedResult.seam?type=FHIR&oid=1.3.6.1.4.1.12559.11.1.2.1.4.849544
Last updated: Apr 12 2022 at 19:14 UTC