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

Enable cqf expressions to evaluate variables on questionnaire extensions #2292

Closed
ageryck opened this issue Oct 25, 2023 · 2 comments · Fixed by #2326
Closed

Enable cqf expressions to evaluate variables on questionnaire extensions #2292

ageryck opened this issue Oct 25, 2023 · 2 comments · Fixed by #2326
Assignees

Comments

@ageryck
Copy link

ageryck commented Oct 25, 2023

Is your feature request related to a problem? Please describe.
The current problem is the inability to pass a saved date value to be used as a questionnaire date picker validation value i.e. using the dob as a minimum value to capture any patient-related services like immunization. This requires passing the already saved dob to used a min date on the questionnaire date picker. The cqf currently fails to evaluate the variable passed.

Describe the solution you'd like
Allow the cqf expression to access and evaluate expressions for parameters stored/passed in the launch context

Describe alternatives you've considered
prepopulating the questionnaire with the dob value and passing that as an express dob value

Additional context
The extension below currently works for max value validation, this feature should allow the use of the same extension or min value validation

{
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDate": {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue",
                    "valueExpression": {
                      "language": "text/fhirpath",
                      "expression": "today()"
                    }
                  }
                ]
              }
            }

Would you like to work on the issue?
Yes

@FikriMilano
Copy link
Collaborator

just to clarify.
we'll be passing declared variables, launchContexts, %resource, and other FHIRPath context variable when we evaluate the cqf-calculated-value for both min and max validator

@LZRS
Copy link
Collaborator

LZRS commented Oct 30, 2023

I will be working on this and would like to be assigned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
3 participants