public BundleEntryComponent addEntry() { //3 BundleEntryComponent t = new BundleEntryComponent(); if (this.entry == null) this.entry = new ArrayList<BundleEntryComponent>(); this.entry.add(t); return t; }
protected String addReference(DomainResource r, String title, String id) throws Exception { if (r.getText() == null) r.setText(new Narrative()); if (r.getText().getDiv() == null) { r.getText().setStatus(NarrativeStatus.GENERATED); new NarrativeGenerator("", "", context).generate(r); } r.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); r.setId(id); feed.getEntry().add(new BundleEntryComponent().setResource(r)); return id; }
/** * Add all of the given resources to the given bundle. * * @param bundle - * @param resources - */ static private void addBundleResources( final Bundle bundle, final Collection<? extends Resource> resources ) { resources.stream() .map( r -> new Bundle.BundleEntryComponent().setResource( r ) ) .forEach( bundle::addEntry ); }
bundle.addEntry( new Bundle.BundleEntryComponent().setResource( composition ) ); bundle.addEntry( new Bundle.BundleEntryComponent().setResource( practitioner.getPractitioner() ) ); addBundleResources( bundle, noteSpecs.getSubjects() ); addBundleResources( bundle, sections );
Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT); for (IBaseResource resource : resourceList) { bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); if (src.hasFullUrl()) tgt.setFullUrl(src.getFullUrl()); tgt.setResource(convertResource(src.getResource())); tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); return tgt; }
public BundleEntryComponent copy() { BundleEntryComponent dst = new BundleEntryComponent(); copyValues(dst); if (link != null) { dst.link = new ArrayList<BundleLinkComponent>(); for (BundleLinkComponent i : link) dst.link.add(i.copy()); }; dst.fullUrl = fullUrl == null ? null : fullUrl.copy(); dst.resource = resource == null ? null : resource.copy(); dst.search = search == null ? null : search.copy(); dst.request = request == null ? null : request.copy(); dst.response = response == null ? null : response.copy(); return dst; }
public org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); tgt.setFullUrl(src.getFullUrl()); tgt.setResource(convertResource(src.getResource())); tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); return tgt; }
protected String addReference(DomainResource r, String title, String id) throws Exception { if (r.getText() == null) r.setText(new Narrative()); if (r.getText().getDiv() == null) { r.getText().setStatus(NarrativeStatus.GENERATED); new NarrativeGenerator("", "", context).generate(r); } r.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); r.setId(id); feed.getEntry().add(new BundleEntryComponent().setResource(r)); return id; }
Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT); for (IBaseResource resource : resourceList) { bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));
public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); copyElement(src, tgt); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); if (src.hasFullUrl()) tgt.setFullUrl(src.getFullUrl()); tgt.setResource(convertResource(src.getResource())); tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); return tgt; }
public org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.instance.model.Bundle.BundleEntryComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); tgt.setFullUrl(src.getFullUrl()); tgt.setResource(convertResource(src.getResource())); tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch())); tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest())); tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse())); return tgt; }