Skip to main content

HS.FHIRServer.Service

class HS.FHIRServer.Service extends %Library.RegisteredObject, HS.FHIRServer.API.Service, HS.FHIRServer.Util.Bundle, HS.HC.Util.Trace.Helper

Property Inventory

Method Inventory

Parameters

parameter INVOCATION = Queue;
parameter QUERYIDPARAM = queryId;
parameter QUERYPAGEPARAM = page;

Properties

property ConfigData as HS.FHIRServer.API.ConfigData [ Calculated ];
Inherited description: The Configuration Data controlling this service
property ErrorToHttp [ MultiDimensional , Transient ];
Property methods: ErrorToHttpDisplayToLogical(), ErrorToHttpGet(), ErrorToHttpIsValid(), ErrorToHttpLogicalToDisplay(), ErrorToHttpLogicalToOdbc(), ErrorToHttpNormalize(), ErrorToHttpSet()
property MetadataResource as %DynamicObject [ Transient ];
The MetadataResource being enforced by this instance
Property methods: MetadataResourceGet(), MetadataResourceGetObject(), MetadataResourceGetObjectId(), MetadataResourceGetSwizzled(), MetadataResourceIsValid(), MetadataResourceNewObject(), MetadataResourceSet(), MetadataResourceSetObject(), MetadataResourceSetObjectId(), MetadataResourceUnSwizzle()
property RestResourceMap as %DynamicObject [ Transient ];
Property methods: RestResourceMapGet(), RestResourceMapGetObject(), RestResourceMapGetObjectId(), RestResourceMapGetSwizzled(), RestResourceMapIsValid(), RestResourceMapNewObject(), RestResourceMapSet(), RestResourceMapSetObject(), RestResourceMapSetObjectId(), RestResourceMapUnSwizzle()
property RestServerMeta as %DynamicObject [ Transient ];
The Rest object that has mode='server'
Property methods: RestServerMetaGet(), RestServerMetaGetObject(), RestServerMetaGetObjectId(), RestServerMetaGetSwizzled(), RestServerMetaIsValid(), RestServerMetaNewObject(), RestServerMetaSet(), RestServerMetaSetObject(), RestServerMetaSetObjectId(), RestServerMetaUnSwizzle()
property RestUrlMap [ MultiDimensional , Transient ];
Property methods: RestUrlMapDisplayToLogical(), RestUrlMapGet(), RestUrlMapIsValid(), RestUrlMapLogicalToDisplay(), RestUrlMapLogicalToOdbc(), RestUrlMapNormalize(), RestUrlMapSet()
property Schema as HS.FHIRServer.Schema [ Calculated ];
The 'schema' node of the SchemaMetadata
property ServerHostname [ MultiDimensional , Transient ];
Cache in memory Server Hostnames so we can avoid duplicate calls to $ZU(54,13,hostName) when calculating base urls
Property methods: ServerHostnameDisplayToLogical(), ServerHostnameGet(), ServerHostnameIsValid(), ServerHostnameLogicalToDisplay(), ServerHostnameLogicalToOdbc(), ServerHostnameNormalize(), ServerHostnameSet()
property interactions as HS.FHIRServer.API.Interactions [ Calculated ];
Inherited description: The 'interactions' implementation for the service.
property resourceValidator [ Transient ];
Property methods: resourceValidatorDisplayToLogical(), resourceValidatorGet(), resourceValidatorIsValid(), resourceValidatorLogicalToDisplay(), resourceValidatorLogicalToOdbc(), resourceValidatorNormalize(), resourceValidatorSet()
property strategy as HS.FHIRServer.API.InteractionsStrategy [ Calculated ];
Inherited description: The 'StorageStrategy' implementation for the service.

Methods

