-
Notifications
You must be signed in to change notification settings - Fork 249
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
Prefill the questionnaire with an optional questionnaire response as an argument to the questionnaire fragment #189
Comments
This allows us to assume that the QuestionnaireResponse structure will be corresponding to the Questionnaire from which it is derived. If there is a mismatch in the hierarchy the SDK will throw an error since in the context of SDC, the QuestionnaireResponse will always have a corresponding Questionnaire |
@jingtang10 so the plan is to
Let me know if this is fine, I will start coding after your comments |
thanks @joiskash. so in step 4 you will use the validate method if a questionnnaire response is provided right? So basically, if there is a questionnaire respoonse provided, validate it, if not, create a new one mirroring the structure (existing code). |
Yes that's right |
@jingtang10 If the structure of the questionnaire response provided does not match the questionnaire then should the library throw an error? or just warn the user? |
I would rather for the library to throw an illegal argument exception than to swallow that issue. |
While validating is it fair to say that the order of the occurrence of item in the questionnaire will be the same in the questionnaire response? |
I don't think this is acceptable. The order should be maintained too in the
questionnaire response structure.
…On Wed, 17 Feb 2021 at 12:45, Kashyap Jois ***@***.***> wrote:
While validating is it fair to say that the order of the occurrence of
item in the questionnaire will be the same in the questionnaire response?
eg if in the json string of the questionnaire linkid 1 is followed by 2
and in the json string of the questionnaire response linkid 2 is followed
by 1. Should this throw an error or is this acceptable?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3M2XDS6PLLGGP3ZBV32RTS7O27ZANCNFSM4WV2XRAQ>
.
|
@joiskash can this be closed or is there something else you're still working on? |
This can be closed thanks :) |
thanks and well done for resolving this issue. |
This can be used to pre-fill the questionnaire while generating the UI.
The text was updated successfully, but these errors were encountered: