Search in sources :

Example 1 with NamespaceInfo

use of org.cqframework.cql.cql2elm.NamespaceInfo in project clinical_quality_language by cqframework.

the class BaseTest method testFHIRNamespaces.

@Test
public void testFHIRNamespaces() throws IOException {
    CqlTranslator translator = TestUtils.runSemanticTest(new NamespaceInfo("Public", "http://cql.hl7.org/public"), "fhir/r401/TestFHIRNamespaces.cql", 0);
    CompiledLibrary library = translator.getTranslatedLibrary();
    UsingDef usingDef = library.resolveUsingRef("FHIR");
    assertThat(usingDef, notNullValue());
    assertThat(usingDef.getLocalIdentifier(), is("FHIR"));
    assertThat(usingDef.getUri(), is("http://hl7.org/fhir"));
    assertThat(usingDef.getVersion(), is("4.0.1"));
    IncludeDef includeDef = library.resolveIncludeRef("FHIRHelpers");
    assertThat(includeDef, notNullValue());
    assertThat(includeDef.getPath(), is("http://hl7.org/fhir/FHIRHelpers"));
    assertThat(includeDef.getVersion(), is("4.0.1"));
}
Also used : CompiledLibrary(org.cqframework.cql.cql2elm.model.CompiledLibrary) CqlTranslator(org.cqframework.cql.cql2elm.CqlTranslator) NamespaceInfo(org.cqframework.cql.cql2elm.NamespaceInfo) Test(org.testng.annotations.Test)

Example 2 with NamespaceInfo

use of org.cqframework.cql.cql2elm.NamespaceInfo in project clinical_quality_language by cqframework.

the class BaseTest method testFHIRNamespaces.

@Test
public void testFHIRNamespaces() throws IOException {
    CqlTranslator translator = TestUtils.runSemanticTest(new NamespaceInfo("Public", "http://cql.hl7.org/public"), "fhir/dstu2/TestFHIRNamespaces.cql", 0);
    CompiledLibrary library = translator.getTranslatedLibrary();
    IncludeDef includeDef = library.resolveIncludeRef("FHIRHelpers");
    assertThat(includeDef, notNullValue());
    assertThat(includeDef.getPath(), is("http://hl7.org/fhir/FHIRHelpers"));
    assertThat(includeDef.getVersion(), is("1.0.2"));
}
Also used : CompiledLibrary(org.cqframework.cql.cql2elm.model.CompiledLibrary) CqlTranslator(org.cqframework.cql.cql2elm.CqlTranslator) NamespaceInfo(org.cqframework.cql.cql2elm.NamespaceInfo) Test(org.testng.annotations.Test)

Example 3 with NamespaceInfo

use of org.cqframework.cql.cql2elm.NamespaceInfo in project clinical_quality_language by cqframework.

the class BaseTest method testFHIRNamespaces.

@Test
public void testFHIRNamespaces() throws IOException {
    CqlTranslator translator = TestUtils.runSemanticTest(new NamespaceInfo("Public", "http://cql.hl7.org/public"), "fhir/stu301/TestFHIRNamespaces.cql", 0);
    CompiledLibrary library = translator.getTranslatedLibrary();
    IncludeDef includeDef = library.resolveIncludeRef("FHIRHelpers");
    assertThat(includeDef, notNullValue());
    assertThat(includeDef.getPath(), is("http://hl7.org/fhir/FHIRHelpers"));
    assertThat(includeDef.getVersion(), is("3.0.1"));
}
Also used : CompiledLibrary(org.cqframework.cql.cql2elm.model.CompiledLibrary) CqlTranslator(org.cqframework.cql.cql2elm.CqlTranslator) NamespaceInfo(org.cqframework.cql.cql2elm.NamespaceInfo) Test(org.testng.annotations.Test)

Aggregations

CqlTranslator (org.cqframework.cql.cql2elm.CqlTranslator)3 NamespaceInfo (org.cqframework.cql.cql2elm.NamespaceInfo)3 CompiledLibrary (org.cqframework.cql.cql2elm.model.CompiledLibrary)3 Test (org.testng.annotations.Test)3