Bulk Data

The Allscripts FHIR API is used to pass clinical data on a single patient or small group of patients. However, it is not technically feasible to use the usual Allscripts FHIR API requests to pass bulk data because of the number of requests and system resources involved. In these cases, bulk data requests are available.

There are a variety of reasons why external systems would request bulk data from an Allscripts product. A few examples include:

Note: For more information from HL7 on the FHIR specification for bulk data exports, see Export : /export/ (hl7.org).

Request and Data Flow

Unlike other Allscripts FHIR API requests, requesting bulk data is an asynchronous process; the Allscripts product does not immediately return information. The application makes the initial request and then waits for the Allscripts product to prepare the data.

The process of requesting and receiving bulk data flows as follows:

  1. The application requests bulk data from an Allscripts product via FHIR.
  2. The application requests the status of the bulk data request by sending the ExportRequestID.
  3. Application requests the data by sending a request to the URL.

Application Configuration Considerations in the ADP Portal

When the developer creates their FHIR application in the Allscripts Developer Program portal, the following must be true in order for the application to request bulk data:

Supported Resources

The Allscripts FHIR Bulk Data API can extract bulk data from the following FHIR resources:

Provenance considerations

The bulk data request supports the Provenance resource. The response file includes provenance data under the following conditions:

If provenance is passed as a requested resource, all other resources that are included in the request should then include provenance.

If provenance is not passed as a requested resource, no resources that are included in the request should include provenance.

For more information on the Provenance resource, see link to Searching page.

Creating an export request

The application makes the initial bulk data request using $export. For example:

[FHIR path]/Group/INF-101/$export

Means: “Get all the patients in the Group resource with the ID INF-101.”

Note: The requesting application must be authorized to access the data requested.

Requesting an export request status

The application requests a status of the export package progress.

GET [Content Location URL]

Deleting an export request

The application can delete an export request if it was created in error or is no longer needed.

DELETE [Content Location URL]

Retrieving the export file packages

After the application receives a status update that indication the requested export files are complete, the application retrieves the files.

GET [Content Location URL from the body of the completed request response]

By default, the Allscripts FHIR API returns files in the JSON format. However, to return files in XML, send application/fhir+xml in the Accept header.