Tabnine Logo
Bundle.getTotal
Code IndexAdd Tabnine to your IDE (free)

How to use
getTotal
method
in
org.hl7.fhir.dstu3.model.Bundle

Best Java code snippets using org.hl7.fhir.dstu3.model.Bundle.getTotal (Showing top 11 results out of 315)

origin: jamesagnew/hapi-fhir

public static org.hl7.fhir.dstu2016may.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Bundle tgt = new org.hl7.fhir.dstu2016may.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: jamesagnew/hapi-fhir

public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 if (src.hasSignature())
  tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: FirelyTeam/fhirstarters

  public static void main(String[] theArgs) {
   FhirContext ctx = FhirContext.forDstu3();
   IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu3");

   // Build a search and execute it
   Bundle response = client.search()
     .forResource(Patient.class)
     .where(Patient.NAME.matches().value("Test"))
     .and(Patient.BIRTHDATE.before().day("2014-01-01"))
     .count(100)
     .returnBundle(Bundle.class)
     .execute();

   // How many resources did we find?
   System.out.println("Responses: " + response.getTotal());

   // Print the ID of the first one
   System.out.println("First response ID: " + response.getEntry().get(0).getResource().getId());
  }
}
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

@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;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public static org.hl7.fhir.dstu2016may.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.dstu2016may.model.Bundle tgt = new org.hl7.fhir.dstu2016may.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-pixpdq

  @Test
  public void testSendManualPdqmWithCount() {

    Bundle page1 = sendManuallyWithCount(familyParameters(), 2);

    assertEquals(Bundle.BundleType.SEARCHSET, page1.getType());
    assertEquals(ResourceType.Bundle, page1.getResourceType());
    assertTrue(page1.hasEntry());
    assertEquals(3, page1.getTotal());
    assertEquals(2, page1.getEntry().size());

    Bundle page2 = nextPage(page1);
    assertEquals(Bundle.BundleType.SEARCHSET, page2.getType());
    assertEquals(ResourceType.Bundle, page2.getResourceType());
    assertTrue(page2.hasEntry());
    assertEquals(3, page2.getTotal());
    assertEquals(1, page2.getEntry().size());

  }
}
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

@Test
public void testSendIti66WithPatientReference() {
  Bundle result = sendManually(manifestPatientReferenceParameter());
  assertEquals(Bundle.BundleType.SEARCHSET, result.getType());
  assertEquals(ResourceType.Bundle, result.getResourceType());
  assertEquals(1, result.getTotal());
  DocumentManifest p = (DocumentManifest) result.getEntry().get(0).getResource();
  assertEquals("9bc72458-49b0-11e6-8a1c-3c1620524153", p.getIdElement().getIdPart());
}
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

@Test
public void testSendIti67WithPatientReference() {
  Bundle result = sendManually(referencePatientReferenceParameter());
  assertEquals(Bundle.BundleType.SEARCHSET, result.getType());
  assertEquals(ResourceType.Bundle, result.getResourceType());
  assertEquals(1, result.getTotal());
  DocumentReference p = (DocumentReference) result.getEntry().get(0).getResource();
  assertEquals("63ab1c29-4225-11e6-9b33-0050569b0094", p.getIdElement().getIdPart());
}
origin: ca.uhn.hapi.fhir/hapi-fhir-converter

public org.hl7.fhir.instance.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
 if (src == null || src.isEmpty())
  return null;
 org.hl7.fhir.instance.model.Bundle tgt = new org.hl7.fhir.instance.model.Bundle();
 copyResource(src, tgt);
 tgt.setType(convertBundleType(src.getType()));
 if (src.hasTotal())
  tgt.setTotal(src.getTotal());
 for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())
  tgt.addLink(convertBundleLinkComponent(t));
 for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())
  tgt.addEntry(convertBundleEntryComponent(t));
 if (src.hasSignature())
  tgt.setSignature(convertSignature(src.getSignature()));
 return tgt;
}
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

assertEquals(1, result.getTotal());
origin: org.openehealth.ipf.platform-camel/ipf-platform-camel-ihe-fhir-stu3-mhd

assertEquals(1, result.getTotal());
org.hl7.fhir.dstu3.modelBundlegetTotal

Popular methods of Bundle

  • getEntry
  • <init>
    Constructor
  • addEntry
  • getMeta
  • getType
  • setType
  • getLink
    Returns the #getLink() which matches a given BundleLinkComponent#getRelation(). If no link is found
  • setId
  • addLink
  • getEntryFirstRep
  • getResourceType
  • getSignature
  • getResourceType,
  • getSignature,
  • getTypeElement,
  • hasEntry,
  • setTotal,
  • castToCode,
  • castToIdentifier,
  • castToSignature,
  • castToUnsignedInt

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now