use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDispensesQuery in project ipf by oehf.
the class FindDispensesQueryTransformerTest method setUp.
@BeforeEach
public void setUp() {
transformer = new FindDispensesQueryTransformer();
query = new FindDispensesQuery();
query.setPatientId(new Identifiable("id3", new AssigningAuthority("uni3", "uniType3")));
query.setHomeCommunityId("12.21.41");
query.setConfidentialityCodes(Arrays.asList(new Code("code10", null, "scheme10"), new Code("code11", null, "scheme11")));
query.getCreationTime().setFrom("1980");
query.getCreationTime().setTo("1981");
query.getServiceStartTime().setFrom("1982");
query.getServiceStartTime().setTo("1983");
query.getServiceStopTime().setFrom("1984");
query.getServiceStopTime().setTo("1985");
query.setStatus(Arrays.asList(AvailabilityStatus.APPROVED, AvailabilityStatus.SUBMITTED));
query.setUuids(Arrays.asList("uuid1", "uuid2"));
query.setUniqueIds(Arrays.asList("uniqueId1", "uniqueId2"));
query.setPracticeSettingCodes(Arrays.asList(new Code("code3", null, "scheme3"), new Code("code4", null, "scheme4")));
query.setHealthcareFacilityTypeCodes(Arrays.asList(new Code("code5", null, "scheme5"), new Code("code6", null, "scheme6")));
query.setEventCodes(Arrays.asList(new Code("code7", null, "scheme7"), new Code("code8", null, "scheme8")));
query.setAuthorPersons(Arrays.asList("per'son1", "person2"));
ebXML = new EbXMLFactory30().createAdhocQueryRequest();
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDispensesQuery in project ipf by oehf.
the class FindDispensesQueryTransformerTest method testToEbXMLEmpty.
@Test
public void testToEbXMLEmpty() {
transformer.toEbXML(new FindDispensesQuery(), ebXML);
assertEquals(0, ebXML.getSlots().size());
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDispensesQuery in project ipf by oehf.
the class FindDispensesQueryTransformerTest method testFromEbXMLNull.
@Test
public void testFromEbXMLNull() {
var result = new FindDispensesQuery();
transformer.fromEbXML(result, null);
assertEquals(new FindDispensesQuery(), result);
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDispensesQuery in project ipf by oehf.
the class FindDispensesQueryTransformerTest method testFromEbXMLEmpty.
@Test
public void testFromEbXMLEmpty() {
var result = new FindDispensesQuery();
transformer.fromEbXML(result, ebXML);
assertEquals(new FindDispensesQuery(), result);
}
Aggregations