Skip to main content

Group Export Operation

OPERATION: POST [base]/Group/[id]/$export

This operation requests an export of the given Group by its id.

Parameters

UseNameCardinalityTypeDocumentation
IN_outputFormat0..1stringSupport is required for a server, optional for a client. The format for the requested Bulk Data files to be generated as per FHIR Asynchronous Request Pattern. Defaults to application/fhir+ndjson. The server SHALL support Newline Delimited JSON, but MAY choose to support additional output formats. The server SHALL accept the full content type of application/fhir+ndjson as well as the abbreviated representations application/ndjson and ndjson.
IN_since0..1instantSupport is required for a server, optional for a client. Resources will be included in the response if their state has changed after the supplied time. A server MAY return additional resources modified prior to the supplied time if the resources belong to the patient compartment of a patient added to the group after the supplied time. The server MAY return resources that are referenced by the resources being returned regardless of when the referenced resources were last updated. For resources where the server does not maintain a last updated time, the server MAY include these resources in a response irrespective of the _since value supplied by a client.
IN_type0..*stringSupport is optional for a server and a client. A string of comma-delimited FHIR resource types. The response SHALL be filtered to only include resources of the specified resource types(s). If this parameter is omitted, the server SHALL return all supported resources within the scope of the client authorization, though implementations MAY limit the resources returned to specific subsets of FHIR, such as those defined in the US Core Implementation Guide. For groups of patients, the Patient Compartment SHOULD be used as a point of reference for recommended resources to be returned. However, other resources outside of the Patient Compartment that are referenced by the resources being returned and would be helpful in interpreting the patient data MAY also be returned (such as Organization and Practitioner). When this behavior is supported, a server SHOULD document this support (for example, as narrative text, or by including a GraphDefinition Resource). A server that is unable to support _type SHOULD return an error and FHIR OperationOutcome resource so the client can re-submit a request omitting the _type parameter. If the client explicitly asks for export of resources that the Bulk Data server doesn't support, or asks for only resource types that are outside the Patient Compartment, the server SHOULD return details via a FHIR OperationOutcome resource in an error response to the request. When a Prefer: handling=lenient header is included in the request, the server MAY process the request instead of returning an error.

Examples

Via POST

curl -X POST https://fhir.netsmartcloud.com/uscore/v1/bulk-data/Group/6cbdf685-6b2e-4fe5-aac5-bf9f149daa28/$export \ 
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-d @payload.json

Sample Request Group Export Payload

{
"resourceType": "Parameters",
"parameter": [
{
"name": "_type",
"valueString": "Condition"
},
{
"name": "_type",
"valueString": "MedicationRequest"
},
{
"name": "_type",
"valueString": "Patient"
}
]
}

Via GET

curl -X GET https://fhir.netsmartcloud.com/uscore/v1/bulk-data/Group/c9e8099a-37e1-4e06-baf4-586ea45a4b77/$export?_type=Condition,MedicationRequest,Patient \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"

Sample Assign Group Export Response Payloads

Group Export Success

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Export request accepted. Please see 'Content-Location' header for location to check status and download files when ready."
}
]
}

Invalid Group Export Payload or Other Unprocessable Request

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "Could not locate the information to export."
}
}
]
}