cqframework / clinical-reasoning

CQF Clinical Reasoning on FHIR for Java
https://www.cqframework.org/clinical-reasoning/
Apache License 2.0
35 stars 29 forks source link

error on $apply with dynamicValues #350

Closed lukeaduncan closed 1 year ago

lukeaduncan commented 1 year ago

I get this error when trying to resolve dynamicValues with $apply:

2023-09-27 13:51:51.724 [http-nio-8080-exec-2] INFO o.o.c.c.e.p.r.PlanDefinitionProcessor [PlanDefinitionProcessor.java:703] The result of condition expression Provision of the MCV dose is true 2023-09-27 13:51:51.726 [http-nio-8080-exec-2] ERROR o.o.c.c.e.p.r.PlanDefinitionProcessor [PlanDefinitionProcessor.java:422] ERROR: ActivityDefinition CanonicalType[http://fhir.org/guides/who/smart-immunization/ActivityDefinition/IMMZ.DT.08.Measles.MR] could not be applied and threw exception java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0

This happens with many variations trying to get the dynamicValue to work. Either setting a direct value or calling a CQL expression. I've tried using language of text/cql, text/cql-expression, and text/cql-identifier.

Examples can be found here:

brynrhodes commented 1 year ago

@lukeaduncan , there is an ad-hoc hapi image that you can use to test whether this is still an issue with the 3.0.0 translator

lukeaduncan commented 1 year ago

This is now working with the SNAPSHOT image.