@Override public Bundle createBundle(String theBundleType) { Bundle resp = new Bundle(); try { resp.setType(Bundle.BundleType.fromCode(theBundleType)); } catch (FHIRException theE) { throw new InternalErrorException("Unknown bundle type: " + theBundleType); } return resp; }
bundle.setType(BundleType.TRANSACTION);
public org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle(); copyResource(src, tgt); tgt.setType(convertBundleType(src.getType())); if (src.hasTotal()) tgt.setTotal(src.getTotal()); for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t)); tgt.setSignature(convertSignature(src.getSignature())); return tgt; }
public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2016may.model.Bundle src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle(); copyResource(src, tgt); tgt.setType(convertBundleType(src.getType())); if (src.hasTotal()) tgt.setTotal(src.getTotal()); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t)); tgt.setSignature(convertSignature(src.getSignature())); return tgt; }
Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT); for (IBaseResource resource : resourceList) { bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));
/** * {@inheritDoc} */ @Override public Bundle createResource( final JCas jCas, final TOP nullified, final FhirPractitioner practitioner, final FhirNoteSpecs noteSpecs ) { final Bundle bundle = new Bundle(); final String noteTime = DATE_FORMAT.format( new Date() ); bundle.setId( FhirElementFactory.createId( jCas, CTAKES_BUNDLE_ID, noteTime ) ); // The bundle is a collection; created for ease of distribution. bundle.setType( Bundle.BundleType.COLLECTION ); return bundle; }
@Override public Bundle createBundle(String theBundleType) { Bundle resp = new Bundle(); try { resp.setType(Bundle.BundleType.fromCode(theBundleType)); } catch (FHIRException theE) { throw new InternalErrorException("Unknown bundle type: " + theBundleType); } return resp; }
protected Bundle thisSucks() { Bundle bundle = new Bundle().setType(Bundle.BundleType.TRANSACTION); bundle.getMeta().addProfile("http://thissucks.com"); return bundle; }
@Override public Object evaluate(Exchange exchange) { if (returnError) throw new InternalErrorException("Something went wrong"); Bundle requestBundle = exchange.getIn().getBody(Bundle.class); Bundle responseBundle = new Bundle() .setType(Bundle.BundleType.TRANSACTIONRESPONSE) .setTotal(requestBundle.getTotal()); for (Bundle.BundleEntryComponent requestEntry : requestBundle.getEntry()) { Bundle.BundleEntryResponseComponent response = new Bundle.BundleEntryResponseComponent() .setStatus("201 Created") .setLastModified(new Date()) .setLocation(requestEntry.getResource().getClass().getSimpleName() + "/" + 4711); responseBundle.addEntry() .setResponse(response) .setResource(responseResource(requestEntry.getResource())); } return responseBundle; }
public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2016may.model.Bundle src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle(); copyResource(src, tgt); tgt.setType(convertBundleType(src.getType())); if (src.hasTotal()) tgt.setTotal(src.getTotal()); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t)); tgt.setSignature(convertSignature(src.getSignature())); return tgt; }
public org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle(); copyResource(src, tgt); tgt.setType(convertBundleType(src.getType())); if (src.hasTotal()) tgt.setTotal(src.getTotal()); for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t)); tgt.setSignature(convertSignature(src.getSignature())); return tgt; }
Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT); for (IBaseResource resource : resourceList) { bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));
protected Bundle provideAndRegister() throws Exception { Bundle bundle = new Bundle().setType(Bundle.BundleType.TRANSACTION); bundle.getMeta().addProfile(Iti65Constants.ITI65_PROFILE);