Convert - FHIR (R4) to CDA
POST /convert/v1/fhirr4tocda
This operation converts a FHIR R4 bundle (including one from HL7-to-FHIR or Combine Bundles) into an aggregated CDA document.
The input is a FHIR R4 bundle for a single patient.
The output is an aggregated C-CDA R2.1 document in XML format.
Tip
If your FHIR bundle contains multiple FHIR Patient resources (all of which should be from the same person), use the
combine FHIR bundles operation prior to the CDA conversion.
The output format is in XML, so be sure to specify accept: application/xml
in your request header.
Error Handling
If the input data is invalid (such as improperly-formatted FHIR data), the request will return an error response (see Using the API). However, in many cases the Convert service can continue processing even when there are issues with the input data, such as missing fields or unexpected data types. In such cases, the invalid data will be omitted from the finished CDA document.
Example
FHIR Bundles and CDA documents 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 FHIR Patient
resource:
Sample Input
would be converted to a patient
node in the CDA XML:
Sample Output