From 967d952a84af15fac9a2566a54af8197420e57e8 Mon Sep 17 00:00:00 2001 From: Adam Stevenson Date: Wed, 5 Aug 2020 20:39:44 -0600 Subject: [PATCH] enabled EnableDateRangeOptimization Translator option by default --- .../org/opencds/cqf/common/evaluation/LibraryLoader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/org/opencds/cqf/common/evaluation/LibraryLoader.java b/common/src/main/java/org/opencds/cqf/common/evaluation/LibraryLoader.java index f21eee88b..a5ede19aa 100644 --- a/common/src/main/java/org/opencds/cqf/common/evaluation/LibraryLoader.java +++ b/common/src/main/java/org/opencds/cqf/common/evaluation/LibraryLoader.java @@ -80,8 +80,9 @@ private Library loadLibrary(VersionedIdentifier libraryIdentifier) { .withVersion(libraryIdentifier.getVersion()); ArrayList errors = new ArrayList<>(); - org.hl7.elm.r1.Library translatedLibrary = libraryManager - .resolveLibrary(identifier, CqlTranslatorOptions.defaultOptions(), errors).getLibrary(); + CqlTranslatorOptions translatorOptions = CqlTranslatorOptions.defaultOptions(); + translatorOptions.getOptions().add(CqlTranslator.Options.EnableDateRangeOptimization); + org.hl7.elm.r1.Library translatedLibrary = libraryManager.resolveLibrary(identifier, translatorOptions, errors).getLibrary(); if (CqlTranslatorException.HasErrors(errors)) { throw new IllegalArgumentException(errorsToString(errors));