Closed binhphi109 closed 2 years ago
Yes, this is definitely an inconsistency that needs to be addressed. The $apply operation and the CDS Hooks functionality resolve the PlanDefinition condition expressions in different ways and should be consistent.
Duplicated by #539
Case 1: I were using
plandefinition-apply.json
to test$apply
operation. It works as expected. However, I made some changes to theapply-example
PlanDefinition as below:After that, I created a request, sent it to
http://localhost:8080/cqf-ruler/cds-services/apply-example
service, and then the service encountered an error: "Could not resolve expression reference 'plandefinitionApplyTest.Results' in library 'plandefinitionApplyTest'."Case 2: I tried to send different request to
http://localhost:8080/cqf-ruler/cds-services/cdc-opioid-guidance-05
. The service works as expected. Nevertheless,cdc-opioid-guidance-05
PlanDefinition cannot be applied using$apply
operation.Root cause: From my investigation, when
$apply
in the case 1, the system can resolve the condition's expression asResults
defined in PlanDefinition. However, when processing the cds-services' request, the system resolves the condition's expression asplandefinitionApplyTest.Results
, notResults
anymore.