FHIR Chat · Code not validated because code system is not present · implementers

Stream: implementers

Topic: Code not validated because code system is not present


view this post on Zulip Andreas (Oct 30 2019 at 14:18):

Hi, I'm trying to do validation of a Condition-resource. I'm using HAPI 4.0.3 with R4 resources.
If I send in the clinicalStatus below as part of a Condition I want the validator to output an error that the code system is not part of the required value set. But instead I get a warning with the following message: "Code http://terminology.hl7.org/CodeSystem/condition-clinical/wrong/asd was not validated because the code system is not present". Is it possible to get the validator to output an error instead?

    <clinicalStatus>
        <coding>
            <system value="http://terminology.hl7.org/CodeSystem/condition-clinical/wrong"></system>
            <code value="asd"></code>
            <display value="Active"></display>
        </coding>
    </clinicalStatus>

If I send in the correct code system but with an invalid code it works as I would expect by outputting an error with the following message: "None of the codes provided are in the value set http://hl7.org/fhir/ValueSet/condition-clinical|4.0.0 (http://hl7.org/fhir/ValueSet/condition-clinical, and a code from this value set is required) (codes = http://terminology.hl7.org/CodeSystem/condition-clinical#asd)"

view this post on Zulip Lloyd McKenzie (Oct 30 2019 at 16:07):

It suggests that your validator isn't connecting to the terminology server for some reason (or that the terminology server it is connecting to doesn't have access to the code system(s) pointed to by the value set).

view this post on Zulip Andreas (Oct 31 2019 at 10:01):

The validator does have access to the coding system referenced in the value set. The problem is that if someone sends in another coding system, the validator does not reject this. Which means that users can send in whatever coding system they want.

view this post on Zulip Grahame Grieve (Oct 31 2019 at 10:03):

can you make it a test case please

view this post on Zulip Andreas (Oct 31 2019 at 10:19):

If I try to validate the following Condition: https://pastebin.com/93GErvcU at https://fhirtest.uhn.ca/ it returns a warning: "Code http://terminology.hl7.org/CodeSystem/condition-clinical/wrong-system/notrealcode was not validated because the code system is not present".
But if I change the system of ClinicalStatus to be "http://terminology.hl7.org/CodeSystem/condition-clinical" (the system in the value set) I get an error that the code is not in the value set.

view this post on Zulip Grahame Grieve (Oct 31 2019 at 11:14):

does it behave the same way with the java command line validator? (not that you can test today, it's current broken)

view this post on Zulip James Agnew (Oct 31 2019 at 11:21):

This looks like an issue with HAPI's TS as opposed to being a validator issue. That message comes from the TS for sure.

Condition.clinicalStatus has a required binding so a non-validatable code should be an error, not an info. I'll turn this into a test case.

view this post on Zulip Andreas (Oct 31 2019 at 12:54):

Using the java command line validator (v 4.0.24-SNAPSHOT), I get an error with the condition in the pastebin:

Error @ Condition.clinicalStatus (line 6, col19) : None of the codes provided are in the value set http://hl7.org/fhir/ValueSet/condition-clinical|4.0.0 (http://hl7.org/fhir/ValueSet/condition-clinical, and a code from this value set is required) (codes = http://terminology.hl7.org/CodeSystem/condition-clinical/wrong-system#notrealquote

So that seems correct.


Last updated: Apr 12 2022 at 19:14 UTC