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 evaluation of FHIRPath expressions and calculation within Questionnaire #803

Closed
fredhersch opened this issue Sep 29, 2021 · 8 comments
Labels
P2 Medium priority issue type:enhancement New feature or request

Comments

@fredhersch
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
There is a need to be able to evaluate expressions within a Questionnaire. This is currently not supported by the data-capture library

Describe the solution you'd like
Support for FHIRPath expressions

Describe alternatives you've considered
Other options include CQL.

Additional context
@maimoonak - can you provide some example use cases for the types of expressions you are trying to evaluate

@fredhersch fredhersch added the type:enhancement New feature or request label Sep 29, 2021
@Tarun-Bhardwaj Tarun-Bhardwaj added P1 High priority issue P2 Medium priority issue Triage and removed P1 High priority issue labels Sep 29, 2021
@maimoonak
Copy link
Collaborator

maimoonak commented Oct 5, 2021

There are multiple requirements we figured out when working on Family Registration. These are broken down in branch https://github.com/google/android-fhir/blob/mssng-quest-feat and commit

EnableWhen is not working fully - FHIR Reference

EnableWhen on answerInteger (crashes when value input for integer field)
kotlin.NotImplementedError: Enable when operator GREATER_OR_EQUAL is not implemented.
Sample Questionnaire crashes here

Alternate enableExpression is also not working
An alternate is to use enableExpression which also does not work and can be seen here

Hidden is partially working

"hidden": true - still not working - see here
extension hidden - "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden" is working - see here

choice-orientation = horizontal - not working

see here

Slider not working - FHIR Reference

Exmple can be seen here

readonly not working

see example here

calculated-expression and variable not working - FHIR Reference

see example where we want to take age OR birthdate as input and calculate the other from one which was input here

You can run app from branch and see different questionnaires created

@f-odhiambo @fredhersch

@jingtang10
Copy link
Collaborator

jingtang10 commented Oct 6, 2021

Thanks for this @maimoonak. I'll use this comment to track the issues you raised (I'll cross out items that have been triaged):

@fredhersch
Copy link
Collaborator Author

@jingtang10 @maimoonak For slider not working is this issue relevant? #201

cc: @f-odhiambo

@maimoonak
Copy link
Collaborator

@fredhersch @jingtang10 The issue above was for adding a slider widget which apparently is present in library, however, I could not figure out if it is added to widgets adapter. There is no reference to this widget except in unit test, so I think that its implementation is not complete. Please check ticket here for details #828

The class src/main/java/com/google/android/fhir/datacapture/QuestionnaireItemAdapter.kt initialize and bind different widgets but no reference of QuestionnaireItemSliderViewHolderFactory was found in this class or anywhere else except in a unit test

@jingtang10
Copy link
Collaborator

thansk @maimoonak -- yeah i can see the issue.

all issues you raised have tracking issues now as listed in the comment above.

@maimoonak
Copy link
Collaborator

@jingtang10 here is the expression context variable protocol. http://build.fhir.org/ig/HL7/sdc/expressions.html#fhirpath-supplements

@maimoonak maimoonak changed the title Support evaluation of FHIRPath expressions within Questionnaire Support evaluation of FHIRPath expressions and calculation within Questionnaire Dec 3, 2021
@pld pld mentioned this issue Dec 8, 2021
5 tasks
@maimoonak
Copy link
Collaborator

@jingtang10 I could not figure out calculated-expression and variable - FHIR Reference that this issue is tracking into roadmap here. Could you please guide which point reflects this and if this is under progress.

@jingtang10
Copy link
Collaborator

@maimoonak - given that all the other issues are being tracked/closed i'm goign to close this bug. For the issue with enable when expressions let's continue the discussion in #819

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

No branches or pull requests

4 participants