The FHIR R4 $export-ccda operation generates a structured clinical summary for a patient in CCDA format. It is commonly used to support document exchange, referrals, care transitions, compliance workflows, and human-readable summaries.
The response can be returned in structured XML or as a PDF formatted for clinical review.
Use Cases
- Export a CCDA document for patient transitions or referrals
- Generate a human-readable summary of a patient’s medical history
- Share patient documentation with external systems or providers
Base URLs
- Production:
https://api.healthgorilla.com/fhir/R4/Patient/{id}/$export-ccda - Sandbox:
https://sandbox.healthgorilla.com/fhir/R4/Patient/{id}/$export-ccda
Authentication
All requests require OAuth 2.0 authentication using a Bearer Token. Unauthorized requests return 401 Unauthorized responses.
Required Scope: patient.read
For more information, go to: OAuth 2.0 Authentication
Method
| Method | Operation | Description |
|---|---|---|
POST | Export CCDA | Generates a CCDA document for the specified patient |
Output Types
| Format | Description |
|---|---|
| Human-readable version of the CCDA | |
| XML | Machine-readable structured CCDA document |
Example Request
POST /fhir/R4/Patient/123456/$export-ccda
Content-Type: application/fhir+json
Authorization: Bearer {access_token}If Accept: application/xml is provided, the server may return XML instead of a PDF.
Error Handling
The $export-ccda operation returns standard FHIR OperationOutcome structures in the event of errors.
Examples:
401 Unauthorized— token missing or expired404 Not Found— patient ID not found500 Internal Server Error— export failed
For more information, go to: Error Handling
