-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response validity feedback from renderer #622
Comments
Hi Niel, that's definitely a good feature to have and honestly should have been included early. |
Thanks, Sean. |
BTW, Sean, for this feature would it be possible to have the mandatory questions marked by say an asterisk (*)? |
Hi Niel, that's definitely a part of my consideration! I'm trying to think of a best way to present visual cues. No need to raise in a separate item. To extend my thoughts further.... instead of retrieving the "validated" status via getResponse(), I think it will be more robust if it an be exposed via the state event listeners i.e. I might also expose a listener to see what linkIds are failing validation if that is beneficial. Might also help verify if the required check is working properly on all items (it can get a bit complicated when working with repeat groups with further nested items) |
Feel free to refer to #634 (comment) for changes up until now. Any thoughts on the bugs + future tasks? |
Hi Sean, Cheers |
Hi Phil, Thanks for that. That definitely is a good idea to align more with FHIR. Will replace the invalid items array with an array of operationOutcomes. I'll have to track down which business rules/validation errors the UI is currently enforcing and get that in as well i.e regex, minLength, maxLength, etc |
Hi Sean,
Cheers |
Hi Phil,
Cheers |
Hi all, made a few changes over the past week + weekend:
@nielmdrec if you are consuming the invalidItems for validation, you might need to tweak up your implementation for a bit. Will continue to make progress on other feature requests/bugs early this week. |
When we receive the QuestionnaireResponse from the renderer (e.g. via getResponse()), it would be quite helpful to know if the response form is valid in terms of having answers for each of the questions (items) which are required in the Questionnaire.
For example, if our Questionnaire has 5 questions and 4 of those questions have item.required = true,
we would like to know if those 4 required questions (at least) are answered before saving the QuestionnaireResponse to our database.
In theory we could do this by adding our own variable in the Questionnaire and setting it to 'true' ourselves when all required questions are answered. However this would mean each of our Questionnaires needs to support this variable (and it becomes a proprietary feature for our Questionnaires only).
The text was updated successfully, but these errors were encountered: