Search in sources :

Example 1 with ValueSetConcept

use of com.b2international.snowowl.fhir.core.model.valueset.ValueSetConcept 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 ValueSetConcept

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

the class ValueSetConceptTest method deserialize.

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

Aggregations

ValueSetConcept (com.b2international.snowowl.fhir.core.model.valueset.ValueSetConcept)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 ValueSetFilter (com.b2international.snowowl.fhir.core.model.valueset.ValueSetFilter)1 FhirTest (com.b2international.snowowl.fhir.tests.FhirTest)1 Test (org.junit.Test)1