org.hl7.fhir.dstu3.model.Bundle.addEntry()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.hl7.fhir.dstu3.model.Bundle.addEntry()方法的一些代码示例,展示了Bundle.addEntry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.addEntry()方法的具体详情如下:
包路径:org.hl7.fhir.dstu3.model.Bundle
类名称:Bundle
方法名:addEntry

Bundle.addEntry介绍

暂无

代码示例

代码示例来源:origin: jamesagnew/hapi-fhir

  1. @Override
  2. public void addEntry(Bundle theBundle, Bundle.BundleEntryComponent theEntry) {
  3. theBundle.addEntry(theEntry);
  4. }

代码示例来源:origin: jamesagnew/hapi-fhir

  1. @Override
  2. public Bundle.BundleEntryComponent addEntry(Bundle theBundle) {
  3. return theBundle.addEntry();
  4. }

代码示例来源:origin: jamesagnew/hapi-fhir

  1. BundleEntryComponent entry = bundle.addEntry();
  2. entry.getRequest().setMethod(HTTPVerb.POST);
  3. entry.setResource((Resource) nextResource);
  4. continue;
  5. BundleEntryComponent entry = bundle.addEntry();
  6. entry.getRequest().setMethod(HTTPVerb.POST);
  7. entry.setResource((Resource) parsed);

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

  1. @Override
  2. public void addEntry(Bundle theBundle, Bundle.BundleEntryComponent theEntry) {
  3. theBundle.addEntry(theEntry);
  4. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

  1. @Override
  2. public Bundle.BundleEntryComponent addEntry(Bundle theBundle) {
  3. return theBundle.addEntry();
  4. }

代码示例来源:origin: jamesagnew/hapi-fhir

  1. public org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException {
  2. if (src == null || src.isEmpty())
  3. return null;
  4. org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
  5. copyResource(src, tgt);
  6. tgt.setType(convertBundleType(src.getType()));
  7. if (src.hasTotal())
  8. tgt.setTotal(src.getTotal());
  9. for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink())
  10. tgt.addLink(convertBundleLinkComponent(t));
  11. for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry())
  12. tgt.addEntry(convertBundleEntryComponent(t));
  13. tgt.setSignature(convertSignature(src.getSignature()));
  14. return tgt;
  15. }

代码示例来源:origin: jamesagnew/hapi-fhir

  1. public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2016may.model.Bundle src) throws FHIRException {
  2. if (src == null || src.isEmpty())
  3. return null;
  4. org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
  5. copyResource(src, tgt);
  6. tgt.setType(convertBundleType(src.getType()));
  7. if (src.hasTotal())
  8. tgt.setTotal(src.getTotal());
  9. for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink())
  10. tgt.addLink(convertBundleLinkComponent(t));
  11. for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent t : src.getEntry())
  12. tgt.addEntry(convertBundleEntryComponent(t));
  13. tgt.setSignature(convertSignature(src.getSignature()));
  14. return tgt;
  15. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. /**
  2. * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist
  3. */
  4. public BundleEntryComponent getEntryFirstRep() {
  5. if (getEntry().isEmpty()) {
  6. addEntry();
  7. }
  8. return getEntry().get(0);
  9. }

