Skip to main content

HS.FHIRServer.Util.Bundle

abstract class HS.FHIRServer.Util.Bundle

Helper Class that creates Bundle resources as directed

Method Inventory

Methods

classmethod AddBundleEntry(pBundle As %DynamicObject, pFullUrl As %String = "", pResource As %DynamicObject = "", pMode As %String = "") as %DynamicObject
@API
AddBundleEntry adds a Bundle entry to an existing Bundle %DynamicObject.

Input:
  • pFullUrl : [optional] Bundle entry fullUrl value.
  • pResource : [optional] The resource for this entry (if any) as a JSON Object.

    Returns: A Bundle.Entry as %DynamicObject.
  • classmethod CreateBundle(pIdentifier As %DynamicObject, pType As %String, pTotal As %String, ByRef pUrls, pSchema As HS.FHIRServer.Schema) as %DynamicObject
    @API
    CreateBundle creates a %DynamicObject with the first standard elements of a FHIR Bundle resource: resourceType, id, type, timestamp, total, link, entry.
    This method is intended to be used in conjunction with the methods AddBundleEntry and FinalizeBundle.

    Input:
  • pIdentifier : An Identifier (http://hl7.org/fhir/r4/datatypes.html#Identifier) %DynamicObject representing a unique identifier.
  • pType : (required) Bundle type.
  • pTotal : If search, the total number of matches.
  • pUrls : A Multidimensional Array mapping link relationship to URL pUrls(relationship) = url. Possible relationship values are: "first", "previous", "self", "next", and "last".
  • pSchema : The FHIR schema object.

    Returns: A FHIR Bundle resource as a %DynamicObject.
  • classmethod FinalizeBundle(pBundle As %DynamicObject) as %DynamicObject
    @API
    Finalize the bundle by ensuring that the object does not contain an empty 'entry' array.

    Input:
  • pBundle: %DynamicObject containing a FHIR Bundle resource.

    Returns the modified Bundle resource as %DynamicObject.
  • Subclasses

    FeedbackOpens in a new tab