use of com.b2international.snowowl.fhir.core.model.valueset.ExpandValueSetRequest in project snow-owl by b2ihealthcare.
the class ExpandValueSetRequestDeserializationTest method deserializationTest.
@Test
public void deserializationTest() throws Exception {
ExpandValueSetRequest request = ExpandValueSetRequest.builder().url("http://valueset.url").valueSetVersion("20190101").contextDirection("direction-code").count(1).addDesignation("uk_en").addDesignation("us_en").date(TEST_DATE_STRING).filter("filter").build();
Json json = new Parameters.Json(request);
// System.out.println("JSON params:" + json);
Fhir fhirParameters = new Parameters.Fhir(request);
// fhirParameters.getParameters().forEach(p -> System.out.println(p));
Optional<Parameter> findFirst = fhirParameters.getParameters().stream().filter(p -> {
Uri url = (Uri) p.getValue();
return url.getUriValue().equals("http://valueset.url");
}).findFirst();
assertTrue(findFirst.isPresent());
// Fhir fhir = new Parameters.Fhir(json.parameters());
// printPrettyJson(fhir);
// String fhirJson = objectMapper.writeValueAsString(fhir);
// System.out.println("This is the JSON request from the client: " + fhirJson);
}
Aggregations