-
Notifications
You must be signed in to change notification settings - Fork 143
Could not resolve function call #891
Description
Execution of this below CQL against a patient resulted in "Could not resolve call to operator" error
=========================================
library L3MeasureShortName version '1'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
valueset "Acute Bronchitis": '37139'
valueset "ED": '37802'
valueset "Observation": '37804'
valueset "Online Assessments": '37807'
valueset "Outpatient": '37805'
valueset "Telephone Visits": '37806'
context Patient
define Test: "VS Cast Function"("ED")
define function "VS Cast Function"(VSet System.ValueSet):
(
( cast { "VSet", 1 }[0] as Tuple { codes List<System.Code> }).codes
)
Stack-trace
2022-01-18 08:51:02,016 [http-nio-8080-exec-9] - JSF - 9709ef46-a0ee-4047-9f0e-49a88ee1bf65 - ERROR CQLExecutionManager:414 - Caught a runtime exception during rule execution. Details: org.opencds.cqf.cql.engine.exception.CqlException: Could not resolve call to operator 'VS Cast Function(java.util.List)' in library 'L3MeasureShortName'.
at org.opencds.cqf.cql.engine.execution.Context.resolveFunctionRef(Context.java:610)
at org.opencds.cqf.cql.engine.elm.execution.FunctionRefEvaluator.internalEvaluate(FunctionRefEvaluator.java:23)
at org.opencds.cqf.cql.engine.elm.execution.Executable.evaluate(Executable.java:18)
at com.abc.common.cql.CQLExecutionManager.getResultsBuildResponse(CQLExecutionManager.java:381)