Search in sources :

Example 6 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code in project ipf by oehf.

the class FindPrescriptionsForDispenseQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindPrescriptionsForDispenseQueryTransformer();
    query = new FindPrescriptionsForDispenseQuery();
    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) FindPrescriptionsForDispenseQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindPrescriptionsForDispenseQuery) FindPrescriptionsForDispenseQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindPrescriptionsForDispenseQueryTransformer) 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 7 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code in project ipf by oehf.

the class FindPrescriptionsForValidationQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindPrescriptionsForValidationQueryTransformer();
    query = new FindPrescriptionsForValidationQuery();
    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) FindPrescriptionsForValidationQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindPrescriptionsForValidationQueryTransformer) FindPrescriptionsForValidationQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindPrescriptionsForValidationQuery) 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 8 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code in project ipf by oehf.

the class FindPrescriptionsQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindPrescriptionsQueryTransformer();
    query = new FindPrescriptionsQuery();
    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) FindPrescriptionsQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindPrescriptionsQuery) FindPrescriptionsQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindPrescriptionsQueryTransformer) 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 9 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code in project ipf by oehf.

the class FindSubmissionSetsQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new FindSubmissionSetsQueryTransformer();
    query = new FindSubmissionSetsQuery();
    query.setPatientId(new Identifiable("id1", new AssigningAuthority("uni1", "uniType1")));
    query.setContentTypeCodes(Arrays.asList(new Code("code1", null, "system1"), new Code("code2", null, "system2")));
    query.getSubmissionTime().setFrom("20150102030405");
    query.getSubmissionTime().setTo("20150102030406");
    query.setAuthorPerson("per'son1");
    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) FindSubmissionSetsQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindSubmissionSetsQuery) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) Code(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code) FindSubmissionSetsQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindSubmissionSetsQueryTransformer) Identifiable(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 10 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code in project ipf by oehf.

the class QueryListTest method testXmlSerializationWithCode.

@Test
public void testXmlSerializationWithCode() throws Exception {
    var innerList1 = Arrays.asList(new Code("Lisa", null, "Girlfriend scheme"), new Code("Jodi", null, "Girlfriend scheme"), new Code("Terry", null, "Girlfriend scheme"), new Code("Cassandra", null, "Girlfriend scheme"));
    var innerList2 = Arrays.asList(new Code("Brock", null, "Children scheme"), new Code("Thor", null, "Children scheme"), new Code("Venus", null, "Children scheme"));
    var queryList = new QueryList<Code>();
    queryList.getOuterList().add(innerList1);
    queryList.getOuterList().add(innerList2);
    var jaxbContext = JAXBContext.newInstance(QueryList.class, Code.class);
    checkSerialization(jaxbContext, "queryList", queryList);
}
Also used : Code(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code) Test(org.junit.jupiter.api.Test)

Aggregations

Code (org.openehealth.ipf.commons.ihe.xds.core.metadata.Code)18 BeforeEach (org.junit.jupiter.api.BeforeEach)12 AssigningAuthority (org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority)12 Identifiable (org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable)12 EbXMLFactory30 (org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30)11 QueryList (org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList)5 Test (org.junit.jupiter.api.Test)3 InvalidRequestException (ca.uhn.fhir.rest.server.exceptions.InvalidRequestException)2 ArrayList (java.util.ArrayList)2 AvailabilityStatus (org.openehealth.ipf.commons.ihe.xds.core.metadata.AvailabilityStatus)2 LocalizedString (org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString)2 QueryRegistry (org.openehealth.ipf.commons.ihe.xds.core.requests.QueryRegistry)2 DateParam (ca.uhn.fhir.rest.param.DateParam)1 DateRangeParam (ca.uhn.fhir.rest.param.DateRangeParam)1 ReferenceParam (ca.uhn.fhir.rest.param.ReferenceParam)1 StringParam (ca.uhn.fhir.rest.param.StringParam)1 TokenOrListParam (ca.uhn.fhir.rest.param.TokenOrListParam)1 TokenParam (ca.uhn.fhir.rest.param.TokenParam)1 Coding (org.hl7.fhir.r4.model.Coding)1 DateTimeType (org.hl7.fhir.r4.model.DateTimeType)1