Skip to main content
AskMe (beta)
Loading icon

HS.BulkFHIR.API.FetchAdapter

class HS.BulkFHIR.API.FetchAdapter extends HS.BulkFHIR.API.AdapterBase

Base class for all fetch adapters. Subclasses must extend this class, uniquely identify themselves, and implement the abstract methods. Then they may be used for fetch tasks within a BFC.

Method Inventory

Parameters

parameter supportsGroupExport;
Flag which indicates whether the implementation of this adapter supports group export. If false, and a configuration tries using this adapter with that operation requested, will throw an error
parameter supportsPatientExport;
Flag which indicates whether the implementation of this adapter supports patient export. If false, and a configuration tries using this adapter with that operation requested, will throw an error
parameter supportsSystemExport;
Flag which indicates whether the implementation of this adapter supports system export. If false, and a configuration tries using this adapter with that operation requested, will throw an error

Methods

abstract classmethod Cancel(pSession As HS.BulkFHIR.Session)
Cancels a $export operation that's currently in progress. This overrideable is expected to signal the process working on the $export operation and quiesce it as soon as possible, with the expectation that the job will not be resumed in the future. @Input sessionId session id for the export operation to be canceled
abstract classmethod Finish(pSession As HS.BulkFHIR.Session)
Optional - When export finishes any additional steps the fetch adapter may need to complete
classmethod GetSourceSystem(pSession As HS.BulkFHIR.Session) as %String
Generate a unique identifier for a fetch config. Currently each fetch configuration has an "endpoint_url". Using that url, generate a unique identifier (guid) for the source data. If at some point we supported a file fetch adapter, then the file directory could be the url.
classmethod GetSourceSystemGUID(pURL As %String) as %String
Using the pURL parameter generate a system GUID. It is possible to update the service registry to have multiple urls pointing to the same GUID, by updating the service registry with the UI
classmethod GetSupportedParams(pType As %String) as %List
(Optional overrideable) Method to return a %LIST of supported parameters for the $export operation. where pType is the $export request type. must be "patient", "group", or "system" By default, we support _output, _since (Bulk Data IG version 2.0.0 required parameters) and one optional, _type If wish to support all parameters (i.e. no parameter validation), return ""
abstract classmethod GroupSearchParameters(pConfig As HS.BulkFHIR.API.Data.Config) as %DynamicArray
Provides an array of supported search parameters for the Group resource. This overrideable will be used to construct the CapabilityStatement for the BFC. @Input pConfig BulkFHIR configuration object @Returns a %DynamicArray with a structure compatible with the field CapabilityStatement.rest.resource.searchParam.
classmethod Initialize(pBFCconfig As HS.BulkFHIR.API.Data.Config)
(Optional overrideable) Called when the BFC is first configured and again if that configuration is changed, this method may be used to do any implementation-specific setup.
abstract classmethod OnRecover(pSession As HS.BulkFHIR.Session)
Optional - On a system restart for example the session could be in-progress (due to system failure). If implemented execute any code to help recover.
abstract classmethod OnStart(pSession As HS.BulkFHIR.Session, pRestart As %Boolean)
Optional - When export is starting any additional steps storage may need to complete @Input pSession session object being started pRestart will be 0 on first start or 1 during resume
classmethod OperationDocumentation() as %String
(Optional overrideable) Returns a string in markdown syntax which will be displayed next to all supported operations in the CapabilityStatement.
abstract classmethod Pause(pSession As HS.BulkFHIR.Session)
Pauses a $export operation that's currently in progress. This overrideable is expected to signal the process working on the $export operation and quiesce it as soon as possible, with the expectation that the job may be resumed in the future. @Input sessionId session id for the export operation to be paused
abstract classmethod Purge(pSession As HS.BulkFHIR.Session)
Optional - purge any existing storage for pSession.%Id(), which is called when a session expires, and from a session cancellation
abstract classmethod Read(pConfig As HS.BulkFHIR.API.Data.Config, request As HS.FHIRServer.API.Data.Request, ByRef response As HS.FHIRServer.API.Data.Response)
Executes a FHIR read request (currently only Group resources). This overrideable is expected to be able to process a FHIR read request against the underlying clinical data store, and return a resource, if one exists @Input pConfig BulkFHIR configuration object @Input request FHIR request object representing a read @Output response FHIR response object containing the results of the read
abstract classmethod SaveCapabilityStatement(pBFCConfig As HS.BulkFHIR.API.Data.Config) as %String
Returns a json string of a FHIR capability statement. If defined, the BFC endpoint's capability statement will be derived from this method return value. If undefined, the BFC endpoint will generate its own capability statement from scratch.
Executes a FHIR search request (currently only Group resources). This overrideable is expected to be able to process a FHIR search request against the underlying clinical data store, and return a searchset Bundle of all matching resources. @Input pConfig BulkFHIR configuration object @Input request FHIR request object representing a search @Output response FHIR response object containing the results of the search
abstract classmethod Start(pRequest As HS.FHIRServer.API.Data.Request, pSession As HS.BulkFHIR.Session) as %Boolean
Starts or resumes a $export operation. This overrrideable is expected to fetch resources out of a clinical data repository in accordance with the provided $export operation, and add resources to a result set as FHIR using APIs in HS.BulkFHIR.ExportManager. The implementation of this method should be able to handle receiving pause/cancel signals from another process, and quiesce as soon as possible. @Input pRequest FHIR request object representing an export operation to be started @Input pSession HS.BulkFHIR.Session for the export operation @Returns a boolean flag indicating whether the operation was completed. This should only be used to indicate whether the job was paused/cancelled. Any other reason to stop processing should be thrown as a fatal error. @Throws any *fatal* error which prevents processing of the export operation. Non-fatal errors should be included in the result set using the API in HS.BulkFHIR.ExportManager
classmethod Status(sessionId As %String, Output status As %String, Output retryAfter As %Integer, Output json As %DynamicObject)
(Optional overrideable) Returns the status of an in-progress $export operation. This overrideable can be used to modify the message returned to the client when they poll for status, as well as inform them how long they should wait to ask again. @Input sessionId session id for the export operation being examined @Output status a short (<100 char) string to display in the X-Progress header @Output retryAfter how long to wait before polling again. @Output json a json object to be returned in the response body. not required per the spec for a progress request
classmethod UpdateExportTypes(ByRef pFetchCapabilities As %DynamicObject)
(Optional overrideable) Inform the UI of what types of exports this adapter can perform. BulkFHIR systems inform us of export types via the capabilities statement, whereas PureFHIR or ODS need to update the pFetchCapabilities."export_type" array with supported items such as "System","Patient","Group"

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab