Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

HS.FHIRServer.Tools.DataLoader

class HS.FHIRServer.Tools.DataLoader extends %Library.RegisteredObject

Utility class to facilitate bulk loading of FHIR resources to a specified FHIR server.

Method Inventory

Methods

method %OnNew(pServiceType As %String, pServiceName As %String) as %Status
Input:
- pServiceType : (required) "FHIRServer" = FHIRServer Service endpoint, or "HTTP" = Service Registry HTTP service.
- pServiceName : (required) Name of FHIRServer Service or Service Registry HTTP service to which to send data.
method PreFHIRService(pRequest As HS.FHIRServer.API.Data.Request)
API Method
@API.Overrideable
Override this method to carry out specific tasks before dispatching the HS.FHIRServer.API.Data.Request to the FHIRServer Service.
method PreHttp(ByRef pURLAndPath)
API Method
@API.Overrideable
Override this method to carry out specific tasks before invoking the HTTP request. The HTTP service object and the HTTP request object are accessbile as instance properties ..HttpService and ..HttpRequest. pURLAndPath is passed in here because it is not part of the request object.
classmethod SubmitResourceFiles(pInputDirectory As %String, pServiceType As %String, pServiceName As %String, pDisplayProgress As %Boolean = 1, pLogGlobal As %String = "", pFileLimit As %String = "", pTranslateTable As %String = "UTF8") as %Status
API Method
@API.Method
Submit FHIR content files from a specified operating system directory to a FHIR server. Each file may contain an individual resource or a Bundle of resources. The files in the specified directory can be a mix of files with an individual resource and files with a Bundle of resources. The files in the specified directory may be all JSON files or all XML files, or a mix of JSON and XML files.

Input:
- pInputDirectory : (required) Operating system directory location of the source input files.
- pServiceType : (required) "FHIRServer" = FHIRServer Service endpoint, or "HTTP" = Service Registry HTTP service.
- pServiceName : (required) Name of FHIRServer Service or Service Registry HTTP service to which to send data.
- pDisplayProgress : 1 (default) = Display progress messages and errors. 0 = Do not display.
- pLogGlobal : Name of global to which to log statistics. If not specified, then no logging is done. The recorded elapsed time is that time spent while being processed in the relevant FHIR server infrastructure. It does not include time spent by this method in examining and re-formatting of resources or in the construction of request messages.
- pFileLimit : Limit processing to the first pFileLimit files in pInputDirectory. If pFileLimit is not specified, then all files are processed.
- pTranslateTable : Translate table to use on all FHIR resource input files. Default is "UTF8".
Output - if pLogGlobal is specified:
- @pLogGlobal@("FilesTotal") = Number of files processed.
- @pLogGlobal@("ResourcesTotal") = Total number of resources within the processed files.
- @pLogGlobal@("ElapsedTotal") = Total elapsed time between each processing request and response.
- @pLogGlobal@("ElapsedAvgPerFile") = Average elapsed time per file.
- @pLogGlobal@("ElapsedAvgPerResource") = Average elapsed time per resource.
method SubmitResourceFilesHelper(pInputDirectory As %String, pDisplayProgress As %Boolean = 1, pLogGlobal As %String = "", pFileLimit As %String = "", pTranslateTable As %String = "UTF8")
method SubmitResourceStream(pResourceStream As %Stream.Object, pFormatCode As %String = "", Output pSentStreamSize As %Integer, Output pEntryCount As %Integer, Output pElapsed As %Decimal) as %Status
API Method
@API.Method
Submit an individual FHIR stream to a FHIRService or to an HTTP Service.

This method returns statistics regarding number of resources processed, plus elapsed time. Please note that the elapsed time statistic is the accumulation of the timing starting from the submission of each FHIR payload to the return of each FHIR payload.

Input:
- pResourceStream : (required) Stream object containing FHIR content. - pFormatCode : FHIR data format - "JSON" or "XML". If not provided, then this method derives the format by examining the input stream.

Output:
- pSentStreamSize : Size, in bytes, of the FHIR stream that was actually sent.
- pEntryCount : Number of resources in pResourceStream.
- pElapsed : Elapsed processing time for the resources within pResourceStream. When sending directly to FHIRServer Service, elapsed time is that time spent while being processed in the relevant FHIRServer infrastructure. When sending via HTTP, elapsed time is the time between the invocation of the HTTP request and the return of the response over the wire.
method WriteOutput(pString)
API Method
@API.Overrideable
Override this method to implement an alternate means of display output.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab