Skip to content

Use optional fhirpath.evaluate from QRFContext#45

Merged
ruscoder merged 5 commits intomainfrom
pass-custom-fhirpath-evaluate
Mar 20, 2026
Merged

Use optional fhirpath.evaluate from QRFContext#45
ruscoder merged 5 commits intomainfrom
pass-custom-fhirpath-evaluate

Conversation

@alexlipovka
Copy link
Contributor

No description provided.

src/types.ts Outdated
};

export type EvaluateFhirpath = (
fhirData: any,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluate fhirpath should be (context, path, env) => any[]. (pay attention to naming, it's important)

It will make our sdc-qrf model-independent, and we can use it like:

evaluateFhirpath={(context, path, env) => fhirpath(context, path, env, models.r4b, {userInvocationTable: {...}})}

Copy link
Member

@ruscoder ruscoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexlipovka please have a look

@ruscoder
Copy link
Member

@alexlipovka also it will be good to extend isQuestionEnabled with evaluateFhirpath, as well as getEnabledQuestions and removeDIsabledAnswers.
And in QuestionItems pass it from context to getEnabledQuestions

@alexlipovka alexlipovka requested a review from ruscoder March 11, 2026 15:00
@ruscoder ruscoder merged commit fd3fdb9 into main Mar 20, 2026
3 checks passed
@alexlipovka alexlipovka deleted the pass-custom-fhirpath-evaluate branch March 20, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants