FHIR Chat · FHIR validator assumes r4 syntax for STU3 profile · conformance

Stream: conformance

Topic: FHIR validator assumes r4 syntax for STU3 profile


view this post on Zulip Pieter Edelman (Jun 04 2019 at 09:00):

I'm use the latest snapshot of the validator (Version 3.7.43-SNAPSHOT - Built 2019-06-04T14:04:54.0+10:00 - Git 9621a0f7cf06) to validate an STU3 example against a profile with the following ValueSetReference section:

<valueSetReference>
    <reference value="http://..." />
</valueSetReference>

I'm using the option -version 3.0.1 to make sure the validator uses STU3 (the profile also contains <fhirVersion value="3.0.1" />). However, it crashes with the following stack trace:

Exception in thread "main" org.hl7.fhir.exceptions.FHIRFormatError: Unknown Content valueSetReference @  START_TAG seen ...n value="AdemhalingScoreCodelijst" />\r\n        <valueSetReference>... @281:28
        at org.hl7.fhir.r5.formats.XmlParserBase.unknownContent(XmlParserBase.java:300)
        at org.hl7.fhir.r5.formats.XmlParser.parseElementDefinitionElementDefinitionBindingComponent(XmlParser.java:1993)
        at org.hl7.fhir.r5.formats.XmlParser.parseElementDefinitionContent(XmlParser.java:1806)
        at org.hl7.fhir.r5.formats.XmlParser.parseElementDefinition(XmlParser.java:1731)
        at org.hl7.fhir.r5.formats.XmlParser.parseStructureDefinitionStructureDefinitionDifferentialComponentContent(XmlParser.java:20080)
        at org.hl7.fhir.r5.formats.XmlParser.parseStructureDefinitionStructureDefinitionDifferentialComponent(XmlParser.java:20069)
        at org.hl7.fhir.r5.formats.XmlParser.parseStructureDefinitionContent(XmlParser.java:19980)
        at org.hl7.fhir.r5.formats.XmlParser.parseStructureDefinition(XmlParser.java:19917)
        at org.hl7.fhir.r5.formats.XmlParser.parseResource(XmlParser.java:23961)
        at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:126)
        at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:110)
        at org.hl7.fhir.r5.formats.ParserBase.parse(ParserBase.java:79)
        at org.hl7.fhir.r5.validation.ValidationEngine.snapshot(ValidationEngine.java:1026)
        at org.hl7.fhir.r5.validation.Validator.main(Validator.java:417)

I looks like the validator doesn't properly switch to STU3 syntax. If I change the ValueSet reference to the r4 syntax:
<ValueSet value="http://..." />
the validator does accept the input.

view this post on Zulip Grahame Grieve (Jun 04 2019 at 12:46):

What’s the printed output prior to the error message?

view this post on Zulip Pieter Edelman (Jun 04 2019 at 12:54):

Not too much:

$ java -jar ../Downloads/org.hl7.fhir.validator.jar -version 3.0.1 -snapshot Profiles\ -\ ZIB\ 2017/zib-ApgarScore.xml -tx 'n/a'
FHIR Validation tool Version 3.7.43-SNAPSHOT - Built 2019-06-04T14:04:54.0+10:00 - Git 9621a0f7cf06
Arguments: -version 3.0.1 -snapshot "Profiles - ZIB 2017/zib-ApgarScore.xml" -tx n/a
  .. connect to tx server @ null
  .. definitions from hl7.fhir.core#3.0.1
    (v3.0.1)

view this post on Zulip Grahame Grieve (Jun 04 2019 at 13:30):

can you send me your profiles directory so I can test? (can do so privately so it won't be public)

view this post on Zulip Pieter Edelman (Jun 05 2019 at 07:11):

zib-ApgarScore-example.xml zib-ApgarScore.xml

view this post on Zulip Pieter Edelman (Jun 05 2019 at 07:15):

This is the profile and the example (no secrets here). There error occurs in the Observation.component.valueCodeableConcept slices and can be fixed by changing to the r4 syntax. I also tried to make a synthetic example, but I can't reproduce the error there.

view this post on Zulip Grahame Grieve (Jun 10 2019 at 21:22):

so I don't get any issue here with the latest validator? (sorry for taking so long...)

view this post on Zulip Grahame Grieve (Jun 10 2019 at 21:22):

oh no. oops. I need http://fhir.nl/fhir/StructureDefinition/nl-core-observation

view this post on Zulip Sebastiaan Raap (Jun 11 2019 at 10:45):

nl-core-observation.xml

there you go

view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:16):

ok so I put them in my test directory, and then ran this command line:

view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:17):

-version 3.0 -ig C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore.xml -ig C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-core-observation.xml C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore-example.xml

view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:17):

and then I got this output:

view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:17):

