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 a Wrapper For fhirPath expressions, cqf-calculatedValue, cqf-library and cqf-expression. #1246

Closed
RaaziaTarique opened this issue Mar 21, 2022 · 9 comments
Labels
effort:medium Medium effort - 3 to 5 days P1 High priority issue type:enhancement New feature or request

Comments

@RaaziaTarique
Copy link
Contributor

Is your feature request related to a problem? Please describe.
FhirPathEngine, DataRenderer and related classes to evaluate fhirPath expressions, cqf-calculatedValue, cqf-library and cqf-expression will be used multiple time in the project so it's better to have central wrapper for these classes.

Following issues which may use this wrapper in the future:

#1040 (This wrapper is a Pre-Requisite)
#1033
#1059

Describe the solution you'd like
Add a wrapper in the common module.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
@jingtang10 proposed this solution in the SDK ticket discussion call held on 18th March, 2022 CC: @f-odhiambo

Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.

@jingtang10
Copy link
Collaborator

as a first step to speed up development, i think it's ok to create this new api as an internal api in the datacapture module. as a next step we can move it to the common module (which will require a separate release).

@jingtang10 jingtang10 added Data capture type:enhancement New feature or request P1 High priority issue effort:medium Medium effort - 3 to 5 days labels Mar 22, 2022
@ekigamba
Copy link
Contributor

ekigamba commented Mar 30, 2022

I recommend(draft) the following:

class FhirPathWrapper

functions:

  • evaluate - Can be used by cqf-calculatedValue, cqf-express, calculatedExpression extensions
  • evaluateToBoolean - Can be used by enableWhen extension

It can also be used in the FHIR Path variable issue at a later point

Most of these output either a boolean or a list of resources.

The wrapper can be extended to support constant extensions that need local support such as %questionnaire, qitem(), sum() etc defined here

FhirPathWrapper can also be modified to add support for other expressions as well such as answerExpression and others if needed.

@RaaziaTarique I don't know if this is what @jingtang10 wanted but I believe it's a start based on my understanding

Edited with @RaaziaTarique

@fredhersch
Copy link
Collaborator

@RaaziaTarique @jingtang10 has the approach here been resolved? Thanks

@f-odhiambo
Copy link
Collaborator

f-odhiambo commented Jun 20, 2022

Updates on this

  1. Min/Max validation Works for Date but not other data types - PR Restricting DatePicker to select date from outside the defined Range (Min/Max). Added support for fhir path expression in Min / Max Validators #1442 ready
  2. calculated-expression - PR Implement calculated-expression extension #1380 ready
  3. calculated-value - PR Restricting DatePicker to select date from outside the defined Range (Min/Max). Added support for fhir path expression in Min / Max Validators #1442 ready
  4. Implement calculated-expression extension 1059 | variables -> PR Add variable Extension support #1328 ready
  5. CQF Expression not implemented yet - Needs a discussion
    CC @maimoonak

@f-odhiambo
Copy link
Collaborator

CC @fredhersch @jingtang10

@jingtang10
Copy link
Collaborator

jingtang10 commented Jul 1, 2022

  1. Restricting DatePicker to select date from outside the defined Range (Min/Max). Added support for fhir path expression in Min / Max Validators #1442 has comments to be addressed.
  2. just left a review. also requested @joiskash to review.
  3. that's the same PR as 1
  4. just left a review
  5. can you set up something please @maimoonak

@maimoonak
Copy link
Collaborator

maimoonak commented Aug 30, 2022

The expressions support has a long list https://build.fhir.org/ig/HL7/sdc/expressions.html and https://build.fhir.org/ig/HL7/sdc/behavior.html. Some of the expressions discussed in current thread are below

@f-odhiambo @jingtang10 @Tarun-Bhardwaj

@f-odhiambo
Copy link
Collaborator

f-odhiambo commented Aug 31, 2022

@fredhersch See the summery above on the related FHIRPath expression tickets

@jingtang10
Copy link
Collaborator

I think as a tracking issue this issue can be closed as the only item left is 1038.

@github-project-automation github-project-automation bot moved this from Backlog to Complete in Android FHIR SDK Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:medium Medium effort - 3 to 5 days P1 High priority issue type:enhancement New feature or request
Projects
Status: Complete
Development

No branches or pull requests

8 participants