FHIR Chat · Validating QuestionnaireResponse · implementers

Stream: implementers

Topic: Validating QuestionnaireResponse


view this post on Zulip Marc de Graauw (Aug 23 2016 at 14:38):

The spec says: "QuestionnaireResponse resources can be validated against their corresponding Questionnaire". Is there software which does this (if there is, I can't find it), or does this just mean this validation is possible in principle?

view this post on Zulip Pascal Pfiffner (Aug 23 2016 at 18:24):

I think HAPI does that.

view this post on Zulip Lloyd McKenzie (Aug 23 2016 at 18:49):

The validator jar used by the build process does this as well.

view this post on Zulip Marc de Graauw (Aug 23 2016 at 19:04):

Thanks, I'll check those out

view this post on Zulip Grahame Grieve (Aug 23 2016 at 19:59):

HAPI uses the validator internally

view this post on Zulip Brian Postlethwaite (Aug 23 2016 at 22:24):

My internal server does (DSTU2), not sure if its been deployed yet, but will be soon.
(Then I need to update my baltimore version too)

view this post on Zulip Brian Postlethwaite (Aug 23 2016 at 22:25):

Does the java validator also check all the extensions too (like min/max values)?

view this post on Zulip Grahame Grieve (Aug 23 2016 at 22:33):

yes

view this post on Zulip Grahame Grieve (Aug 23 2016 at 22:34):

in principle, it checks everything, so advanced stuff is a work in progress (slicing)

view this post on Zulip Brian Postlethwaite (Aug 23 2016 at 22:35):

I'll do some cross checking then against my questionnaire validator then once i've finished all my unit testing and examples.

view this post on Zulip Brian Postlethwaite (Aug 23 2016 at 22:37):

Speaking of which, I'm considering allocating a special tag to my server which indicates that it should ignore validation errors with specific operationoutcome.issue.detail.code values and let them be stored.
This will then permit my server to store invalid content for testing, and also unit tests to not require an external place to look.

view this post on Zulip Marc de Graauw (Aug 25 2016 at 10:15):

Took a while, but yes, HAPI does validate QR against Questionnaire. However, only when actually creating the QR, the 'validate' operation does not complain when the QR does not match the Q. I can't make the java validator to reject a QR, it always says (DSTU2): INFORMATION @ /f:QuestionnaireResponse/f:group/f:question/f:answer/f:valueString (line 21, col36) Binding has no source, so can't be checked (src = InstanceValidator), even for the same instance which HAPI rejects when creating it. So validation for QR against Q apparently only works as part of a CREATE.


Last updated: Apr 12 2022 at 19:14 UTC