HS.FHIRServer.Util.Bundle
abstract class HS.FHIRServer.Util.Bundle
Helper Class that creates Bundle resources as directedMethod Inventory
Methods
classmethod AddBundleEntry(pBundle As %DynamicObject, pFullUrl As %String = "", pResource As %DynamicObject = "", pMode As %String = "") as %DynamicObject
AddBundleEntry adds a Bundle entry to an existing Bundle JSON Object
Input:
pFullUrl : [optional] Bundle entry fullUrl value.
pResource : [optional] The resource for this entry (if any) as a JSON Object
Returns: A Bundle.Entry JSON Object
Input:
classmethod CreateBundle(pIdentifier As %DynamicObject, pType As %String, pTotal As %String, ByRef pUrls, pSchema As HS.FHIRServer.Schema) as %DynamicObject
API
StartBundleStream writes to a stream object the first standard elements of a FHIR Bundle resource: type, total, link.
This method is intended to be used in conjunction with the methods AddBundleEntryToStream and EndBundleStream.
Input:
pIdentifier : A CodeableConcept JSON Object representing a unique identifier (Not Used Yet)
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"
Returns: A Bundle JSON Object
This method is intended to be used in conjunction with the methods AddBundleEntryToStream and EndBundleStream.
Input:
classmethod FinalizeBundle(pBundle As %DynamicObject) as %DynamicObject
@API Finalize the bundle by ensuring that the object does not contain
an empty 'entry' array.