@Override public boolean enrichAuditDatasetFromResponse(Iti65AuditDataset auditDataset, Object response, AuditContext auditContext) { Bundle bundle = (Bundle) response; // Extract DocumentManifest (UU)IDs from the response bundle for auditing bundle.getEntry().stream() .map(Bundle.BundleEntryComponent::getResponse) .filter(Objects::nonNull) .filter(r -> r.getLocation() != null && r.getLocation().startsWith("DocumentManifest")) .findFirst() .ifPresent(r -> auditDataset.setDocumentManifestUuid(r.getLocation())); return super.enrichAuditDatasetFromResponse(auditDataset, response, auditContext); }
@Override public List<IBaseResource> toListOfResources() { ArrayList<IBaseResource> retVal = new ArrayList<IBaseResource>(); for (BundleEntryComponent next : myBundle.getEntry()) { if (next.getResource() != null) { retVal.add(next.getResource()); } else if (next.getResponse().getLocationElement().isEmpty() == false) { IdType id = new IdType(next.getResponse().getLocation()); String resourceType = id.getResourceType(); if (isNotBlank(resourceType)) { IAnyResource res = (IAnyResource) myContext.getResourceDefinition(resourceType).newInstance(); res.setId(id); retVal.add(res); } } } return retVal; }
public static org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent(); copyElement(src, tgt); tgt.setStatus(src.getStatus()); if (src.hasLocation()) tgt.setLocation(src.getLocation()); if (src.hasEtag()) tgt.setEtag(src.getEtag()); if (src.hasLastModified()) tgt.setLastModified(src.getLastModified()); return tgt; }
public org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent(); copyElement(src, tgt); tgt.setStatus(src.getStatus()); tgt.setLocation(src.getLocation()); tgt.setEtag(src.getEtag()); tgt.setLastModified(src.getLastModified()); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryResponseComponent(); copyElement(src, tgt); tgt.setStatus(src.getStatus()); if (src.hasLocation()) tgt.setLocation(src.getLocation()); if (src.hasEtag()) tgt.setEtag(src.getEtag()); if (src.hasLastModified()) tgt.setLastModified(src.getLastModified()); return tgt; }
public org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.instance.model.Bundle.BundleEntryResponseComponent(); copyElement(src, tgt); tgt.setStatus(src.getStatus()); tgt.setLocation(src.getLocation()); tgt.setEtag(src.getEtag()); tgt.setLastModified(src.getLastModified()); return tgt; }