Class CqlEngine

java.lang.Object
org.opencds.cqf.cql.engine.execution.CqlEngine

public class CqlEngine extends Object
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.
  • Constructor Details

  • Method Details

    • getEnvironment

      public Environment getEnvironment()
    • getState

      public State getState()
    • getCache

      public Cache getCache()
    • getEvaluationVisitor

      @Deprecated(forRemoval=true) public EvaluationVisitor 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 defined
      expressionName - the name of the expression to evaluate
      evaluationDateTime - 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 defined
      expressionName - the name of the expression to evaluate
      Returns:
      the result of the expression
    • evaluate

      public EvaluationResult evaluate(String libraryName)
    • evaluate

      public EvaluationResult evaluate(String libraryName, Set<String> expressions)
    • evaluate

      public EvaluationResult evaluate(String libraryName, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter)
    • evaluate

      public EvaluationResult evaluate(String libraryName, Set<String> expressions, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(String libraryName, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter)
    • evaluate

      public EvaluationResult evaluate(String libraryName, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(String libraryName, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(String libraryName, Set<String> expressions, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier)
    • 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

      public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Set<String> expressions, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter)
    • evaluate

      public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, org.apache.commons.lang3.tuple.Pair<String,Object> contextParameter, Map<String,Object> parameters)
    • evaluate

      public EvaluationResult evaluate(org.hl7.elm.r1.VersionedIdentifier libraryIdentifier, Map<String,Object> parameters)
    • 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)
    • 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

      public void processException(CqlException e, org.hl7.elm.r1.Element element)
    • processException

      public void processException(Exception e, org.hl7.elm.r1.Element element, String message)