method Batch(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
Batch processes a FHIR batch or transaction interaction. The payload of a batch or transaction interaction is a FHIR Bundle (with type = "bundle" or "tranaction" respectively.
method ConditionalPatch(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
method ConditionalUpdate(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
method ConfigDataGet() as HS.FHIRServer.API.ConfigData
method Configure(serviceInstance As HS.FHIRServer.ServiceInstance)
@API Called after the service is created to set the configuration. TODO: This could be a constructor parameter, if that works with Unit Testing and Mocking
method Create(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
method Delete(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
method DispatchRequest(pRequest As HS.FHIRServer.API.Data.Request, Output pResponse As HS.FHIRServer.API.Data.Response)
@API This is the main dispatcher for FHIR Requests.
classmethod ETagValue(pVersionId As %String) as %String
method ElementsStandard(pRequest As HS.FHIRServer.API.Data.Request, ByRef pResourceObj As %DynamicObject)
Standard handling of _elements as per http://hl7.org/fhir/search.html#elements. When query param _elements is present, include only the resource elements that are specified in _elements. An exception to that is 'meta', which must be included in order to indicate any redaction carried out because of _elements.
method GetBaseURLs(pRequest As HS.FHIRServer.API.Data.Request) as %List
Return a list of BaseURLs to use in relation to reference-type search parameters. This method ensures that the host name(s) that are in the returned BaseURLs are converted to lowercase, as part of case-insensitizing host name for the purposes of searching by references.
method GetCapabilityStatus(pResourceType As %String, pCapabilityItem As %String) as %String
classmethod GetFullRequestURL(pRequest As HS.FHIRServer.API.Data.Request)
classmethod GetPreferHeader(pRequest As HS.FHIRServer.API.Data.Request, pPreferenceType As %String) as %String
classmethod GetPrivFromRequest(pRequest As HS.FHIRServer.API.Data.Request) as %String
Use data in the FHIR request object to get the string of required SMART on FHIR v2 permissions.
classmethod GetRequestURLNoQuery(pRequest As HS.FHIRServer.API.Data.Request)
method History(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
method IsCapabilitySupported(pResourceType As %String, pCapabilityItem As %String, pDefault As %Boolean) as %Boolean
API GetResourceCapabilityItem examines the specified Conformance/CapabilityStatement for the the specified resource type and returns the value for the specified "capability item".

Input:
  • pResourceType : (required) FHIR resource type.
  • pCapabilityItem : (required) Resource type capability item (examples: "conditionalCreate", "readHistory").
  • pDefault : (required) Value to return if the specification is not present
  • method IsPreferStrictHandling(pRequest As HS.FHIRServer.API.Data.Request) as %Boolean
    classmethod IsRequestAuthenticated()
    method Metadata(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
    Handle the /metadata request, aka capabilities interaction, per http://hl7.org/fhir/http.html#capabilities.
    method Operation(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
    method Patch(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response, isConditional As %Boolean = 0)
    method Read(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response)
    Note that both the "read" and "vread" interactions are handled by this method. The only difference between the requests is that vread specifies a version, whereas read does not and is understood to be requesting the current version.
    method RequireAllowedResourceInteraction(pResourceType As %String, pInteraction As %String, pInteractionLevel2 As %String = "")
    RequireAllowedResourceInteraction validates that the specified interaction is permitted by the Conformance/CapabilityStatement server definition.
    From FHIR Spec: In general, if an instance fails the constraints documented in the CapabilityStatement then the response should be a 400
    Input:
  • pInteraction : (required) FHIR RESTful interaction.
  • pInteraction2 : (required) A more specific interaction (e.g. history, history-instance). Return: void, but throws if interaction is not allowed
  • method RequireAllowedSystemInteraction(pInteraction As %String) as %Boolean
    RequireAllowedSystemInteraction validates that the specified interaction is permitted by the Conformance/CapabilityStatement server definition.
    From FHIR Spec: In general, if an instance fails the constraints documented in the CapabilityStatement then the response should be a 400

    Input:
  • pInteraction : (required) FHIR RESTful interaction. Return: void, but throws if interaction is not allowed
  • method RequirePayload(pRequest As HS.FHIRServer.API.Data.Request) as %DynamicObject
    classmethod RequireValidId(pId) as %String
    method SchemaGet() as HS.FHIRServer.Schema
    method SetStatusResponse(pResponse As HS.FHIRServer.API.Data.Response, tStatus As %Status)
    method StreamToJSON(pStream As %Stream.Object, pContentCode As %String) as %DynamicObject
    @API StreamToJSON is a helper method intended for use by callers of the service to convert an input stream to a JSON object.
    method Summary(pSummary As %String, ByRef pResource As %DynamicObject)
    method SummaryData(ByRef pResource As %DynamicObject) as %DynamicObject
    Apply the _summary=data filter to a resource - Remove the text element
    method SummaryText(ByRef pResource As %DynamicObject)
    Apply the _summary=text filter to a resource Return only the "text" element, the 'id' element, the 'meta' element, and only top-level mandatory elements
    method Update(pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response, isConditional As %Boolean = 0)
    classmethod findItemByProperty(array As %DynamicArray, propName As %String, propValue)
    method initRestUrlMap()
    Map From (verb, pattern) pattern key: h:_history, s:_search, v:_validate, m:metadata, *:*, +:, -:, $: To: (operationName, targetFields, handlerMethod) targetFields key: c:Container, t:Type, i:Id, *:Type, -: $LB position 4 is IRIS security %resource privilege. Also used to derive required SMART on FHIR v1 permission. $LB position 5 is required SMART on FHIR v2 permission.
    method interactionsGet() as HS.FHIRServer.API.Interactions
    method strategyGet() as HS.FHIRServer.API.InteractionsStrategy

    Inherited Members

    Inherited Properties

    Inherited Methods

    FeedbackOpens in a new tab