Search in sources :

Example 1 with FindFoldersQuery

use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery in project ipf by oehf.

the class FindFoldersQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindFoldersQueryTransformer();
    query = new FindFoldersQuery();
    query.setPatientId(new Identifiable("id1", new AssigningAuthority("uni1", "uniType1")));
    query.getLastUpdateTime().setFrom("20150102030405");
    query.getLastUpdateTime().setTo("20150102030406");
    var codes = new QueryList<Code>();
    codes.getOuterList().add(Arrays.asList(new Code("code7", null, "scheme7"), new Code("code8", null, "scheme8")));
    codes.getOuterList().add(Collections.singletonList(new Code("code9", null, "scheme9")));
    query.setCodes(codes);
    query.setStatus(Arrays.asList(AvailabilityStatus.APPROVED, AvailabilityStatus.SUBMITTED));
    query.setHomeCommunityId("12.21.41");
    ebXML = new EbXMLFactory30().createAdhocQueryRequest();
}
Also used : EbXMLFactory30(org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30) FindFoldersQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindFoldersQueryTransformer) FindFoldersQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) QueryList(org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList) Code(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code) Identifiable(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with FindFoldersQuery

use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery in project ipf by oehf.

the class FindFoldersQueryTransformerTest method testToEbXMLEmpty.

@Test
public void testToEbXMLEmpty() {
    transformer.toEbXML(new FindFoldersQuery(), ebXML);
    assertEquals(0, ebXML.getSlots().size());
}
Also used : FindFoldersQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery) Test(org.junit.jupiter.api.Test)

Example 3 with FindFoldersQuery

use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery in project ipf by oehf.

the class FindFoldersQueryTransformerTest method testFromEbXMLNull.

@Test
public void testFromEbXMLNull() {
    var result = new FindFoldersQuery();
    transformer.fromEbXML(result, null);
    assertEquals(new FindFoldersQuery(), result);
}
Also used : FindFoldersQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery) Test(org.junit.jupiter.api.Test)

Aggregations

FindFoldersQuery (org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindFoldersQuery)3 Test (org.junit.jupiter.api.Test)2 BeforeEach (org.junit.jupiter.api.BeforeEach)1 EbXMLFactory30 (org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30)1 AssigningAuthority (org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority)1 Code (org.openehealth.ipf.commons.ihe.xds.core.metadata.Code)1 Identifiable (org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable)1 QueryList (org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList)1 FindFoldersQueryTransformer (org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindFoldersQueryTransformer)1