Closed BillBaar closed 2 years ago
Hi, any progress on this?
There has been some discussion herehttps://chat.fhir.org/#narrow/stream/179220-cql/topic/ValueSet.20Typing and I guy I have looking at it thinks he's close to a fix
This issue is due to an unintentional backwards incompatibility between CQL 1.4 and 1.5. Several changes were made as part of the 1.5.6 translator release (and downstream releases to the engine, evaluator, tooling, and ruler) to address this. In addition, a CQL STU comment was submitted to address the proposed changes to trial-use functionality in the ELM: https://jira.hl7.org/browse/FHIR-34804
The issue will also be discussed and proposed solution reviewed in the upcoming FHIR connectathon during the following session: https://whova.com/portal/webapp/conne_202201/Agenda/2112882
I'm closing this issue as resolved, please feel free to reopen or log another issue if there is still a problem
We're finding this code:
define function "VS Cast Function"(VSet List):
( ( cast { "VSet", 1 }[0]as Tuple {
codes List,
oid System.String,
version System.String
}
).codes ) VSetCodes
return System.Code { code: VSetCodes.code, system: VSetCodes.system }
throwing this error:
The following errors were encountered during evaluation: org.opencds.cqf.cql.engine.exception.InvalidCast: Cannot cast a value of type org.cqframework.cql.elm.execution.ValueSetDef as org.opencds.cqf.cql.engine.runtime.Tuple. at org.opencds.cqf.cql.engine.model.BaseModelResolver.as(BaseModelResolver.java:28) at org.opencds.cqf.cql.engine.execution.Context.as(Context.java:467) at org.opencds.cqf.cql.engine.elm.execution.AsEvaluator.internalEvaluate(AsEvaluator.java:39)
The function seems to expect a list of codes but instead a ValueSetDef is being input. I am not sure how to resolve this. Any thoughts?