Search in sources :

Example 1 with Library

use of org.hl7.fhir.dstu3.model.Library in project cqf-ruler by DBCG.

the class IdsTest method testClassSupported.

@Test
public void testClassSupported() {
    IIdType id = Ids.newId(org.hl7.fhir.dstu3.model.Library.class, "123");
    assertTrue(id instanceof org.hl7.fhir.dstu3.model.IdType);
    assertEquals("Library", id.getResourceType());
    assertEquals("123", id.getIdPart());
}
Also used : IIdType(org.hl7.fhir.instance.model.api.IIdType) Test(org.junit.jupiter.api.Test)

Example 2 with Library

use of org.hl7.fhir.dstu3.model.Library in project cqf-ruler by DBCG.

the class LibrariesTest method libraryNoVersionReturnsNull.

@Test
public void libraryNoVersionReturnsNull() {
    Library library = new Library();
    String version = Libraries.getVersion(library);
    assertNull(version);
}
Also used : Library(org.hl7.fhir.r4.model.Library) Test(org.junit.jupiter.api.Test)

Example 3 with Library

use of org.hl7.fhir.dstu3.model.Library in project cqf-ruler by DBCG.

the class LibrariesTest method libraryWithVersionReturnsVersion.

@Test
public void libraryWithVersionReturnsVersion() {
    Library library = new Library().setVersion("1.0.0");
    String version = Libraries.getVersion(library);
    assertEquals("1.0.0", version);
}
Also used : Library(org.hl7.fhir.r4.model.Library) Test(org.junit.jupiter.api.Test)

Example 4 with Library

use of org.hl7.fhir.dstu3.model.Library in project cqf-ruler by DBCG.

the class LibrariesTest method libraryNoContentReturnsNull.

@Test
public void libraryNoContentReturnsNull() {
    Library library = new Library();
    byte[] content = Libraries.getContent(library, "text/cql");
    assertNull(content);
}
Also used : Library(org.hl7.fhir.r4.model.Library) Test(org.junit.jupiter.api.Test)

Example 5 with Library

use of org.hl7.fhir.dstu3.model.Library in project cqf-ruler by DBCG.

the class LibrariesTest method libraryMismatchedContentReturnsNull.

@Test
public void libraryMismatchedContentReturnsNull() {
    Library library = new Library();
    library.addContent().setContentType("text/cql").setData("test-data".getBytes());
    byte[] content = Libraries.getContent(library, "text/elm");
    assertNull(content);
}
Also used : Library(org.hl7.fhir.r4.model.Library) Test(org.junit.jupiter.api.Test)

Aggregations

Library (org.hl7.fhir.r4.model.Library)130 Test (org.junit.Test)85 Measure (org.hl7.fhir.r4.model.Measure)60 Patient (org.hl7.fhir.r4.model.Patient)41 Test (org.junit.jupiter.api.Test)34 ArrayList (java.util.ArrayList)32 HashMap (java.util.HashMap)32 Library (org.hl7.fhir.dstu3.model.Library)23 ByteArrayOutputStream (java.io.ByteArrayOutputStream)21 CapabilityStatement (org.hl7.fhir.r4.model.CapabilityStatement)21 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)21 StringType (org.hl7.fhir.r4.model.StringType)21 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)20 VersionedIdentifier (org.cqframework.cql.elm.execution.VersionedIdentifier)20 MeasureEvidenceOptions (com.ibm.cohort.engine.measure.evidence.MeasureEvidenceOptions)19 Bundle (org.hl7.fhir.r4.model.Bundle)19 Parameter (com.ibm.cohort.cql.evaluation.parameters.Parameter)18 CanonicalType (org.hl7.fhir.r4.model.CanonicalType)18 DateParameter (com.ibm.cohort.cql.evaluation.parameters.DateParameter)17 IntervalParameter (com.ibm.cohort.cql.evaluation.parameters.IntervalParameter)17