-
Notifications
You must be signed in to change notification settings - Fork 294
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
Allow usage of variable and context in answer expression #2039
Conversation
@maimoonak @omarismail94 |
@maimoonak there is a test that fails:
can you fix that? |
please wait until #2034 is merged. that PR changes the questionnaire view item. |
datacapture/src/main/java/com/google/android/fhir/datacapture/views/QuestionnaireViewItem.kt
Outdated
Show resolved
Hide resolved
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireViewModelTest.kt
Outdated
Show resolved
Hide resolved
…oid-fhir into answer-exp-variable
datacapture/src/test/java/com/google/android/fhir/datacapture/QuestionnaireViewModelTest.kt
Outdated
Show resolved
Hide resolved
questionnaireResponse: QuestionnaireResponse, | ||
questionnaireItemParentMap: Map<QuestionnaireItemComponent, QuestionnaireItemComponent>, |
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.
I guess these 2 were not needed in this API invocation
Fixes #[issue number]
Description
Currently the answer-expression option loading by fhirpath just evaluates the simple version of expression and does not make use of context, variables, and other context data
fhirPathEngine.evaluate(questionnaireResponse, expression.expression)
. This should use ExpressionEvaluator evaluateExpression method with all context data.Type
Choose one: Feature
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.