Kick off a bulk export request for the provided list of patients
/Patient/$export
Note: The FHIR API endpoints described below are available for customers to deploy and use. Developers are welcome and encouraged to develop against the specifications in anticipation of customer deployment.
The operation is defined at:
GET https://<Service Root URL>/r4/OperationDefinition/patient-export?_format=json
Note:
- With the current implementation, the
patientparameter must be provided at least once. - Bulk data export requests do not currently recognize the Accept-Language header;
en-USis used instead. - The authorization token must contain system read scopes for all resources requested in the
_typeparameter. - The experimental
_elementsand_typeFilterparameters are not supported.
Provenance Behavior
- Provenances for the Location, Organization, and Practitioner resources cannot be exported.
- When the
_typeparameter is not provided and the authorization token includes the Provenance read scope, all relevant Provenance resources associated with each of the non-Provenance resources are exported by default. You may use theincludeAssociatedDataparameter to export only the latest provenance. - When the
_typeparameter is provided with specific resources and includes Provenance, all relevant Provenance resources associated with each of the non-Provenance resources are exported by default. - When both the
includeAssociatedDataparameter and the_typeparameter are provided, the_typeparameter must includeProvenance.
Optional Header
When the Prefer: handling=lenient header is provided, any unknown or unsupported parameters are ignored as specified in the Bulk Data Export parameters.
Request
-
Accept(required): string
The media type to be requested. Refer to what the resource's operation produces for what is supported.
Example:
application/fhir+json -
Authorization(required): string
Contains the credentials to authenticate a consumer to the service. This should be the OAuth2 Bearer Token.
-
Content-Type(required): string
Specifies the content type of the request entity body. Accepted values are
application/fhir+json,application/json+fhir, andapplication/json. -
Prefer(required): string
Specifies whether the response is immediate or asynchronous.
respond-asyncis supported. A client must provide this header.
- application/fhir+json
object-
parameter(required): array
parameter
Parameters supported by the operation.
- The
patientparameter is required and must be provided at least once. - The
_type,includeAssociatedData,_since, and_outputFormatparameters are optional and may be provided in the request body.
Details of the supported parameters:
patient:- A maximum of 20,000 values may be provided for
patient. - When the parameter name is
patient, the parameter value must be in the form ofvalueReference.
- A maximum of 20,000 values may be provided for
_type:- A string of comma-delimited FHIR resource types.
- When the parameter name is
_type, the parameter value must be in the form ofvalueString. - The following values are valid:
AllergyIntoleranceCarePlanCareTeamConditionCoverageDeviceDiagnosticReportDocumentReferenceEncounterGoalImmunizationLocationMedicationDispenseMedicationRequestPatientProcedureObservationOrganizationPractitionerProvenanceRelatedPersonServiceRequestSpecimen- When the
_typeparameter contains a reference resource (Location,Organization,Practitioner,RelatedPerson, orSpecimen) or an associated resource (Provenance), at least one of the following resources must also be provided:AllergyIntoleranceCarePlanCareTeamConditionCoverageDeviceDiagnosticReportDocumentReferenceEncounterGoalImmunizationMedicationDispenseMedicationRequestObservationPatientProcedureServiceRequest
- When the
_typeparameter is not provided, the resources to be exported are determined by the scopes provided in the authorization token. - Example:
Condition, Provenance
includeAssociatedData:- When the parameter name is
includeAssociatedData, the parameter value must be in the form ofvalueCode. - When provided, the patient export returns or omits a predefined set of FHIR resources associated with the request.
- A string of comma-delimited values. Valid values are
LatestProvenanceResourcesandRelevantProvenanceResources.
- When the parameter name is
_since:- Resources updated after this time are included in the response.
- When the parameter name is
_since, the parameter value must be in the form ofvalueInstant. - Example:
2021-03-18T19:19:42.000Z
_outputFormat:- The format for the requested bulk data files to be generated.
- When the parameter name is
_outputFormat, the parameter value must be in the form ofvalueString. - Valid values are
application/fhir+ndjson,application/ndjson, andndjson. - Defaults to
application/fhir+ndjsonwhen not provided.
{ "parameter": [ { "name": "patient", "valueReference": { "reference": "Patient/12783127" } }, { "name": "patient", "valueReference": { "reference": "Patient/12783128" } }, { "name": "patient", "valueReference": { "reference": "Patient/12783129" } }, { "name": "_type", "valueString": "Condition,Provenance" }, { "name": "includeAssociatedData", "valueCode": "RelevantProvenanceResources" }, { "name": "_since", "valueInstant": "2021-03-18T19:19:42.000Z" }, { "name": "_outputFormat", "valueString": "application/fhir+ndjson" } ] } - The
-
resourceType(required): string
Allowed Values:
[ "Parameters" ]The type of the FHIR resource.
{ "resourceType": "Parameters", }
arrayParameters supported by the operation.
- The
patientparameter is required and must be provided at least once. - The
_type,includeAssociatedData,_since, and_outputFormatparameters are optional and may be provided in the request body.
Details of the supported parameters:
patient:- A maximum of 20,000 values may be provided for
patient. - When the parameter name is
patient, the parameter value must be in the form ofvalueReference.
- A maximum of 20,000 values may be provided for
_type:- A string of comma-delimited FHIR resource types.
- When the parameter name is
_type, the parameter value must be in the form ofvalueString. - The following values are valid:
AllergyIntoleranceCarePlanCareTeamConditionCoverageDeviceDiagnosticReportDocumentReferenceEncounterGoalImmunizationLocationMedicationDispenseMedicationRequestPatientProcedureObservationOrganizationPractitionerProvenanceRelatedPersonServiceRequestSpecimen- When the
_typeparameter contains a reference resource (Location,Organization,Practitioner,RelatedPerson, orSpecimen) or an associated resource (Provenance), at least one of the following resources must also be provided:AllergyIntoleranceCarePlanCareTeamConditionCoverageDeviceDiagnosticReportDocumentReferenceEncounterGoalImmunizationMedicationDispenseMedicationRequestObservationPatientProcedureServiceRequest
- When the
_typeparameter is not provided, the resources to be exported are determined by the scopes provided in the authorization token. - Example:
Condition, Provenance
includeAssociatedData:- When the parameter name is
includeAssociatedData, the parameter value must be in the form ofvalueCode. - When provided, the patient export returns or omits a predefined set of FHIR resources associated with the request.
- A string of comma-delimited values. Valid values are
LatestProvenanceResourcesandRelevantProvenanceResources.
- When the parameter name is
_since:- Resources updated after this time are included in the response.
- When the parameter name is
_since, the parameter value must be in the form ofvalueInstant. - Example:
2021-03-18T19:19:42.000Z
_outputFormat:- The format for the requested bulk data files to be generated.
- When the parameter name is
_outputFormat, the parameter value must be in the form ofvalueString. - Valid values are
application/fhir+ndjson,application/ndjson, andndjson. - Defaults to
application/fhir+ndjsonwhen not provided.
{
"parameter": [
{
"name": "patient",
"valueReference": { "reference": "Patient/12783127" }
},
{
"name": "patient",
"valueReference": { "reference": "Patient/12783128" }
},
{
"name": "patient",
"valueReference": { "reference": "Patient/12783129" }
},
{
"name": "_type",
"valueString": "Condition,Provenance"
},
{
"name": "includeAssociatedData",
"valueCode": "RelevantProvenanceResources"
},
{
"name": "_since",
"valueInstant": "2021-03-18T19:19:42.000Z"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
object-
name: string
The name of the parameter
-
value[x]: string
The value of the parameter
Response
Default Response
POST https://<Service Root URL>/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Patient/$export
Example Request Body:
{
"resourceType": "Parameters",
"parameter": [
{
"name": "patient",
"valueReference": { "reference": "Patient/12783127" }
},
{
"name": "patient",
"valueReference": { "reference": "Patient/12783128" }
},
{
"name": "patient",
"valueReference": { "reference": "Patient/12783129" }
},
{
"name": "_type",
"valueString": "Condition,Provenance"
},
{
"name": "includeAssociatedData",
"valueCode": "RelevantProvenanceResources"
},
{
"name": "_since",
"valueInstant": "2021-03-18T19:19:42.000Z"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
Example Response:
Status: 202 Accepted
Content-Location: https://<Service Root URL>/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/bulk-export/jobs/<Job_ID>
-
Content-Location:
Indicates the url to access the status of the export request.
-
opc-request-id:
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-request-id, if present.