Convert - CDA to FHIR (R4)

POST /convert/v1/cdatofhirr4

This operation converts a CDA document into a FHIR R4 bundle.

Inputs and Outputs

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.

Query Parameters

patientId string

Optional resource ID for the Patient. See programming guide for details.

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.

Data Format

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

Try It
Try out the operations, with examples, in the Developer Portal Sandbox.

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.