FHIR Chat · Validator not recognizing US Core code system · tooling

Stream: tooling

Topic: Validator not recognizing US Core code system


view this post on Zulip Morten Ernebjerg (May 04 2021 at 07:49):

In the US Core Condition profile, the element category has a binding on a value set that includes codes from the system http://hl7.org/fhir/us/core/CodeSystem/condition-category. It resolves fine as a URL, but when using a code from this system in an example (see e.g. this example from the US Core IG), the validator throws the following error:

Error @ Condition.category[0].coding[0] (line 30, col21) : Unknown Code System 'http://hl7.org/fhir/us/core/CodeSystem/condition-category'

Apparently, the validator expects to know this (HL7 domain), but doesn't. I seem to remember similar issue have been discussed previously, (didn't find the right thread, though) - is a fix in the making (in the IG or validator) or is there some way to side-step this problem?

view this post on Zulip Grahame Grieve (May 05 2021 at 03:27):

how did you run this? Show the full validator output please

view this post on Zulip Grahame Grieve (May 05 2021 at 03:30):

(it's not a problem for me)

view this post on Zulip Morten Ernebjerg (May 05 2021 at 06:52):

I run the following command with the latest validator (test.json contains the example from US Core I linked above )

java -jar validator/validator_cli.jar -version 4.0.1 test.json

I find that I always get an error, but that the nature of the error depends on whether I remove the meta.profile element pointing to the US Core profile. The "Unknown Code System" error occurs when no profile is declared.

Error message when meta.profile declares profile --> No code provided error

Error message when meta.profile is removed --> Unknown Code System error

If I explicitly load the US Core IG using -ig hl7.fhir.us.core#3.2.0, I still get an error when the profile is declared ("No code provided, and a code is required from the value set"). If I remove meta.profile, I only get a warning ("None of the codings provided are in the value set").

view this post on Zulip Grahame Grieve (May 06 2021 at 06:02):

No code provided, and a code is required from the value set

is a warning, as it should be. The other: I missed implicitly loading the US Core package when a code system is found (as opposed to a profile). This will be fixed in the next release

view this post on Zulip Morten Ernebjerg (May 06 2021 at 06:36):

Thanks, @Grahame Grieve!


Last updated: Apr 12 2022 at 19:14 UTC