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

Add fhirpath supplements #2346

Merged
merged 15 commits into from
Dec 20, 2023
Merged

Conversation

maimoonak
Copy link
Collaborator

@maimoonak maimoonak commented Dec 1, 2023

Fixes ##2163

Description
Support fhirpath supplement %questionnaire, and %qItem literal. This allow to get current questionnaire and item into fhirpath expressions on questionnaire items when doing evaluation. Details for spec defined here https://build.fhir.org/ig/HL7/sdc/expressions.html#fhirpath-supplements .

Type
Choose one: Feature

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).

@maimoonak maimoonak marked this pull request as ready for review December 2, 2023 17:23
@maimoonak maimoonak requested review from santosh-pingle and a team as code owners December 2, 2023 17:23
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.

hi maimoona - thanks for this great work!

@jingtang10
Copy link
Collaborator

i don't hink this pr builds with the latest changes. can you fix please @maimoonak? thanks

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.

Please double-check the code paths going through evaluateExpression and evaluateVariable and see if there's any more unification you can do.

Thanks for this PR! Great job!

@jingtang10 jingtang10 enabled auto-merge (squash) December 15, 2023 12:01
auto-merge was automatically disabled December 15, 2023 13:18

Head branch was pushed to by a user without write access

maimoonak and others added 2 commits December 15, 2023 18:18
@maimoonak
Copy link
Collaborator Author

Please double-check the code paths going through evaluateExpression and evaluateVariable and see if there's any more unification you can do.

Thanks for this PR! Great job!

#2373 The methods are covered by a good amount of test which indeed is important to ensure complex variable evaluation validation. We need to figureout a way to keep unit tests. (VisibleForTesting annotation not working)

@jingtang10 jingtang10 enabled auto-merge (squash) December 20, 2023 09:59
@jingtang10 jingtang10 merged commit 977ecfa into google:master Dec 20, 2023
3 checks passed
@jingtang10 jingtang10 deleted the fhirpath-suppl-quest branch December 20, 2023 11:19
hugomilosz pushed a commit to hugomilosz/android-fhir that referenced this pull request Jan 17, 2024
* Add fhirpath supplements

* Add unit tests

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Resolve feedback and test issues

* Fix compile issue

* Update datacapture/src/test/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluatorTest.kt

Co-authored-by: Jing Tang <[email protected]>

* Rename tests

---------

Co-authored-by: Jing Tang <[email protected]>
sharon2719 pushed a commit to opensrp/android-fhir that referenced this pull request Feb 6, 2024
* Add fhirpath supplements

* Add unit tests

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Resolve feedback and test issues

* Fix compile issue

* Update datacapture/src/test/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluatorTest.kt

Co-authored-by: Jing Tang <[email protected]>

* Rename tests

---------

Co-authored-by: Jing Tang <[email protected]>
jingtang10 added a commit that referenced this pull request Feb 27, 2024
* Update questionnaire buttons in xml fragment

* Add fhirpath supplements (#2346)

* Add fhirpath supplements

* Add unit tests

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Update datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt

Co-authored-by: Jing Tang <[email protected]>

* Resolve feedback and test issues

* Fix compile issue

* Update datacapture/src/test/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluatorTest.kt

Co-authored-by: Jing Tang <[email protected]>

* Rename tests

---------

Co-authored-by: Jing Tang <[email protected]>

* Update the Button style

* Update styles.xml

* Fix styles.xml

* Update datacapture/src/main/res/values/styles.xml

Co-authored-by: santosh-pingle <[email protected]>

* Update datacapture/src/main/res/values/styles.xml

Co-authored-by: santosh-pingle <[email protected]>

* Run spotlesss

---------

Co-authored-by: Maimoona Kausar <[email protected]>
Co-authored-by: Jing Tang <[email protected]>
Co-authored-by: santosh-pingle <[email protected]>
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.

None yet

2 participants