代码示例来源:origin: jamesagnew/hapi-fhir

  1. Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT);
  2. for (IBaseResource resource : resourceList) {
  3. bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. @Override
  2. public Base addChild(String name) throws FHIRException {
  3. if (name.equals("identifier")) {
  4. this.identifier = new Identifier();
  5. return this.identifier;
  6. }
  7. else if (name.equals("type")) {
  8. throw new FHIRException("Cannot call addChild on a primitive type Bundle.type");
  9. }
  10. else if (name.equals("total")) {
  11. throw new FHIRException("Cannot call addChild on a primitive type Bundle.total");
  12. }
  13. else if (name.equals("link")) {
  14. return addLink();
  15. }
  16. else if (name.equals("entry")) {
  17. return addEntry();
  18. }
  19. else if (name.equals("signature")) {
  20. this.signature = new Signature();
  21. return this.signature;
  22. }
  23. else
  24. return super.addChild(name);
  25. }

代码示例来源:origin: cerner/bunsen

  1. /**
  2. * Returns a bundle containing all resources in the dataset. This should be used
  3. * with caution for large datasets, since the returned bundle will include all data.
  4. *
  5. * @param dataset a dataset of FHIR resoruces
  6. * @return a bundle containing those resources.
  7. */
  8. public static Bundle toBundle(Dataset<? extends Resource> dataset) {
  9. List<Resource> resources = (List<Resource>) dataset.collectAsList();
  10. Bundle bundle = new Bundle();
  11. for (Resource resource : resources) {
  12. bundle.addEntry().setResource(resource);
  13. }
  14. return bundle;
  15. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. @Override
  2. public Base makeProperty(int hash, String name) throws FHIRException {
  3. switch (hash) {
  4. case -1618432855: return getIdentifier();
  5. case 3575610: return getTypeElement();
  6. case 110549828: return getTotalElement();
  7. case 3321850: return addLink();
  8. case 96667762: return addEntry();
  9. case 1073584312: return getSignature();
  10. default: return super.makeProperty(hash, name);
  11. }
  12. }

代码示例来源:origin: apache/ctakes

  1. bundle.addEntry( new Bundle.BundleEntryComponent().setResource( composition ) );
  2. bundle.addEntry( new Bundle.BundleEntryComponent().setResource( practitioner.getPractitioner() ) );
  3. addBundleResources( bundle, noteSpecs.getSubjects() );
  4. addBundleResources( bundle, sections );

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. BundleEntryComponent entry = myBundle.addEntry().setResource((Resource) next);
  2. Resource nextAsResource = (Resource) next;
  3. IIdType id = populateBundleEntryFullUrl(next, entry);
  4. BundleEntryComponent entry = myBundle.addEntry();
  5. entry.setResource((Resource) next).getSearch().setMode(SearchEntryMode.INCLUDE);
  6. populateBundleEntryFullUrl(next, entry);

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. BundleEntryComponent entry = myBundle.addEntry().setResource(next);
  2. if (next.getIdElement().hasBaseUrl()) {
  3. entry.setFullUrl(next.getId());
  4. BundleEntryComponent entry = myBundle.addEntry();
  5. entry.setResource((Resource) next).getSearch().setMode(SearchEntryMode.INCLUDE);
  6. if (next.getIdElement().hasBaseUrl()) {

代码示例来源:origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

  1. @Override
  2. public Object evaluate(Exchange exchange) {
  3. if (returnError) throw new InternalErrorException("Something went wrong");
  4. Bundle requestBundle = exchange.getIn().getBody(Bundle.class);
  5. Bundle responseBundle = new Bundle()
  6. .setType(Bundle.BundleType.TRANSACTIONRESPONSE)
  7. .setTotal(requestBundle.getTotal());
  8. for (Bundle.BundleEntryComponent requestEntry : requestBundle.getEntry()) {
  9. Bundle.BundleEntryResponseComponent response = new Bundle.BundleEntryResponseComponent()
  10. .setStatus("201 Created")
  11. .setLastModified(new Date())
  12. .setLocation(requestEntry.getResource().getClass().getSimpleName() + "/" + 4711);
  13. responseBundle.addEntry()
  14. .setResponse(response)
  15. .setResource(responseResource(requestEntry.getResource()));
  16. }
  17. return responseBundle;
  18. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter

  1. public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2016may.model.Bundle src) throws FHIRException {
  2. if (src == null || src.isEmpty())
  3. return null;
  4. org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
  5. copyResource(src, tgt);
  6. tgt.setType(convertBundleType(src.getType()));
  7. if (src.hasTotal())
  8. tgt.setTotal(src.getTotal());
  9. for (org.hl7.fhir.dstu2016may.model.Bundle.BundleLinkComponent t : src.getLink())
  10. tgt.addLink(convertBundleLinkComponent(t));
  11. for (org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryComponent t : src.getEntry())
  12. tgt.addEntry(convertBundleEntryComponent(t));
  13. tgt.setSignature(convertSignature(src.getSignature()));
  14. return tgt;
  15. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter

  1. public org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.instance.model.Bundle src) throws FHIRException {
  2. if (src == null || src.isEmpty())
  3. return null;
  4. org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
  5. copyResource(src, tgt);
  6. tgt.setType(convertBundleType(src.getType()));
  7. if (src.hasTotal())
  8. tgt.setTotal(src.getTotal());
  9. for (org.hl7.fhir.instance.model.Bundle.BundleLinkComponent t : src.getLink())
  10. tgt.addLink(convertBundleLinkComponent(t));
  11. for (org.hl7.fhir.instance.model.Bundle.BundleEntryComponent t : src.getEntry())
  12. tgt.addEntry(convertBundleEntryComponent(t));
  13. tgt.setSignature(convertSignature(src.getSignature()));
  14. return tgt;
  15. }

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

  1. for (IBaseResource nextBaseRes : theResources) {
  2. Resource next = (Resource) nextBaseRes;
  3. BundleEntryComponent nextEntry = myBundle.addEntry();

代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

  1. Bundle bundle = new Bundle().setType(Bundle.BundleType.DOCUMENT);
  2. for (IBaseResource resource : resourceList) {
  3. bundle.addEntry(new Bundle.BundleEntryComponent().setResource((Resource) resource));

相关文章