use of org.cqframework.cql.cql2elm.ModelManager in project clinical_quality_language by cqframework.
the class TypeOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(TypeOperatorsTest.class.getResourceAsStream("../OperatorTests/TypeOperators.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.ModelManager in project clinical_quality_language by cqframework.
the class CqlIntervalOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(CqlIntervalOperatorsTest.class.getResourceAsStream("../OperatorTests/CqlIntervalOperators.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.ModelManager in project clinical_quality_language by cqframework.
the class CqlListOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(CqlListOperatorsTest.class.getResourceAsStream("../OperatorTests/CqlListOperators.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.ModelManager in project clinical_quality_language by cqframework.
the class NullologicalOperatorsTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(NullologicalOperatorsTest.class.getResourceAsStream("../OperatorTests/NullologicalOperators.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.ModelManager in project clinical_quality_language by cqframework.
the class QueryTest method setup.
@BeforeTest
public void setup() throws IOException {
ModelManager modelManager = new ModelManager();
CqlTranslator translator = CqlTranslator.fromStream(QueryTest.class.getResourceAsStream("../OperatorTests/Query.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);
}
}
Aggregations