Class CqlEngine
java.lang.Object
org.opencds.cqf.cql.engine.execution.CqlEngine
NOTE: We have updated CqlEngine to adopt a visitor pattern approach to traversing the ELM tree for execution:
Visitor pattern reduces the process to convert EML Tree to Executable ELM tree and thus reduces a potential maintenance issue.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCqlEngine(Environment environment) CqlEngine(Environment environment, Set<CqlEngine.Options> engineOptions) -
Method Summary
Modifier and TypeMethodDescriptionevaluate(String libraryName, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) evaluate(String libraryName, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters) evaluate(String libraryName, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, ZonedDateTime evaluationDateTime) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, Map<String, Object> parameters) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters, DebugMap debugMap) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters, DebugMap debugMap, ZonedDateTime evaluationDateTime) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters) expression(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, String expressionName) Deprecated, for removal: This API element is subject to removal in a future version.I added to assist with unit testing, but really it's indicative of the fact that we need to further refine the engine API.expression(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, String expressionName, ZonedDateTime evaluationDateTime) Deprecated, for removal: This API element is subject to removal in a future version.I added to assist with unit testing, but really it's indicative of the fact that we need to further refine the engine API.getCache()Deprecated, for removal: This API element is subject to removal in a future version.this is a temporary arrangement until we further refine the relationship between the engine, the environment, and the stategetState()voidprocessException(Exception e, org.hl7.elm.r1.Element element, String message) voidprocessException(CqlException e, org.hl7.elm.r1.Element element)
-
Constructor Details
-
CqlEngine
-
CqlEngine
-
-
Method Details
-
getEnvironment
-
getState
-
getCache
-
getEvaluationVisitor
Deprecated, for removal: This API element is subject to removal in a future version.this is a temporary arrangement until we further refine the relationship between the engine, the environment, and the state- Returns:
- the internal engine visitor
-
expression
@Deprecated(forRemoval=true) public ExpressionResult expression(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, String expressionName, ZonedDateTime evaluationDateTime) Deprecated, for removal: This API element is subject to removal in a future version.I added to assist with unit testing, but really it's indicative of the fact that we need to further refine the engine API. Please use this sparingly as it will go away- Parameters:
libraryIdentifier- the library where the expression is definedexpressionName- the name of the expression to evaluateevaluationDateTime- the value for "Now()"- Returns:
- the result of the expression
-
expression
@Deprecated(forRemoval=true) public ExpressionResult expression(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, String expressionName) Deprecated, for removal: This API element is subject to removal in a future version.I added to assist with unit testing, but really it's indicative of the fact that we need to further refine the engine API. Please use this sparingly as it will go away- Parameters:
libraryIdentifier- the library where the expression is definedexpressionName- the name of the expression to evaluate- Returns:
- the result of the expression
-
evaluate
-
evaluate
-
evaluate
-
evaluate
-
evaluate
public EvaluationResult evaluate(String libraryName, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) -
evaluate
-
evaluate
-
evaluate
-
evaluate
-
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, ZonedDateTime evaluationDateTime) -
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions) -
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) -
evaluate
-
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter) -
evaluate
-
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Map<String, Object> parameters) -
evaluate
-
evaluate
public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String, Object> contextParameter, Map<String, Object> parameters, DebugMap debugMap, ZonedDateTime evaluationDateTime) -
processException
-
processException
-