HS.BulkFHIR.Storage.Ingestion.Adapter
class HS.BulkFHIR.Storage.Ingestion.Adapter extends HS.BulkFHIR.API.StorageAdapter
Stores files and makes them accessible through a REST APIMethod Inventory
- AddToFailedFile()
- CleanupSourceIngestBlocker()
- Finish()
- IngestDocRefAttachedBinary()
- IngestDocRefBinaries()
- Initialize()
- Purge()
- SaveFile()
- UsesAuthAdapter()
Parameters
parameter THREADEDROWCOUNT = 50;
Maximum number of rows to pass to each worker thread
parameter archeType = storage-ingestion;
Inherited description: This property describes the overarching type of the adapter & its subclasses, so that they may be understood as belonging to the same group exhibiting fundamentally
similar behaviors or serving similar purpose.
Used when generating the metadata (GUISettings) for all adapters & config classes so the UI may be able to identify the archeType of adapter it's dealing with, without
knowing its full inheritance chain (e.g. all pureFHIR fetch adapter & their subclasses will have the same archeType, all BulkFHIR fetch adapter & subclasses will have same archeType, etc.)
and the UI can enforce archeType specific behavior across otherwise indistinguishable adapters & their configs.
parameter configClass = HS.BulkFHIR.Storage.Ingestion.Config;
parameter supportsPause = 0;
Methods
classmethod AddToFailedFile(pSession As HS.BulkFHIR.Session, pStream As %Stream.Object, pResourceType As %String)
Given a stream object (pStream) and pResourceType (optionally ""), write data to the appropriate .ndjson file
classmethod CleanupSourceIngestBlocker(pSession As HS.BulkFHIR.Session)
transactionId in processing can not be assigned if it's already been assigned so prevent subsequent ingests for the same source (which is controlling matching ID's)
classmethod Finish(pSession As HS.BulkFHIR.Session)
Have received and processed all the files, now mark the transaction as complete or rollback as needed
classmethod IngestDocRefAttachedBinary(pDocumentReference As %DynamicObject, pContentIndex As %Integer, pBinaryResource As %DynamicObject) as %Boolean
@API.Overrideable
Overridable method for additional logic to determine whether the specified valid FHIR Binary resource should be ingested as a separate resource, in addition to the already-ingested containing DocumentReference resource. Default logic is to approve based solely on whether the resource has a resource id.
@Input pDocumentReference %DynamicObject of the DocumentReference resource that contains the encoded Binary resource.
@Input pContentIndex Array index of the DocumentReference.content array element that holds the encoded Binary resource.
@Input pBinaryResource %DynamicObject of the validated FHIR Binary resource.
@Return Boolean flag 1 = Ingest this Binary resource, 0 - Do not ingest.
Overridable method for additional logic to determine whether the specified valid FHIR Binary resource should be ingested as a separate resource, in addition to the already-ingested containing DocumentReference resource. Default logic is to approve based solely on whether the resource has a resource id.
@Input pDocumentReference %DynamicObject of the DocumentReference resource that contains the encoded Binary resource.
@Input pContentIndex Array index of the DocumentReference.content array element that holds the encoded Binary resource.
@Input pBinaryResource %DynamicObject of the validated FHIR Binary resource.
@Return Boolean flag 1 = Ingest this Binary resource, 0 - Do not ingest.
classmethod IngestDocRefBinaries() as %Boolean
@API.Overrideable
Overridable logic to determine whether to separately ingest DocumentReference-wrapped Binary resources at all. Default logic is to return 1.
@Return Boolean 1 = Ingest DocumentReference-wrapped Binary resources, 0 - Do not ingest.
Overridable logic to determine whether to separately ingest DocumentReference-wrapped Binary resources at all. Default logic is to return 1.
@Return Boolean 1 = Ingest DocumentReference-wrapped Binary resources, 0 - Do not ingest.
classmethod Initialize(pBFCconfig As HS.BulkFHIR.API.Data.Config)
Called when the BFC endpointconfiguration is configured/re-configured
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
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
classmethod UsesAuthAdapter() as %Boolean
Inherited description: 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
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- AutoCreateOAuthClient()
- CheckResource()
- CheckResources()
- DeleteFile()
- GetFile()
- GetURL()
- OnRecover()
- Pause()
- ResourceCheck()