Skip to content
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

Support max length and min length #185

Closed
jingtang10 opened this issue Jan 26, 2021 · 12 comments · Fixed by #526
Closed

Support max length and min length #185

jingtang10 opened this issue Jan 26, 2021 · 12 comments · Fixed by #526
Assignees
Labels
good first issue Good for newcomers P1 High priority issue type:enhancement New feature or request
Milestone

Comments

@jingtang10
Copy link
Collaborator

jingtang10 commented Jan 26, 2021

In our views for different question types, we need to validate the lengths of the answers by respecting the min and max length constraints.

The max length constraint is part of the Questionnaire resource in FHIR: https://www.hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.maxLength
The min length constarint is part of the structured data capture implementation guide (SDC IG): http://hl7.org/fhir/uv/sdc/2019May/behavior.html#value-constraints Notice the difference: it's an extension, not part of the core resource.

@kunjan8794 already created a validation framework: https://github.com/google/android-fhir/tree/master/datacapture/src/main/java/com/google/android/fhir/datacapture/validation

We will need to create possibly 2 more validators, which will be triggered if the max length field is set or the min length extension exists.

The result of the validation will then be displayed in the UI in the appropriate places in different types of input.

To begin with, we can probably focus on EditText types of controls.

@jingtang10 jingtang10 added the type:enhancement New feature or request label Jan 26, 2021
@jingtang10 jingtang10 added this to Needs triage in Data capture library via automation Jan 26, 2021
@jingtang10 jingtang10 added the good first issue Good for newcomers label Jan 26, 2021
@jingtang10 jingtang10 moved this from To do to In progress in Data capture library Jan 26, 2021
@Manikant25
Copy link
Contributor

Can I work on the issue?

@pankajkatoch
Copy link
Contributor

Can I work on the issue?

Hi Manikant,
If you have a context and background of this project, and have some knowledge of FHIR, then sure go ahead.
Otherwise I had planned to handle it next week.

Thanks.

@s-ayush2903
Copy link
Contributor

@Manikant25 We already have a PR for this, see #224

@Manikant25
Copy link
Contributor

Can I work on the issue?

Hi Manikant,
If you have a context and background of this project, and have some knowledge of FHIR, then sure go ahead.
Otherwise I had planned to handle it next week.

Thanks.

No, I don't know much about the project if you are doing keep doing.
Thanks

@Manikant25
Copy link
Contributor

@Manikant25 We already have a PR for this, see #224

@s-ayush2903 Thanks for informing me.

@jingtang10
Copy link
Collaborator Author

#224 is about min and max value rather than min and max length.

@pankajkatoch do you have an estimated date for this one?

thanks all!

@jingtang10 jingtang10 moved this from In progress to To do in Data capture library Mar 19, 2021
@sakets3010
Copy link

sakets3010 commented Mar 22, 2021

@jingtang10 i would like to work upon this issue, if its still available.
material text views have a functionality to add max and min limit for fields, do let me know if you had some other implementation in mind.

@kunjan8794
Copy link
Collaborator

@jingtang10 Should I take this up next?

@fredhersch fredhersch added the P1 High priority issue label May 11, 2021
@jingtang10
Copy link
Collaborator Author

@jingtang10 i would like to work upon this issue, if its still available.
material text views have a functionality to add max and min limit for fields, do let me know if you had some other implementation in mind.

Note this item is about the max length of the string field - it's not about the max min value.

@jingtang10
Copy link
Collaborator Author

@sakets3010 will you be able to work on this? @kunjan8794 might be able to help since he implemented the validator framework.

@sakets3010
Copy link

@sakets3010 will you be able to work on this? @kunjan8794 might be able to help since he implemented the validator framework.

Hi @jingtang10 , I wont be able to work on this immediately. Pleases feel free to reassign. Apologies.

@sakets3010 sakets3010 removed their assignment May 12, 2021
@kunjan8794
Copy link
Collaborator

@jingtang10 In that case, should I take this up next?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers P1 High priority issue type:enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

9 participants