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

Follow up code health fixes of PR 1442 #1631

Merged
merged 17 commits into from
Nov 1, 2022

Conversation

aurangzaibumer
Copy link
Collaborator

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #1040

Description
The min/max validators are updated to use fhir path expressions. For date picker specifically, the widget doesn't allow input outside of the date range, this is a widget specific behavior. User can specify minimum and maximum date range using minValue and maxValue expression in questionnaire in order to prevent selecting the dates from outside the specified range. cqf-calculatedvalue expression is used to make the expression dynamic and use for some purpose as Age case (for example we can only registered a child that is born after 2020) (min value case).

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: Feature

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@jingtang10
Copy link
Collaborator

if this is ready for reveiw can you please mark this as such?

thanks - also, probably best for @omarismail94 to review since he reviewred the original pr.

@aurangzaibumer aurangzaibumer changed the title PR 1442 feedback Restricting DatePicker to select date from outside the defined Range (Min/Max). Added support for fhir path expression in Min / Max Validators (PR feedback) Sep 28, 2022
Copy link
Collaborator

@maimoonak maimoonak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz make test names a little more descriptive ... should like should return invalid value... why it should return invalid value?

@aurangzaibumer
Copy link
Collaborator Author

Comments are resolved. Please review.

@aurangzaibumer
Copy link
Collaborator Author

Review completed by @maimoonak . Assigned to @omarismail94 as per review process. thanks
cc @f-odhiambo

@aurangzaibumer aurangzaibumer marked this pull request as ready for review October 3, 2022 10:13
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jingtang10 jingtang10 changed the title Restricting DatePicker to select date from outside the defined Range (Min/Max). Added support for fhir path expression in Min / Max Validators (PR feedback) Follow up code health fixes of PR 1442 Nov 1, 2022
@jingtang10 jingtang10 enabled auto-merge (squash) November 1, 2022 14:17
@jingtang10 jingtang10 assigned jingtang10 and unassigned omarismail94 Nov 1, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #1631 (1fa7823) into master (cabc12a) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #1631      +/-   ##
============================================
- Coverage     32.73%   32.70%   -0.04%     
  Complexity      322      322              
============================================
  Files           151      151              
  Lines          5349     5348       -1     
  Branches        955      955              
============================================
- Hits           1751     1749       -2     
- Misses         3343     3344       +1     
  Partials        255      255              
Impacted Files Coverage Δ
...d/fhir/datacapture/fhirpath/ExpressionEvaluator.kt 0.00% <0.00%> (ø)
...acapture/validation/MaxValueConstraintValidator.kt 75.00% <ø> (ø)
...roid/fhir/datacapture/validation/ValidationUtil.kt 14.28% <0.00%> (-19.05%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jingtang10 jingtang10 merged commit 433aad9 into google:master Nov 1, 2022
ktarasenko pushed a commit to ktarasenko/android-fhir that referenced this pull request Nov 7, 2022
* WIP PR feedback

* spotless ran

* added test cases for validation util

* used fhirpathengine instance from fhir path expression evaluator

* updated test cases name and convention

* updated test cases name and their convention to look consistent

Co-authored-by: Jing Tang <jingtang@google.com>
ktarasenko pushed a commit to ktarasenko/android-fhir that referenced this pull request Nov 14, 2022
* WIP PR feedback

* spotless ran

* added test cases for validation util

* used fhirpathengine instance from fhir path expression evaluator

* updated test cases name and convention

* updated test cases name and their convention to look consistent

Co-authored-by: Jing Tang <jingtang@google.com>
ktarasenko added a commit that referenced this pull request Nov 23, 2022
* Add Implementation guide management library module

* Crashed Fixed in Quantity Input Widget (#1673)

* Crashed Fixed in Quantity Input Widget

* reverted unwanted changes

* Spotless check applied

* remove clear answer from factory

Co-authored-by: omarismail <omarismail@google.com>

* Fix review comments

* Updated code to set the radio button in a radio group using radio groups check api instead of radio button apis (#1691)

* Bump up SDC version to beta06 (#1694)

* Follow up code health fixes of PR 1442 (#1631)

* WIP PR feedback

* spotless ran

* added test cases for validation util

* used fhirpathengine instance from fhir path expression evaluator

* updated test cases name and convention

* updated test cases name and their convention to look consistent

Co-authored-by: Jing Tang <jingtang@google.com>

* Disable leniency in DateFormat lib when converting date (#1687)

* Fix Issue #1638: disable lenient check

* add espresso test

* add more tests per date field changed

* Regenerate docs after SDC version bump (#1696)

* Documentation Update : Changed the folder structure and did some other minor add-ons (#1662)

* Create CODE_OF_CONDUCT.md

* Delete CODE_OF_CONDUCT.md

* Create Contributing.md

* Delete contributing.md

* Update README.md

* Update README.md

Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>

* Catlog app- Info grey box added in Calculated expression screen Behavior (#1679)

* Scroll down the recyclerview to show the Add answer button. (#1666)

* Scroll down the recyclerview to show the Add answer button.

* Address review comments.

* Address review comments.

* Add flaky flag to retry

* update gcloud components as well

* remove version flag

Co-authored-by: Santosh Pingle <spingle@google.com>
Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>
Co-authored-by: omarismail <omarismail@google.com>

* Enable "Next button" on paginated view when nested answer is chosen (#1684)

Fix Issue  #1677

* Add trailing line break.

* Update buildSrc/src/main/kotlin/Releases.kt

Co-authored-by: Jing Tang <jingtang@google.com>

Co-authored-by: PallaviGanorkar <ganorkar@google.com>
Co-authored-by: omarismail <omarismail@google.com>
Co-authored-by: aditya-07 <adityakhajuria@google.com>
Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>
Co-authored-by: aurangzaibumer <35099184+aurangzaibumer@users.noreply.github.com>
Co-authored-by: Jing Tang <jingtang@google.com>
Co-authored-by: Vanshaj Poonia <74147463+VanshajPoonia@users.noreply.github.com>
Co-authored-by: santosh-pingle <86107848+santosh-pingle@users.noreply.github.com>
Co-authored-by: Santosh Pingle <spingle@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Add ability to validate the min/max for Date on a FHIR Questionnaire
4 participants