use of org.hl7.fhir.r4b.model.Identifier in project quality-measure-and-cohort-service by Alvearie.
the class R4LibraryDependencyGathererTest method library_with_no_valid_data___returns_nothing.
@Test
public void library_with_no_valid_data___returns_nothing() {
String libraryId = "lib";
Library lib = new Library();
withIdentifiers(lib, libraryId, null, null);
MapFhirResourceResolver<Library, Identifier> resourceResolver = getMapFhirResourceResolver();
resourceResolver.addResource(lib);
R4LibraryDependencyGatherer dependencyGatherer = new R4LibraryDependencyGatherer(resourceResolver);
List<Library> libraries = dependencyGatherer.gatherForLibraryId(libraryId);
Assert.assertTrue(libraries.isEmpty());
}
use of org.hl7.fhir.r4b.model.Identifier in project quality-measure-and-cohort-service by Alvearie.
the class R4TranslatingLibraryLoaderTest method load_validCql.
@Test
public void load_validCql() throws IOException {
Library library = new Library();
withIdentifiers(library, NAME, VERSION);
withContent(library, "/cql/basic/Test-1.0.0.cql", "text/cql");
R4TranslatingLibraryLoader loader = getLoader(getLibraryResolver(NAME, VERSION, library));
VersionedIdentifier identifier = new VersionedIdentifier().withId(NAME).withVersion(VERSION);
org.cqframework.cql.elm.execution.Library actual = loader.load(identifier);
Assert.assertEquals(identifier, actual.getIdentifier());
Assert.assertEquals(4, actual.getStatements().getDef().size());
}
use of org.hl7.fhir.r4b.model.Identifier in project quality-measure-and-cohort-service by Alvearie.
the class R4LibraryResourceFieldHandlerTest method getIdentifiers.
@Test
public void getIdentifiers() {
Identifier identifier = new Identifier().setSystem("system").setValue("value");
Library library = new Library();
library.addIdentifier(identifier);
List<Identifier> libraryIdentifiers = libraryFieldHandler.getIdentifiers(library);
Assert.assertEquals(1, libraryIdentifiers.size());
Assert.assertTrue(identifier.equalsDeep(libraryIdentifiers.get(0)));
}
use of org.hl7.fhir.r4b.model.Identifier in project quality-measure-and-cohort-service by Alvearie.
the class R4MeasureResourceFieldHandlerTest method getIdentifierValue.
@Test
public void getIdentifierValue() {
String identifierValue = "value";
Identifier identifier = new Identifier().setValue(identifierValue);
Assert.assertEquals(identifierValue, measureFieldHandler.getIdentifierValue(identifier));
}
use of org.hl7.fhir.r4b.model.Identifier 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)));
}
Aggregations