Skip to main content
AskMe (beta)
Loading icon

HS.BulkFHIR.API.StorageAdapter

class HS.BulkFHIR.API.StorageAdapter extends HS.BulkFHIR.API.AdapterBase, HS.BulkFHIR.Util.Security

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

Method Inventory

Methods

abstract classmethod Cancel(pSession As HS.BulkFHIR.Session)
Optional - When user cancels export request, purge any existing storage for specified session
final classmethod CheckResources(pSession As HS.BulkFHIR.Session)
Called by GetFile, to be able to download any file first check the resources @Input pSession session object the export operation is linked to @Input pFilename filename we are checking resources on
classmethod DeleteFile(url As %String)
(Optional overrideable) Deletes a file that was saved previously, either because the operation failed or because the file is expired @Input url url of the file that was saved previously and shall be deleted
abstract classmethod Finish(pSession As HS.BulkFHIR.Session)
Optional - When export finishes any additional steps storage may need to complete
final classmethod GetFile(pSession As HS.BulkFHIR.Session, pFilename As %String) as %Stream.Object
@Input pSession session object for the export operation the file is linked to @Input pFilename filename to generate URL for
abstract classmethod GetFileInternal(pSession As HS.BulkFHIR.Session, pFilename As %String) as %Stream.Object
After checking resources call the GetFileInternal in the adapter class @Input pSession session object for the export operation the file is linked to @Input pFilename filename to generate URL for
classmethod GetURL(pStorageConfig As HS.BulkFHIR.Storage.File.Config, pSession As HS.BulkFHIR.Session, pType As %String, pFilename As %String) as %String
@Input pStorageConfig The Storage File Adapter configuration @Input pSession session object for the export operation the file is linked to @Input pType type of file - either a resource type or "error" @Input pFilename filename to generate URL for Returns the URL for this file fileurl/sessionid/type/filename.ndjson
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)
Optional - When export is starting any additional steps storage may need to complete
abstract classmethod Pause(pSession As HS.BulkFHIR.Session)
Optional - When export is starting any additional steps storage may need to complete
abstract classmethod Purge(pSession As HS.BulkFHIR.Session)
(Optional overrideable) If the StorageAdapter can purge everything with just the session implement that code When not implemented a call to DeleteFile will be made with every file in links and errors @Input pSession session to be purged
abstract classmethod SaveFile(ByRef pInStream As %Stream.Object, pSession As HS.BulkFHIR.Session, pType As %String)
Moves contents from pInStream to permanent storage returns the URL where the file can be accessed. The session for the export operation and the file's resource type are also provided, as it may be useful or relevant for the storage strategy. @Input pInStream stream object containing a file to be saved. @Input pSession session object for the export operation the file is linked to @Input pType type of file - either a resource type or "error" This method moves the ndjson from the Temp files into the permanent file during flush operations and at completion
abstract classmethod UsesAuthAdapter() as %Boolean
Indicates whether the files created by this adapter will be access controlled *directly* by the auth adapter. If the files are not access controlled, or the auth adapter isn't controlling access from the client's perspective (ie. AWS S3), this should be false. @Returns a boolean representing whether the auth adapter will be used for access control

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab