Search in sources :

Example 1 with ValueSetFilter

use of com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter in project snow-owl by b2ihealthcare.

the class IncludeTest method validate.

private void validate(Include include) {
    assertEquals(new Uri("system"), include.getSystem());
    assertEquals("version", include.getVersion());
    assertEquals("valueSetUri", include.getValueSets().iterator().next().getUriValue());
    ValueSetFilter filter = include.getFilters().iterator().next();
    assertEquals(new Code("filterProperty"), filter.getProperty());
    assertEquals(FilterOperator.EQUALS.getCode(), filter.getOperator());
    assertEquals(new Code("1234567"), filter.getValue());
    ValueSetConcept concept = include.getConcepts().iterator().next();
    assertEquals("code", concept.getCode().getCodeValue());
    assertEquals("display", concept.getDisplay());
    Designation designation = concept.getDesignations().iterator().next();
    assertEquals("gb_en", designation.getLanguage());
    assertEquals("designationValue", designation.getValue());
    assertEquals("internal", designation.getUse().getCode().getCodeValue());
}
Also used : Designation(com.b2international.snowowl.fhir.core.model.Designation) ValueSetFilter(com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter) ValueSetConcept(com.b2international.snowowl.fhir.core.model.valueset.ValueSetConcept) Uri(com.b2international.snowowl.fhir.core.model.dt.Uri) Code(com.b2international.snowowl.fhir.core.model.dt.Code)

Example 2 with ValueSetFilter

use of com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter in project snow-owl by b2ihealthcare.

the class ValueSetFilterTest method deserialize.

@Test
public void deserialize() throws Exception {
    ValueSetFilter readFilter = objectMapper.readValue(objectMapper.writeValueAsString(filter), ValueSetFilter.class);
    validate(readFilter);
}
Also used : ValueSetFilter(com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Aggregations

ValueSetFilter (com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter)2 Designation (com.b2international.snowowl.fhir.core.model.Designation)1 Code (com.b2international.snowowl.fhir.core.model.dt.Code)1 Uri (com.b2international.snowowl.fhir.core.model.dt.Uri)1 ValueSetConcept (com.b2international.snowowl.fhir.core.model.valueset.ValueSetConcept)1 FhirTest (com.b2international.snowowl.fhir.tests.FhirTest)1 Test (org.junit.Test)1