Skip to content

Validation of QuestionnaireResponse based on Questionnaire #1905

Answered by marcovisserFurore
mmalvik asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mmalvik,

Welcome to the world of Fhir!

I think you mean here the semantic validation of a QuestionnaireResponse to Questionnaire. So the following would be not valid:

    var item = new QuestionnaireResponse.ItemComponent();
    item.LinkId = "myLinkId";
    item.Answer.Add(new QuestionnaireResponse.AnswerComponent() { Value = new FhirBoolean(true) });

because the type of the answer should be a string and not a boolean.

Unfortunately, our SDK is not able to validate this. The Validator, that comes with the SDK, validates Fhir resources only on their structure, cardinality of all properties, invariants, etc. Not whether a QuestionnaireResponse fits with the corresponding Questionnaire.

W…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mmalvik
Comment options

Answer selected by mmalvik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants