HS.FHIRServer.API.OperationHandler

abstract class HS.FHIRServer.API.OperationHandler

This is a base class for the implementation of FHIR $Operation support. A programmer May add operations to a FHIR endpoint by subclassing this class and implementing an appropriately named ClassMethod for each supported $Operation. To add a handler for an $Operation, add a ClassMethod to a subclass of this class with a 3-argument signature:
(pService As HS.FHIRServer.API.Service, pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response) and a specialized method name as follows:
The Handler Method Name must be of the form: "FHIR[Scope]Op[OperationName] where [Scope] is:
[Scope] "System" to handle "/$operation" REST requests
[Scope] "Type" to handle "/type/$operation" REST requests
[Scope] "Instance" to handle "/type/id/$operation" REST requests
and [OperationName] is the name of the operation specified in the request URL, but with the '$' removed and the first letter capitalized.
for example: The request "/Patient/1234/$everything" will be dispatch to a method named "FHIRInstanceOpEverything"

Method Inventory

Methods

classmethod AddSupportedOperations(pMap As %DynamicObject) [ Language = objectscript ]
@API Enumerate the name and url of each Operation supported by this class
classmethod ProcessOperation(pService As HS.FHIRServer.API.Service, pRequest As HS.FHIRServer.API.Data.Request, pResponse As HS.FHIRServer.API.Data.Response) [ Language = objectscript ]
@API This is the entry point, called from the FHIR Service instance. The default processing will further dispatch the request to a ClassMethod in this class to process the requested $Operation (see class documentation for details)
Note, This method may be overridden if the programmer would rather not use the provided dispatch mechanism.

Subclasses

Feedback