clinical-reasoning
clinical-reasoning copied to clipboard
PlanDefinition and ActivityDefinition evaluator should use subject as context for FHIRPath evaluation
The PlanDefinition and ActivityDefinition processors are passing 'null' as the context when evaluating FhirPath:
https://github.com/DBCG/cql-evaluator/blob/3c35ddab0cee8d26f86f0d161c4eee73b44de6b8/evaluator.plandefinition/src/main/java/org/opencds/cqf/cql/evaluator/plandefinition/r4/PlanDefinitionProcessor.java#L695
However, PlanDefinition, ActivityDefinition, and Measure resources are knowledge artifacts that are specifically set up to evaluate in the context specified by the subjectType element (typically Patient).