```FHIR Validation tool Version 3.8.3-SNAPSHOT - Built 2019-06-11T07:46:57.733+10:00 - Git 9a344b251c77
Arguments: -version 3.0 -ig C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore.xml -ig C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-core-observation.xml C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore-example.xml
.. connect to tx server @ http://tx.fhir.org
.. definitions from hl7.fhir.core#3.0.1
(v3.0.1)
+ .. load IG from C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore.xml
..file: C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore.xml+ .. load IG from C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-core-observation.xml
..file: C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-core-observation.xml .. validate [C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore-example.xml]
Terminology server: Check for supported code systems for http://loinc.org
Success...validating C:\work\org.hl7.fhir\org.hl7.fhir.core\org.hl7.fhir.validation\src\test\resources\validation-examples\zib-ApgarScore-example.xml: error:0 warn:15 info:0
Warning @ Observation.component[1].code.coding (line 28, col21) : The display "AdemhalingsScore" is not a valid display for the code {http://loinc.org}32410-3 - should be one of ["1 minute Apgar Respiratory effort","1M Apgar Resp effort"]
Warning @ Observation.component[1].valueCodeableConcept (line 34, col31) : ValueSet http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.12.16.1--20171231000000 not found
Warning @ Observation.component[1].valueCodeableConcept.coding (line 35, col21) : The display "Flink huilen en goed doorademen" is not a valid display for the code {http://loinc.org}LA6727-7 - should be one of ["Good, strong cry; normal rate and effort of breathing"]
Warning @ Observation.component[2].code.coding (line 46, col21) : The display "Huidskleurscore" is not a valid display for the code {http://loinc.org}32406-1 - should be one of ["1 minute Apgar Color","1M Apgar Color"]
Warning @ Observation.component[2].valueCodeableConcept (line 52, col31) : ValueSet http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.12.16.4--20171231000000 not found
Warning @ Observation.component[2].valueCodeableConcept.coding (line 53, col21) : The display "Roze lijfje, maar blauwachtige armen en benen" is not a valid display for the code {http://loinc.org}LA6723-6 - should be one of ["Good color in body with bluish hands or feet"]
Warning @ Observation.component[3].code.coding (line 64, col21) : The display "HartslagScore" is not a valid display for the code {http://loinc.org}32407-9 - should be one of ["1 minute Apgar Heart rate","1M Apgar Heart rate"]
Warning @ Observation.component[3].valueCodeableConcept (line 70, col31) : ValueSet http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.12.16.2--20171231000000 not found
Warning @ Observation.component[3].valueCodeableConcept.coding (line 71, col21) : The display "Een hartslag van minder dan 100 slagen per minuut" is not a valid display for the code {http://loinc.org}LA6717-8 - should be one of ["Fewer than 100 beats per minute"]
Warning @ Observation.component[4].code.coding (line 82, col21) : The display "ReflexenScore" is not a valid display for the code {http://loinc.org}32409-5 - should be one of ["1 minute Apgar Reflex irritability","1M Apgar Reflex irritability"]
Warning @ Observation.component[4].valueCodeableConcept (line 88, col31) : ValueSet http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.12.16.5--20171231000000 not found
Warning @ Observation.component[4].valueCodeableConcept.coding (line 89, col21) : The display "Reageert door te huilen, te hoesten of te niezen" is not a valid display for the code {http://loinc.org}LA6721-0 - should be one of ["Grimace and pulling away, cough, or sneeze during suctioning"]
Warning @ Observation.component[5].code.coding (line 100, col21) : The display "SpierspanningScore" is not a valid display for the code {http://loinc.org}32408-7 - should be one of ["1 minute Apgar Muscle tone","1M Apgar Muscle tone"]
Warning @ Observation.component[5].valueCodeableConcept (line 106, col31) : ValueSet http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.12.16.3--20171231000000 not found
Warning @ Observation.component[5].valueCodeableConcept.coding (line 107, col21) : The display "Beweegt armpjes en beentjes goed" is not a valid display for the code {http://loinc.org}LA6715-2 - should be one of ["Active motion"]


view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:18):

is that different from what you would expect?

view this post on Zulip Grahame Grieve (Jun 11 2019 at 11:19):

btw.... that does make me think that we need to invest some in NL loinc support. Is it part of the standard LOINC distribution? (@Alexander Henket)

view this post on Zulip Alexander Henket (Jun 11 2019 at 11:25):

LOINC calls them "linguistic variants" [sic] but yes, you can find that in the LOINC downloads

view this post on Zulip Alexander Henket (Jun 11 2019 at 11:28):

We discussed the notion of a warning for display mismatches with @Richard Ettema for Touchstone and lowered that to INFO level. The idea that a ValueSet will ever be complete in its listing of valid display names seems false ioho. We run a LOINC and SNOMED CT NRC that produces new translations all the time. Any ValueSet is always behind on the number of allowable displays.

view this post on Zulip Pieter Edelman (Jun 11 2019 at 11:29):

is that different from what you would expect?

No, this is what I would expect. I just tried it out with the latest snapshot and got the same result, so it seems the error has been fixed in the meantime. Thanks!

view this post on Zulip Grahame Grieve (Jun 11 2019 at 14:51):

ok thanks


Last updated: Apr 12 2022 at 19:14 UTC