use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery 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();
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery in project ipf by oehf.
the class GetSubmissionSetAndContentsQueryTransformerTest method testFromEbXMLEmpty.
@Test
public void testFromEbXMLEmpty() {
var result = new GetSubmissionSetAndContentsQuery();
transformer.fromEbXML(result, ebXML);
assertEquals(new GetSubmissionSetAndContentsQuery(), result);
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery in project ipf by oehf.
the class GetSubmissionSetAndContentsQueryTransformerTest method testToEbXMLEmpty.
@Test
public void testToEbXMLEmpty() {
transformer.toEbXML(new GetSubmissionSetAndContentsQuery(), ebXML);
assertEquals(0, ebXML.getSlots().size());
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery in project ipf by oehf.
the class GetSubmissionSetAndContentsQueryTransformerTest method testFromEbXMLNull.
@Test
public void testFromEbXMLNull() {
var result = new GetSubmissionSetAndContentsQuery();
transformer.fromEbXML(result, null);
assertEquals(new GetSubmissionSetAndContentsQuery(), result);
}
use of org.openehealth.ipf.commons.ihe.xds.core.requests.query.GetSubmissionSetAndContentsQuery in project MobileAccessGateway by i4mi.
the class IdRequestConverter method idToGetDocumentsQuery.
/**
* convert DocumentManifest id to GetSubmissionSetAndContentsQuery converter
*
* @param fhirHttpUri MAG defines uniqueId as FHIR id
* @return
*/
public QueryRegistry idToGetDocumentsQuery(@Header(value = "FhirHttpUri") String fhirHttpUri) {
if (fhirHttpUri != null && fhirHttpUri.contains("/")) {
boolean getLeafClass = true;
String uuid = fhirHttpUri.substring(fhirHttpUri.lastIndexOf("/") + 1);
GetSubmissionSetAndContentsQuery query = new GetSubmissionSetAndContentsQuery();
final QueryRegistry queryRegistry = new QueryRegistry(query);
query.setUuid(uuid);
queryRegistry.setReturnType((getLeafClass) ? QueryReturnType.LEAF_CLASS : QueryReturnType.OBJECT_REF);
return queryRegistry;
}
return null;
}
Aggregations