Convert - CDA to FHIR (R4)
POST /convert/v1/cdatofhirr4
This operation converts a CDA document into a FHIR R4 bundle.
The input is a single CDA document for a single patient. Supported CDA formats/versions are:
- C-CDA R1.1/R2.1
- HITSP C32 CDAs
The output is a FHIR R4 Bundle containing the data parsed from the input, along with an OperationOutcome resource detailing the results (including warnings or errors) of the conversion process. See Output FHIR R4 Bundles for details.
Optionally, you can specify whether the original CDA and/or a standardized version of the original CDA are included in the output bundle.
Query Parameters
patientIdentifier
string
Optional business identifier for the Patient resource. If specified, patientIdentifierSystem
must also be present. See programming guide for details.
patientIdentifierSystem
string
System that provided the patientIdentifier
. If specified, patientIdentifier
must also be present. See programming guide for details.
includeOriginalCda
boolean
Whether to include the original CDA document in the FHIR bundle. Default is false.
includeStandardizedCda
boolean
Whether to include the standardized CDA document in the FHIR bundle. Default is false.
The input is XML, so be sure to specify content-type: application/xml
in your request header.
You can specify either accept: application/json
or accept: application/xml
in your request header to get a response in either JSON or XML format.
Example
CDA documents and FHIR Bundles are verbose, so this just shows a small sample to illustrate how the data is structured. For a more complete example, try out the API in the Developer Portal Sandbox.
For example, a patient
node in the CDA XML:
Sample Input
<patient classCode="PSN" determinerCode="INSTANCE">
<name>
<given>John</given>
<family>Smith</family>
</name>
...
</patient>
would be converted to a Patient
resource in the FHIR bundle:
Sample Output
"resource": {
"resourceType": "Patient",
"id": "35b77437-425d-419c-90b5-af4bc433ebe9",
"name": [
{
"use": "official",
"family": "Smith",
"given": [
"John"
]
}
],
...
}
For details on the output fields, refer to the FHIR Specification.