Search in sources :

Example 1 with Code

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

the class GetSubmissionSetAndContentsQueryTransformerTest method setUp.

@BeforeEach
public void setUp() {
    transformer = new GetSubmissionSetAndContentsQueryTransformer();
    query = new GetSubmissionSetAndContentsQuery();
    query.setUuid("uuid1");
    query.setUniqueId("uniqueId1");
    query.setHomeCommunityId("home");
    var confidentialityCodes = new QueryList<Code>();
    confidentialityCodes.getOuterList().add(Arrays.asList(new Code("code10", null, "scheme10"), new Code("code11", null, "scheme11")));
    confidentialityCodes.getOuterList().add(Collections.singletonList(new Code("code12", null, "scheme12")));
    query.setConfidentialityCodes(confidentialityCodes);
    query.setFormatCodes(Arrays.asList(new Code("code13", null, "scheme13"), new Code("code14", null, "scheme14")));
    query.setDocumentEntryTypes(Arrays.asList(DocumentEntryType.STABLE, DocumentEntryType.ON_DEMAND));
    ebXML = new EbXMLFactory30().createAdhocQueryRequest();
}
Also used : EbXMLFactory30(org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30) GetSubmissionSetAndContentsQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.GetSubmissionSetAndContentsQueryTransformer) GetSubmissionSetAndContentsQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery) QueryList(org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList) Code(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code 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();
}
Also used : EbXMLFactory30(org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.EbXMLFactory30) FindDispensesQuery(org.openehealth.ipf.commons.ihe.xds.core.requests.query.FindDispensesQuery) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) FindDispensesQueryTransformer(org.openehealth.ipf.commons.ihe.xds.core.transform.requests.query.FindDispensesQueryTransformer) 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 3 with Code

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code 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 4 with Code

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

the class FindMedicationAdministrationsTransformerTest method setUp.

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

use of org.openehealth.ipf.commons.ihe.xds.core.metadata.Code 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)

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