HS.BulkFHIR.Fetch.BulkFHIR.Adapter
class HS.BulkFHIR.Fetch.BulkFHIR.Adapter extends HS.BulkFHIR.API.FetchAdapter
Common adapter for BulkFHIR systemsMethod Inventory
- Cancel()
- DeleteExportRequestIfStarted()
- EvaluateRetryAfterToHang()
- GetKickOffPath()
- GetSupportedParams()
- KickOffRequest()
- OnStart()
- PollExportStatus()
- Purge()
- RetrieveFile()
- RetrieveFiles()
- SaveCapabilityStatement()
- SaveLog()
- Start()
Parameters
parameter configClass = HS.BulkFHIR.Fetch.BulkFHIR.Config;
parameter supportsGroupExport = 1;
Inherited description: 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 = 1;
Inherited description: 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 supportsPause = 0;
parameter supportsSystemExport = 1;
Inherited description: 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
parameter waitForChildJobs = 45;
Number of seconds to wait for child jobs to stop
Methods
classmethod Cancel(pSession As HS.BulkFHIR.Session)
Inherited description: 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
classmethod DeleteExportRequestIfStarted(pSession As HS.BulkFHIR.Session)
if we have already kicked off an $export operation, call DELETE on it to cancel.
Will @Output an integer representing number of seconds to hang by in compliance with the RETRY-AFTER header value
in the @Input pRetryAfterHeader, which may be already an integer string representing the seconds to wait by or
an http-date, per FHIR Bulk Data IG https://build.fhir.org/ig/HL7/bulk-data/export.html#bulk-data-status-request
If http-date, will evaluate it to a number of seconds if valid (e.g. has to be a future date)
If http-date is invalid, will default to 120 seconds.
classmethod GetKickOffPath(pRequest As HS.FHIRServer.API.Data.Request, pSession As HS.BulkFHIR.Session) as %String
given a request and session, parse the original request url & args to prepare the request to the $export endpoint.
returns url path along with any query params
Returning "" means all params are "supported" i.e. no parameter validation
This fetch adapter invokes an external $export server. Let that server validate parameters.
classmethod KickOffRequest(pSession As HS.BulkFHIR.Session, pPath As %String) as %String
Begin kick off request. If successful, returns the status polling location URL
classmethod OnStart(pSession As HS.BulkFHIR.Session, pRestart As %Boolean)
Upon initial startup of an export request that includes an OAuth token,
and verify that explicitly requested resource types do not conflict with resource types not allowed by the token.
classmethod PollExportStatus(pSession As HS.BulkFHIR.Session, pStatusLocationURL As %String, ByRef pSignaled As %Boolean = 0) as HS.FHIRServer.API.Data.RestClient.Response
Poll export status by url. If successful, returns the rest client response containing the list of export files.
classmethod Purge(pSession As HS.BulkFHIR.Session)
Inherited description: Optional - purge any existing storage for pSession.%Id(), which is called when a session expires,
and from a session cancellation
classmethod RetrieveFile(pSession As HS.BulkFHIR.Session, pType As %String, pURL As %String) as HS.FHIRServer.API.Data.RestClient.Response
utility method to retrieve an export file by url
classmethod RetrieveFiles(pSession As HS.BulkFHIR.Session, pFilesList As %DynamicArray, pErrors As %Boolean = 0)
classmethod SaveCapabilityStatement(pBFCConfig As HS.BulkFHIR.API.Data.Config) as %String
method for generating capabilityStatement specific to this type of fetch
derive our BFC endpoint capability statement from the $export server's
Returns a json string of the capability statement.
classmethod SaveLog(pSessionId As %String, pSeverity, pType As %String = "fetch", pMessage As %String)
utility method for logging
classmethod Start(pRequest As HS.FHIRServer.API.Data.Request, pSession As HS.BulkFHIR.Session) as %Boolean
Inherited description: 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
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- Finish()
- GetSourceSystem()
- GetSourceSystemGUID()
- GroupSearchParameters()
- Initialize()
- OnRecover()
- OperationDocumentation()
- Pause()
- Read()
- Search()
- Status()
- UpdateExportTypes()