use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class StringOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(StringOperatorsTest.class.getResourceAsStream("../OperatorTests/StringOperators.cql"), modelManager, new LibraryManager(modelManager));
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project clinical_quality_language by cqframework.
the class AgeOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(AgeOperatorsTest.class.getResourceAsStream("../OperatorTests/AgeOperators.cql"), modelManager, new LibraryManager(modelManager));
assertThat(translator.getErrors().size(), is(0));
Library library = translator.toELM();
defs = new HashMap<>();
if (library.getStatements() != null) {
for (ExpressionDef def : library.getStatements().getDef()) {
defs.put(def.getName(), def);
}
}
}
use of org.cqframework.cql.cql2elm.LibraryManager in project cqf-ruler by DBCG.
the class DataOperationsProvider method processDataRequirements.
private Library processDataRequirements(Library library, RequestDetails theRequestDetails) {
LibraryManager libraryManager = createLibraryManager(library, theRequestDetails);
CqlTranslator translator = translateLibrary(library, libraryManager, theRequestDetails);
return DataRequirements.getModuleDefinitionLibraryDstu3(libraryManager, translator.getTranslatedLibrary(), Translators.getTranslatorOptions());
}
use of org.cqframework.cql.cql2elm.LibraryManager in project cqf-ruler by DBCG.
the class DataOperationsProvider method processDataRequirements.
private Library processDataRequirements(Measure measure, Library library, RequestDetails theRequestDetails) {
LibraryManager libraryManager = createLibraryManager(library, theRequestDetails);
CqlTranslator translator = translateLibrary(library, libraryManager, theRequestDetails);
return DataRequirements.getModuleDefinitionLibraryDstu3(measure, libraryManager, translator.getTranslatedLibrary(), Translators.getTranslatorOptions());
}
use of org.cqframework.cql.cql2elm.LibraryManager in project cqf-ruler by DBCG.
the class DataOperationsProvider method processDataRequirements.
private Library processDataRequirements(Measure measure, Library library, RequestDetails theRequestDetails) {
LibraryManager libraryManager = createLibraryManager(library, theRequestDetails);
CqlTranslator translator = translateLibrary(library, libraryManager, theRequestDetails);
// TODO: Enable passing a capabiliity statement as a parameter to the operation
return DataRequirements.getModuleDefinitionLibraryR4(measure, libraryManager, translator.getTranslatedLibrary(), Translators.getTranslatorOptions(), searchParameterResolver, jpaTerminologyProviderFactory.create(theRequestDetails), myModelResolver, null);
}
Aggregations