Calling the $davinci-data-export Operation
This tutorial helps us understand how to call the $davinci-data-export operation for different export types and patient selections. It explains the reasoning behind each choice, the effect of key parameters, and best practices when retrieving patient data.
Retrieve the list of members in the Group. This export does not support any parameters.
Sample Request
POST https://api.payer.com/fhir/Group/12345/$davinci-data-export
Authorization: Bearer <access_token>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "exportType",
"valueString": "hl7.fhir.us.davinci-atr"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
Notes
Retrieve only resources for a single patient in the Group that have changed since a specific date. This is useful for minimizing data transfer while keeping the provider’s system up-to-date.
Sample Request
POST https://api.payer.com/fhir/Group/12345/$davinci-data-export
Authorization: Bearer <access_token>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "exportType",
"valueString": "hl7.fhir.us.davinci-pdex#provider-delta"
},
{
"name": "_since",
"valueDateTime": "2025-10-01T00:00:00Z"
},
{
"name": "patient",
"valueReference": { "reference": "Patient/1553" }
},
{
"name": "_type",
"valueString": "Encounter"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
Notes:
_since are returned._type to focus on specific FHIR resources (e.g. Encounter).Retrieve updates for multiple patients in the Group. Useful when a provider manages care for multiple members but still wants incremental updates.
Sample Request
POST https://api.payer.com/fhir/Group/12345/$davinci-data-export
Authorization: Bearer <access_token>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "exportType",
"valueString": "hl7.fhir.us.davinci-pdex#provider-delta"
},
{
"name": "_since",
"valueDateTime": "2025-10-01T00:00:00Z"
},
{
"name": "patient",
"valueReference": { "reference": "Patient/1553" }
},
{
"name": "patient",
"valueReference": { "reference": "Patient/1678" }
},
{
"name": "_type",
"valueString": "Encounter"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
Notes:
patient references can be included._since and _type parameters filter the results.Retrieve all resources for members of the Group. Useful when setting up a new system or performing a complete refresh of data.
Sample Request
POST https://api.payer.com/fhir/Group/12345/$davinci-data-export
Authorization: Bearer <access_token>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "exportType",
"valueString": "hl7.fhir.us.davinci-pdex#provider-download"
},
{
"name": "_since",
"valueDateTime": "2025-09-01T00:00:00Z"
},
{
"name": "_until",
"valueDateTime": "2025-10-01T00:00:00Z"
},
{
"name": "_type",
"valueString": "Encounter"
},
{
"name": "_type",
"valueString": "Coverage"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
Notes:
_since and _until parameters allow filtering by date range, making the export flexible for partial or full refreshes._until is optional.Retrieve a read-only snapshot of all Group member data for viewing or reporting purposes.
Sample Request
POST https://api.payer.com/fhir/Group/12345/$davinci-data-export
Authorization: Bearer <access_token>
Content-Type: application/fhir+json
Accept: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "exportType",
"valueString": "hl7.fhir.us.davinci-pdex#provider-snapshot"
},
{
"name": "_outputFormat",
"valueString": "application/fhir+ndjson"
}
]
}
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.