use of org.hl7.fhir.r4b.model.Bundle.BundleLinkComponent in project org.hl7.fhir.core by hapifhir.
the class Bundle method copy.
public Bundle copy() {
Bundle dst = new Bundle();
copyValues(dst);
dst.identifier = identifier == null ? null : identifier.copy();
dst.type = type == null ? null : type.copy();
dst.total = total == null ? null : total.copy();
if (link != null) {
dst.link = new ArrayList<BundleLinkComponent>();
for (BundleLinkComponent i : link) dst.link.add(i.copy());
}
;
if (entry != null) {
dst.entry = new ArrayList<BundleEntryComponent>();
for (BundleEntryComponent i : entry) dst.entry.add(i.copy());
}
;
dst.signature = signature == null ? null : signature.copy();
return dst;
}
use of org.hl7.fhir.r4b.model.Bundle.BundleLinkComponent in project org.hl7.fhir.core by hapifhir.
the class GraphQLEngineTests method search.
@Override
public Bundle search(Object appInfo, String type, List<Argument> searchParams) throws FHIRException {
try {
Bundle bnd = new Bundle();
BundleLinkComponent bl = bnd.addLink();
bl.setRelation("next");
bl.setUrl("http://test.fhir.org/r4/Patient?_format=text/xhtml&search-id=77c97e03-8a6c-415f-a63d-11c80cf73f&&active=true&_sort=_id&search-offset=50&_count=50");
bl = bnd.addLink();
bl.setRelation("self");
bl.setUrl("http://test.fhir.org/r4/Patient?_format=text/xhtml&search-id=77c97e03-8a6c-415f-a63d-11c80cf73f&&active=true&_sort=_id&search-offset=0&_count=50");
BundleEntryComponent be = bnd.addEntry();
be.setFullUrl("http://hl7.org/fhir/Patient/example");
be.setResource(new XmlParser().parse(TestingUtilities.loadTestResourceStream("r4b", "patient-example.xml")));
be = bnd.addEntry();
be.setFullUrl("http://hl7.org/fhir/Patient/example");
be.setResource(new XmlParser().parse(TestingUtilities.loadTestResourceStream("r4b", "patient-example-xds.xml")));
be.getSearch().setScore(0.5);
be.getSearch().setMode(SearchEntryMode.MATCH);
bnd.setTotal(50);
return bnd;
} catch (Exception e) {
throw new FHIRException(e);
}
}
Aggregations