Convert - CDA to FHIR (R4)

POST /convert/v1/cdatofhirr4

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

See the Convert API Overview for general principles that apply to all Convert API operations.

Inputs and Outputs

The input for this operation is a single CDA document. Supported CDA formats/versions are:

  • CDA R1.1/R2.1
  • HITSP C32 CDAs

The output is a FHIR R4 Bundle containing the clinical data parsed out of the CDA, along with an OperationOutcome resource detailing the results (including warnings or errors) of the conversion process.

Data Format

The input for the CDA to FHIR conversion 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 Rosetta Sandbox.
Sample Input
<?xml-stylesheet type="text/xsl" href=""?>
<ClinicalDocument xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 cda.xsd" moodCode="EVN" xmlns="urn:hl7-org:v3">
  <realmCode code="US" />
  <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" />
  <templateId root="2.16.840.1.113883.10" extension="IMPL_CDAR2_LEVEL1" />
  <templateId root="2.16.840.1.113883.10.20.22.1.1" />
  <templateId root="2.16.840.1.113883.10.20.22.1.2" />
  <id root="3d1e9964-5fbd-4180-85af-0d473e3b43ec" />
  <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Summary of Episode Note" />
  <title>Medical Summary Document</title>
  ... (other patient data)
</ClinicalDocument>

FHIR Bundles are verbose, so the output below just shows a small sample to illustrate how the data is structured. For a more complete example, try out the API in one of the Quickstart Tools, or refer to the FHIR Specification.

Sample Output
{
  "resourceType": "Bundle",
  "type": "searchset",
  "entry": [
    {
      "resource": {
        "resourceType": "Patient",
        ... (patient fields)
      }
    },
    {
      "resource": {
        "resourceType": "Encounter",
        ... (encounter fields)
      }
    },
    ...
    {
      "resource": {
        "resourceType": "OperationOutcome",
        "issue": [
          ... (any processing issues)
      }
    }
  ]
}