-
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
API for validation in the sdc lib #374
Comments
A few workflows can be supported here:
For multi-step forms, I don't think 1 will be a good UX. 3 might result in multiple calls to validate but the user gets immediate feedback. 2 and 4 are kind of middle grounds with different granularity. |
The status is a property with the cardinality of 1..1 in the FHIR Spec. Since the SDC creates the Questionnaire Response, we will need to either
|
@vincent-karuri, I believe @kunjan8794's change #164 is doing a mixture of 2 and 3. And 2 and 3 are probably what we should continue to do no matter what. I can also imagine adding some kind of configuration for the questionnaire fragment for this behavior (turn it on or off). About 1: upon submission, this depends on how submission is done. At the moment the developer can read the questionnaire any time from the fragment, and the submission button is outside of the questionnaire fragment (this might change i guess). So if we provide a validation API ( About 4, I think this depends on the implementation of #186. The first question is do we want the paging to be handled within the questionnaire fragment or should it be outside (similar to how the submission button is outside the fragment for now). There might be a case for an API that validates the answers for all questions and display error message accordingly. @joiskash I vote for 1 for now. I think a wider discussion needs to happen before we go for 2. And certainly would help to get opinions from people active on the questionnaire chat channel in fhir chat. |
@jingtang10 I think pagination can be a core feature. It's implicitly optional because one can always simply define a single page if they don't desire pagination? Unless you were referring to what happens when a page has errors and the user tries to navigate to a different page. Then, yes, I agree that what happens in that case can be made configurable for the implementing app. |
Hi @vincent-karuri , are there any updates on this issue? Is there any ETA or the pending effort that you can provide? |
@Tarun-Bhardwaj we need to find someone to work on this issue. |
@joiskash, would you like to pick up this high priority issue for Q2 release? I will create a separate thread between you, Jing and myself to discuss the details. |
Sure @Tarun-Bhardwaj i can pick this up as my next task |
@joiskash , updated the estimated completion date as 18th June as per our discussion. |
So is the expectation that the client application that is using the sdk will call a function like |
@jingtang10 , do you have any update for Kashyap on his last comment above? |
Yes, jing did update me on this, just copying the response here for reference
|
according to earlier discussions - there's another part of this which is to allow the UI to reflect the validation result on demand -- this requires a little bit of design. @joiskash can you maybe write down your thoughts here? |
So in the current state, ViewHolders with TextInputEditText uses the function We could probably extract an interface with an API |
let's handle this in a the new ticket. |
Estimated effort: 3 days
Estimated date of completion: 18th June 2021
We want to be able to validate the questionnaire response without necessarily saving the questionnaire response. This can be exposed as a new API in the sdc lib.
this would help opensrp/fhircore#19 (comment):
Validate details as entered by the user for data types and also mandatory/optional fields based on the questionnaire
The text was updated successfully, but these errors were encountered: