Search in sources :

Example 1 with FindMedicationTreatmentPlansQuery

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

the class FindMedicationTreatmentPlansQueryTransformerTest method testFromEbXMLNull.

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

Example 2 with FindMedicationTreatmentPlansQuery

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

the class FindMedicationTreatmentPlansQueryTransformerTest method testToEbXMLEmpty.

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

Example 3 with FindMedicationTreatmentPlansQuery

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

the class FindMedicationTreatmentPlansQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindMedicationTreatmentPlansQueryTransformer();
    query = new FindMedicationTreatmentPlansQuery();
    query.setPatientId(new Identifiable("id1", new AssigningAuthority("uni1", "uniType1")));
    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();
}
Also used : EbXMLFactory30(org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30) FindMedicationTreatmentPlansQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindMedicationTreatmentPlansQuery) FindMedicationTreatmentPlansQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindMedicationTreatmentPlansQueryTransformer) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) 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 4 with FindMedicationTreatmentPlansQuery

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

the class FindMedicationTreatmentPlansQueryTransformerTest method testFromEbXMLEmpty.

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

Aggregations

FindMedicationTreatmentPlansQuery (org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindMedicationTreatmentPlansQuery)4 Test (org.junit.jupiter.api.Test)3 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 FindMedicationTreatmentPlansQueryTransformer (org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindMedicationTreatmentPlansQueryTransformer)1