Validation of QuestionnaireResponse based on Questionnaire #1905
-
Hi 👋 Disclaimer: I'm pretty new to FHIR so please bear with me. I am wondering how you would approach validating a new ItemComponent
{
LinkId = "myLinkId",
Required = true,
Repeats = false,
Type = QuestionnaireItemType.Choice,
AnswerOption = new List<AnswerOptionComponent>
{
new AnswerOptionComponent
{
Value = new FhirString("Yes")
},
new AnswerOptionComponent
{
Value = new FhirString("No")
},
new AnswerOptionComponent
{
Value = new FhirString("Do not know")
}
}
} How would you go about validating a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mmalvik, Welcome to the world of Fhir! I think you mean here the semantic validation of a 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 We can add this feature to our roadmap. |
Beta Was this translation helpful? Give feedback.
Hi @mmalvik,
Welcome to the world of Fhir!
I think you mean here the semantic validation of a
QuestionnaireResponse
toQuestionnaire
. So the following would be not valid: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 correspondingQuestionnaire
.W…