Search in sources :

Example 81 with Measure

use of org.hl7.fhir.r5.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureResourceFieldHandlerTest method setId.

@Test
public void setId() {
    String id = "id";
    Measure measure = new Measure();
    measureFieldHandler.setId(id, measure);
    Assert.assertEquals("Measure/" + id, measureFieldHandler.getId(measure));
}
Also used : Measure(org.hl7.fhir.r4.model.Measure) Test(org.junit.Test)

Example 82 with Measure

use of org.hl7.fhir.r5.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureResourceFieldHandlerTest method getVersion.

@Test
public void getVersion() {
    String version = "version";
    Measure measure = new Measure();
    measure.setVersion(version);
    Assert.assertEquals(version, measureFieldHandler.getVersion(measure));
}
Also used : Measure(org.hl7.fhir.r4.model.Measure) Test(org.junit.Test)

Example 83 with Measure

use of org.hl7.fhir.r5.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureResourceFieldHandlerTest method getName.

@Test
public void getName() {
    String name = "name";
    Measure measure = new Measure();
    measure.setName(name);
    Assert.assertEquals(name, measureFieldHandler.getName(measure));
}
Also used : Measure(org.hl7.fhir.r4.model.Measure) Test(org.junit.Test)

Example 84 with Measure

use of org.hl7.fhir.r5.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureResourceFieldHandlerTest method getIdentifiers.

@Test
public void getIdentifiers() {
    Identifier identifier = new Identifier().setSystem("system").setValue("value");
    Measure measure = new Measure();
    measure.addIdentifier(identifier);
    List<Identifier> measureIdentifiers = measureFieldHandler.getIdentifiers(measure);
    Assert.assertEquals(1, measureIdentifiers.size());
    Assert.assertTrue(identifier.equalsDeep(measureIdentifiers.get(0)));
}
Also used : Identifier(org.hl7.fhir.r4.model.Identifier) Measure(org.hl7.fhir.r4.model.Measure) Test(org.junit.Test)

Example 85 with Measure

use of org.hl7.fhir.r5.model.Measure in project quality-measure-and-cohort-service by Alvearie.

the class R4MeasureFhirServerResoureResolverTest method resolveByCanonicalUrl_noVersion.

@Test
public void resolveByCanonicalUrl_noVersion() throws IOException {
    String canonicalUrl = "http://fake.url.com/Measure/Measure1";
    mockRequest(WireMock::get, "/Measure\\?url=.*Measure.*Measure1", 200, IOUtils.resourceToString("/fhir/rest-test/MeasureBundle.json", StandardCharsets.UTF_8));
    FhirResourceResolver<Measure> resolver = R4FhirServerResourceResolverFactory.createMeasureResolver(client);
    Measure measure = resolver.resolveByCanonicalUrl(canonicalUrl);
    String expected = "Measure/Measure1-id";
    Assert.assertEquals(expected, measure.getId());
}
Also used : Measure(org.hl7.fhir.r4.model.Measure) WireMock(com.github.tomakehurst.wiremock.client.WireMock) Test(org.junit.Test)

Aggregations

Measure (org.hl7.fhir.r4.model.Measure)119 Test (org.junit.Test)97 Library (org.hl7.fhir.r4.model.Library)61 Patient (org.hl7.fhir.r4.model.Patient)45 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)44 HashMap (java.util.HashMap)24 ArrayList (java.util.ArrayList)23 DateParameter (com.ibm.cohort.cql.evaluation.parameters.DateParameter)22 IntervalParameter (com.ibm.cohort.cql.evaluation.parameters.IntervalParameter)22 Parameter (com.ibm.cohort.cql.evaluation.parameters.Parameter)22 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)21 ByteArrayOutputStream (java.io.ByteArrayOutputStream)21 MeasureEvidenceOptions (com.ibm.cohort.engine.measure.evidence.MeasureEvidenceOptions)20 CapabilityStatement (org.hl7.fhir.r4.model.CapabilityStatement)20 Test (org.junit.jupiter.api.Test)18 Extension (org.hl7.fhir.r4.model.Extension)15 StringType (org.hl7.fhir.r4.model.StringType)15 DatetimeParameter (com.ibm.cohort.cql.evaluation.parameters.DatetimeParameter)14 CanonicalType (org.hl7.fhir.r4.model.CanonicalType)14 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)14