-
Notifications
You must be signed in to change notification settings - Fork 293
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
Cqf expression implementation for dynamic question title #1959
Conversation
a82135f
to
4c420ca
Compare
342635c
to
9ab6672
Compare
@maimoonak awesome work here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done! 🚀
can you write a test that makes sure when an answer from a QuestionnaireItem was changed, the next QuestionnaireItem.title is updated?
datacapture/src/main/java/com/google/android/fhir/datacapture/views/QuestionnaireViewItem.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maimoonak can you also check if the dynamic title works with variable expression?
Try to save the answer to variable expression, then call that variable in cqf expression.
I tried this, it doesn't seem to work, though it works with calculated expression
Good catch! Thanks for this. Feedback resolved and PR is ready for review |
@shelaghm please take a look at the video @maimoonak attached. |
269786b
to
85406da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maimoonak thanks!
Is there a way to add unit test to HeaderViewTest
and GroupHeaderViewTest
where dynamic text from cqf expression can be shown, or android test to QuestionnaireUiEspressoTest
?
otherwise it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great change! Thanks very much! Just a few comments below:
datacapture/src/main/java/com/google/android/fhir/datacapture/extensions/MoreExpressions.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/fhirpath/ExpressionEvaluator.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/QuestionnaireViewModel.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/views/GroupHeaderView.kt
Outdated
Show resolved
Hide resolved
datacapture/src/main/java/com/google/android/fhir/datacapture/views/HeaderView.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Jing Tang <[email protected]>
…fhirpath/ExpressionEvaluator.kt Co-authored-by: Jing Tang <[email protected]>
…QuestionnaireViewModel.kt Co-authored-by: Jing Tang <[email protected]>
…views/HeaderView.kt Co-authored-by: Jing Tang <[email protected]>
…views/GroupHeaderView.kt Co-authored-by: Jing Tang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @maimoonak! great job!
Fixes #1945
Description
Display questionnaire.item.text from FHIRPath expression. In a nutshell, it's like calculated expression which's for answer, but this time for questionnaire.item.text. Advance rendering questionnaireallows the cf-expression on title to display it based on other question`s answers example
Type
Choose one: Feature
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.