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));
}
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));
}
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));
}
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)));
}
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());
}
Aggregations