Stream: implementers
Topic: Validator results
Eric Mays (May 06 2019 at 21:57):
Trying to use the validator. Downloaded the v3.0.1 examples and put them in a examples-json-V3 dir
java -jar org.hl7.fhir.validation.cli-3.8.0-20190211.175101-5.jar examples-json-V3/observation-example-bloodpressure.json -version 3.0.1
works and understand the results.
java -jar org.hl7.fhir.validation.cli-3.8.0-20190211.175101-5.jar examples-json-V3/observation-example-bloodpressure.json -version 3.0.1 -profile http://hl7.org/fhir/StructureDefinition/bp
produces the following
FAILURE validating examples-json-V3/observation-example-bloodpressure.json: error:4 warn:2 info:0
Error @ Observation.component[1] (line 78, col6) : Error in discriminator at Observation.component:diastolicbp.code.coding: slicing found
Error @ Observation.component[1] (line 78, col6) : Error in discriminator at Observation.component:systolicbp.code.coding: slicing found
Error @ Observation.component[2] (line 115, col6) : Error in discriminator at Observation.component:diastolicbp.code.coding: slicing found
Error @ Observation.component[2] (line 115, col6) : Error in discriminator at Observation.component:systolicbp.code.coding: slicing found
Warning @ Observation.code : The display "Bood pressure panel with all children optional" is not a valid display for the code {http://loinc.org}85354-9 - should be one of ["Blood pressure panel with all children optional","BP pnl w all optional"]
Warning @ Observation.code.coding (line 41, col8) : The display "Bood pressure panel with all children optional" is not a valid display for the code {http://loinc.org}85354-9 - should be one of ["Blood pressure panel with all children optional","BP pnl w all optional"]
The bp example instance looks OK. But wondering is the example instance incorrect, is it the profile...
I get similar results from the HAPI FHIR test server web page, modifying the json to specify bp profile rather than vitalsigns
The Aegis server, accessing via curl, seems to think the example is OK for the bp profile
Thanks for your help. -Eric
Oliver Egger (May 07 2019 at 06:41):
Hi @Eric Mays , i just documented this validator issue yesterday in GF#21472. The first of your examples works because the bp profile is not explicitly mentioned, the second the validator stumbles over the http://hl7.org/fhir/StructureDefinition/bp profile. I added a pull request for the different testcases here against the validator , which illustrates the problem, but not yet a solution for the validator (except rewrite the bp profile in a way that the validator understands it).
Eric Mays (May 07 2019 at 13:09):
Thank you @Oliver Egger . I'm just trying to get a set of unit tests together for an implementation of IValidationSupport to validate against a custom profile that uses SNOMED extension concepts.
Having issue with heart rate as well both on vitalsigns profile and heartrate profile:
FHIR Validation tool Version 3.8.0-SNAPSHOT - Built 2019-02-11T12:49:16.829-05:00 - Git 7a8671008476
Arguments: examples-json-V3/observation-example-heart-rate.json -version 3.0.1
.. connect to tx server @ http://tx.fhir.org
.. definitions from hl7.fhir.core#3.0.1
(v3.0.1)
.. validate [examples-json-V3/observation-example-heart-rate.json]
Terminology server: Check for supported code systems for http://loinc.org
FAILURE validating examples-json-V3/observation-example-heart-rate.json: error:1 warn:0 info:0
Error @ Observation (line 1, col2) : If there is no component or related element then either a value[x] or a data absent reason must be present [(component.empty() and related.empty()) implies (dataAbsentReason or value)]
Eric Mays (May 07 2019 at 13:37):
Unpacked org.hl7.fhir.validation.cli-3.8.0-20190211.175101-5.jar
Main is org.hl7.fhir.r4.validation.Validator
Not seeing this class in the 3.7.0 jar that is the release or in github https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation
Couple other classes in that package e.g. ValidationEngine
Is that source available?
Oliver Egger (May 07 2019 at 15:44):
for the validator as you are using in above example the source is here: https://github.com/hapifhir/org.hl7.fhir.core e.g. https://github.com/hapifhir/org.hl7.fhir.core/tree/master/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation
Last updated: Apr 12 2022 at 19:14 UTC