Java Code Examples for org.cqframework.cql.cql2elm.CqlTranslator#getTranslatedLibrary()
The following examples show how to use
org.cqframework.cql.cql2elm.CqlTranslator#getTranslatedLibrary() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseTest.java From clinical_quality_language with Apache License 2.0 | 5 votes |
@Test public void testRetrieveWithConcept() throws IOException { CqlTranslator translator = TestUtils.runSemanticTest("fhir/r4/TestRetrieveWithConcept.cql", 0); TranslatedLibrary library = translator.getTranslatedLibrary(); ExpressionDef expressionDef = library.resolveExpressionRef("Test Tobacco Smoking Status"); assertThat(expressionDef.getExpression(), instanceOf(Retrieve.class)); Retrieve retrieve = (Retrieve)expressionDef.getExpression(); assertThat(retrieve.getCodes(), instanceOf(ToList.class)); ToList toList = (ToList)retrieve.getCodes(); assertThat(toList.getOperand(), instanceOf(CodeRef.class)); }
Example 2
Source File: BaseTest.java From clinical_quality_language with Apache License 2.0 | 5 votes |
@Test public void testRetrieveWithConcept() throws IOException { CqlTranslator translator = TestUtils.runSemanticTest("fhir/stu3/TestRetrieveWithConcept.cql", 0); TranslatedLibrary library = translator.getTranslatedLibrary(); ExpressionDef expressionDef = library.resolveExpressionRef("Test Tobacco Smoking Status"); assertThat(expressionDef.getExpression(), instanceOf(Retrieve.class)); Retrieve retrieve = (Retrieve)expressionDef.getExpression(); assertThat(retrieve.getCodes(), instanceOf(ToList.class)); ToList toList = (ToList)retrieve.getCodes(); assertThat(toList.getOperand(), instanceOf(CodeRef.class)); }
Example 3
Source File: BaseTest.java From clinical_quality_language with Apache License 2.0 | 5 votes |
@Test public void testRetrieveWithConcept() throws IOException { CqlTranslator translator = TestUtils.runSemanticTest("fhir/r401/TestRetrieveWithConcept.cql", 0); TranslatedLibrary library = translator.getTranslatedLibrary(); ExpressionDef expressionDef = library.resolveExpressionRef("Test Tobacco Smoking Status"); assertThat(expressionDef.getExpression(), instanceOf(Retrieve.class)); Retrieve retrieve = (Retrieve)expressionDef.getExpression(); assertThat(retrieve.getCodes(), instanceOf(ToList.class)); ToList toList = (ToList)retrieve.getCodes(); assertThat(toList.getOperand(), instanceOf(CodeRef.class)); }
Example 4
Source File: BaseTest.java From clinical_quality_language with Apache License 2.0 | 5 votes |
@Test public void testFHIRNamespaces() throws IOException { CqlTranslator translator = TestUtils.runSemanticTest(new NamespaceInfo("Public", "http://cql.hl7.org/public"), "fhir/r401/TestFHIRNamespaces.cql", 0); TranslatedLibrary library = translator.getTranslatedLibrary(); IncludeDef includeDef = library.resolveIncludeRef("FHIRHelpers"); assertThat(includeDef, notNullValue()); assertThat(includeDef.getPath(), is("http://hl7.org/fhir/FHIRHelpers")); assertThat(includeDef.getVersion(), is("4.0.1")); }
Example 5
Source File: BaseTest.java From clinical_quality_language with Apache License 2.0 | 5 votes |
@Test public void testFHIRWithoutNamespaces() throws IOException { CqlTranslator translator = TestUtils.runSemanticTest("fhir/r401/TestFHIRNamespaces.cql", 0); TranslatedLibrary library = translator.getTranslatedLibrary(); IncludeDef includeDef = library.resolveIncludeRef("FHIRHelpers"); assertThat(includeDef, notNullValue()); assertThat(includeDef.getPath(), is("FHIRHelpers")); assertThat(includeDef.getVersion(), is("4.0.1")); }