FHIR Chat · False JAR validator errors for certain questionnaire answers · tooling

Stream: tooling

Topic: False JAR validator errors for certain questionnaire answers


view this post on Zulip Morten Ernebjerg (Feb 15 2021 at 11:26):

I have been seeing incorrect errors when validating QuestionnaireResponses against Questionnaires, with the validator wrongly claiming that an answer code is not in the appropriate value set. The error message is this:

  Error @ QuestionnaireResponse.item[0].answer[0] (line 10, col68) : The value provided (http://loinc.org::LA32-8) is not in the options value set in the questionnaire

I know this has been discussed in other threads, but so far I have not found smt. that solves my variant of the issue (please correct me on that if I'm wrong :smile: ). Here is a minimal set of resources that reproduces the problem

  1. A Questionnaire with two coded questions, both using the same answer value set - qr.questionnaireresponse.json
  2. The value set (containing two LOINC codes) - yesno.ValueSet.json
  3. And QuestionnaireResponse causing the above error although both codes are from the value set - q.questionnaire.json

To get the error, put 1 & 2 in the same folder, load them in the validator with the -ig parameter pointing to the folder, and validate the Questionnaire response.

Curiously, the error only appears if the two questions are answered with different codes - if I modify the example to use the same code in both answers, it validates OK. However, I know that others have seen the same error for questionnaires containing only a single coded question, at least when using codes from a custom CodeSystem (@Christian Nau FYI).

view this post on Zulip Christian Nau (Feb 15 2021 at 13:06):

I've tested your example files with validation agianst HAPI FHIR & SmileCDR servers:
(using {base-url/QuestionnaireResponse/$validate)

  • HAPI FHIR: got the The value provided (http://loinc.org::LA33-6) is not in the options value set in the questionnaire error no matter if both ansers do have the same code or not.
  • Smile CDR: validation succeeded.

For my use-case, as @Morten Ernebjerg wrote, I have a custom-code-system, custom-value-set with a very simple Questionnaire, with only one coded answer that has a value-set-binding to the custom-code-system. The answer inside QuestionnaireResponse refers to the custom-code- system. There I get the same error mentioned above (for HAPI FHIR and for Smile CDR).

The strange thing is: from time to time the validation succeeds without me changing anything in Questionnaire/CodeSystem/ValueSet.

I also didn't manage to reproduce this in a minimal working example.
I have the feeling that this may be related to updated Questionnaires.

view this post on Zulip Morten Ernebjerg (Feb 18 2021 at 08:17):

@Mark Iantorno Do you have an idea why this might be happening - or should we raise this issue in another forum/channel?

view this post on Zulip Mark Iantorno (Feb 18 2021 at 13:25):

I do not know offhand why this is occuring. I will _try_ to look at this at some point today. However, I'm pretty much booked solid already, and I am off tomorrow...so it may have to wait until next week. In the meantime, could you please open an issue on Github with all the details and assign to me?

view this post on Zulip Morten Ernebjerg (Feb 18 2021 at 13:28):

@Mark Iantorno Sure , thanks! This is not a super-urgent issue for me, BTW.

view this post on Zulip Morten Ernebjerg (Feb 18 2021 at 13:30):

Which github repo?

view this post on Zulip Christian Nau (Feb 18 2021 at 13:35):

I dug a little deeper into this issue. Found out together with @Patrick Werner that this is happening once I updated my code-system and value-set to overwrite existing code values with new ones (fixed casing of experimental systems..) Maybe @Patrick Werner can elaborate on this in more depth.

view this post on Zulip Patrick Werner (Feb 18 2021 at 13:48):

I think the reason behind is that during a CS Update the VS expansion didn't get regenerated.

view this post on Zulip Patrick Werner (Feb 18 2021 at 13:49):

So the expansion contains old and maybe deprecated concept codes.

view this post on Zulip Patrick Werner (Feb 18 2021 at 14:24):

but @Morten Ernebjerg issue is independent of the hapi server.

view this post on Zulip Patrick Werner (Feb 18 2021 at 14:25):

@Morten Ernebjerg issues for the Validator should go into here: https://github.com/hapifhir/org.hl7.fhir.core/issues

view this post on Zulip Morten Ernebjerg (Feb 18 2021 at 14:40):

@Mark Iantorno I put in a GitHub issue (https://github.com/hapifhir/org.hl7.fhir.core/issues/441). Unfortunately, it seems I do not have the right to assign it to you.

view this post on Zulip Patrick Werner (Feb 18 2021 at 14:55):

@Morten Ernebjerg i did the assign, thanks for the issue

view this post on Zulip Grahame Grieve (Feb 24 2021 at 01:45):

ok fixed next release

view this post on Zulip Morten Ernebjerg (Feb 24 2021 at 09:27):

Thanks, @Grahame Grieve! - do you want the example as a PR for the test case GitHub repo?

view this post on Zulip Grahame Grieve (Feb 24 2021 at 20:17):

already added


Last updated: Apr 12 2022 at 19:14 UTC