Class Bundle

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IAnyResource, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseBundle, org.hl7.fhir.instance.model.api.IBaseResource

public class Bundle extends Resource implements org.hl7.fhir.instance.model.api.IBaseBundle
A container for a collection of resources.
See Also:
Serialized Form
  • Field Details

    • identifier

      A persistent identifier for the bundle that won't change as a bundle is copied from server to server.
    • type

      Indicates the purpose of this bundle - how it is intended to be used.
    • timestamp

      The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
    • total

      If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
    • entry

      An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
    • signature

      protected Signature signature
      Digital Signature - base64 encoded. XML-DSig or a JWT.
    • SP_COMPOSITION

      public static final String SP_COMPOSITION
      Search parameter: composition

      Description: The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents
      Type: reference
      Path: Bundle.entry[0].resource

      See Also:
      Constant Field Values
    • COMPOSITION

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSITION
      Fluent Client search parameter constant for composition

      Description: The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents
      Type: reference
      Path: Bundle.entry[0].resource

    • INCLUDE_COMPOSITION

      public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSITION
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Bundle:composition".
    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter: identifier

      Description: Persistent identifier for the bundle
      Type: token
      Path: Bundle.identifier

      See Also:
      Constant Field Values
    • IDENTIFIER

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
      Fluent Client search parameter constant for identifier

      Description: Persistent identifier for the bundle
      Type: token
      Path: Bundle.identifier

    • SP_MESSAGE

      public static final String SP_MESSAGE
      Search parameter: message

      Description: The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents
      Type: reference
      Path: Bundle.entry[0].resource

      See Also:
      Constant Field Values
    • MESSAGE

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MESSAGE
      Fluent Client search parameter constant for message

      Description: The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents
      Type: reference
      Path: Bundle.entry[0].resource

    • INCLUDE_MESSAGE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_MESSAGE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Bundle:message".
    • SP_TIMESTAMP

      public static final String SP_TIMESTAMP
      Search parameter: timestamp

      Description: When the bundle was assembled
      Type: date
      Path: Bundle.timestamp

      See Also:
      Constant Field Values
    • TIMESTAMP

      public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP
      Fluent Client search parameter constant for timestamp

      Description: When the bundle was assembled
      Type: date
      Path: Bundle.timestamp

    • SP_TYPE

      public static final String SP_TYPE
      Search parameter: type

      Description: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification
      Type: token
      Path: Bundle.type

      See Also:
      Constant Field Values
    • TYPE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
      Fluent Client search parameter constant for type

      Description: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification
      Type: token
      Path: Bundle.type

  • Constructor Details

  • Method Details

    • getIdentifier

      Returns:
      identifier (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.)
    • hasIdentifier

      public boolean hasIdentifier()
    • setIdentifier

      public Bundle setIdentifier(Identifier value)
      Parameters:
      value - identifier (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.)
    • getTypeElement

      Returns:
      type (Indicates the purpose of this bundle - how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • hasTypeElement

      public boolean hasTypeElement()
    • hasType

      public boolean hasType()
    • setTypeElement

      Parameters:
      value - type (Indicates the purpose of this bundle - how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • getType

      Returns:
      Indicates the purpose of this bundle - how it is intended to be used.
    • setType

      public Bundle setType(Bundle.BundleType value)
      Parameters:
      value - Indicates the purpose of this bundle - how it is intended to be used.
    • getTimestampElement

      Returns:
      timestamp (The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
    • hasTimestampElement

      public boolean hasTimestampElement()
    • hasTimestamp

      public boolean hasTimestamp()
    • setTimestampElement

      Parameters:
      value - timestamp (The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
    • getTimestamp

      public Date getTimestamp()
      Returns:
      The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
    • setTimestamp

      public Bundle setTimestamp(Date value)
      Parameters:
      value - The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
    • getTotalElement

      Returns:
      total (If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
    • hasTotalElement

      public boolean hasTotalElement()
    • hasTotal

      public boolean hasTotal()
    • setTotalElement

      Parameters:
      value - total (If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
    • getTotal

      public int getTotal()
      Returns:
      If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
    • setTotal

      public Bundle setTotal(int value)
      Parameters:
      value - If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
    • getLink

      Returns:
      link (A series of links that provide context to this bundle.)
    • setLink

      Returns:
      Returns a reference to this for easy method chaining
    • hasLink

      public boolean hasLink()
    • addLink

    • addLink

    • getLinkFirstRep

      Returns:
      The first repetition of repeating field link, creating it if it does not already exist {3}
    • getEntry

      Returns:
      entry (An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).)
    • setEntry

      Returns:
      Returns a reference to this for easy method chaining
    • hasEntry

      public boolean hasEntry()
    • addEntry

    • addEntry

    • getEntryFirstRep

      Returns:
      The first repetition of repeating field entry, creating it if it does not already exist {3}
    • getSignature

      Returns:
      signature (Digital Signature - base64 encoded. XML-DSig or a JWT.)
    • hasSignature

      public boolean hasSignature()
    • setSignature

      public Bundle setSignature(Signature value)
      Parameters:
      value - signature (Digital Signature - base64 encoded. XML-DSig or a JWT.)
    • listChildren

      protected void listChildren(List<Property> children)
      Overrides:
      listChildren in class Resource
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getNamedProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      makeProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getTypesForProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class Resource
    • copy

      public Bundle copy()
      Specified by:
      copy in class Resource
    • copyValues

      public void copyValues(Bundle dst)
    • typedCopy

      protected Bundle typedCopy()
    • equalsDeep

      public boolean equalsDeep(Base other_)
      Overrides:
      equalsDeep in class Resource
    • equalsShallow

      public boolean equalsShallow(Base other_)
      Overrides:
      equalsShallow in class Resource
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class Resource
    • getResourceType

      Specified by:
      getResourceType in class Resource
    • getLink

      public Bundle.BundleLinkComponent getLink(String theRelation)
      Returns the link which matches a given relation. If no link is found which matches the given relation, returns null. If more than one link is found which matches the given relation, returns the first matching BundleLinkComponent.
      Parameters:
      theRelation - The relation, such as \"next\", or \"self. See the constants such as IBaseBundle.LINK_SELF and IBaseBundle.LINK_NEXT.
      Returns:
      Returns a matching BundleLinkComponent, or null
      See Also:
      IBaseBundle.LINK_NEXT, IBaseBundle.LINK_PREV, IBaseBundle.LINK_SELF
    • getLinkOrCreate

      Returns the link which matches a given relation. If no link is found which matches the given relation, creates a new BundleLinkComponent with the given relation and adds it to this Bundle. If more than one link is found which matches the given relation, returns the first matching BundleLinkComponent.
      Parameters:
      theRelation - The relation, such as \"next\", or \"self. See the constants such as IBaseBundle.LINK_SELF and IBaseBundle.LINK_NEXT.
      Returns:
      Returns a matching BundleLinkComponent, or null
      See Also:
      IBaseBundle.LINK_NEXT, IBaseBundle.LINK_PREV, IBaseBundle.LINK_SELF