Stream: conformance
Topic: Java validator and Simplifier disagree on slice validity
Morten Ernebjerg (Dec 13 2018 at 12:06):
I am getting a validation error with the latest Java JAR Validator when trying to validate a resource against the following STU3 Observation profile: http://fhir.de/StructureDefinition/observation-de-blutdruck/0.2. The online Simplifier validator (https://simplifier.net/validate), however, says that the very same resource is valid. Is there a known problem with such cases in either validator?
Here is the error I am getting from the JAR (it is a blood pressure profile in which both Observation.component
and Observation.component.code.coding
are sliced):
java -jar validator/org.hl7.fhir.validator.jar -version 3.0.1 -ig profiles/ examples/ (...) *FAILURE* validating examples/bp-base-example.xml: error:4 warn:0 info:0 Error @ Observation.component[1] (line 20, col16) : Error in discriminator at Observation.component:diastolisch.code.coding: slicing found Error @ Observation.component[1] (line 20, col16) : Error in discriminator at Observation.component:systolisch.code.coding: slicing found Error @ Observation.component[2] (line 34, col16) : Error in discriminator at Observation.component:diastolisch.code.coding: slicing found Error @ Observation.component[2] (line 34, col16) : Error in discriminator at Observation.component:systolisch.code.coding: slicing found
and here is the example:
<Observation xmlns="http://hl7.org/fhir"> <meta> <profile value ="http://fhir.de/StructureDefinition/observation-de-blutdruck/0.2"/> </meta> <status value="final"/> <code> <coding> <system value="http://loinc.org"/> <code value="85354-9"/> </coding> </code> <subject> <reference value="Patient/patient-example"/> </subject> <effectiveDateTime value="2016-03-21T18:01:10Z"/> <performer> <reference value="Practitioner/practitioner-example"/> </performer> <component> <code> <coding> <system value="http://loinc.org"/> <code value="8462-4"/> </coding> </code> <valueQuantity> <value value="58"/> <unit value="mmHg"/> <system value="http://unitsofmeasure.org"/> <code value="mm[Hg]"/> </valueQuantity> </component> <component> <code> <coding> <system value="http://loinc.org"/> <code value="8480-6"/> </coding> </code> <valueQuantity> <value value="111"/> <unit value="mmHg"/> <system value="http://unitsofmeasure.org"/> <code value="mm[Hg]"/> </valueQuantity> </component> </Observation>
Patrick Werner (Dec 13 2018 at 13:53):
Hi Morten, this is coming from the STU3 FHIR spec: sdf-20: On StructureDefinition.differential: No slicing on the root element (expression on StructureDefinition.differential: element.first().slicing.empty())
Patrick Werner (Dec 13 2018 at 13:54):
In R4 this is fixed. Will there be a fix for STU3? @Grahame Grieve
I had multiple reports from users in Germany struggling while validating STU3 resources because of sdf-20. The .net validator already fixed sdf-20
Grahame Grieve (Dec 13 2018 at 20:14):
we will be considering releasing a set of technical corrections for R3 once R4 is published
Morten Ernebjerg (Dec 14 2018 at 11:18):
A correction would be much appreciated, e.g. we would also like to run automatic validation of StructureDefinitions
in our CI-pipeline but cannot due to sdf-20.
Morten Ernebjerg (Dec 17 2018 at 09:19):
Suggested (per mail) the inclusion of the corresponding GForge item (#13768) in the list of upcoming technical corrections to STU3, as per this announcement.
Richard Townley-O'Neill (Apr 23 2019 at 00:28):
Link to announcement is now https://chat.fhir.org/#narrow/stream/179240-Announcements/topic/R3.20Technical.20Corrections
Last updated: Apr 12 2022 at 19:14 UTC