google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
465 stars 246 forks source link

Refactor the UI validation code in the SDC library #577

Open jingtang10 opened 3 years ago

jingtang10 commented 3 years ago

Is your feature request related to a problem? Please describe. Two issues:

  1. The UI validation is done by widgets in fairly arbritrary manner. This is bad because there might be divergence in the behaviour of different widgets.
  2. There is currently no way for the application to say - please validate all the answers in the questionnaire and display error messages according before questionnaire submission. We might need a new API for this.

Describe the solution you'd like Discussed in https://github.com/google/android-fhir/issues/374.

Describe alternatives you've considered NA

Additional context Originally posted by @joiskash in https://github.com/google/android-fhir/issues/374#issuecomment-866593973

Would you like to work on the issue? NA

kevinmost commented 3 years ago

We should consider pagination (#186) here, too.

As captured in this TODO, we should have an option to validate individual pages when the user clicks next/previous.

However, this shouldn't be required. Eg, if the form is being filled out as a draft, filling out all fields may not be required (or possible). However, when filling out the form in a context in which it will be submitted, the app developer may want to have page 1 validated before moving on to page 2, rather than having pages 1 and 2 validated at submission time.

joiskash commented 2 years ago

@aditya-07 have you started working on this? If not I can take it up. Its a high priority item for us.

cc: @jingtang10

jingtang10 commented 2 years ago

please feel free to go ahead @joiskash and thanks for taking this on

joiskash commented 2 years ago

I am currently occupied with development work related to using the FHIR android SDK. Sorry, I do not have any bandwidth to work on this for the time being.

cc: @jingtang10 @Tarun-Bhardwaj