Convert - CDA to HTML

This operation converts a CDA document into human-readable HTML.

Guides

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

Endpoint

POST /convert/v1/cdatohtml

Input

The input is a single CDA document for a single patient.

Supported Formats

Supported CDA formats/versions are:

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

Request Headers

Header Value
x-api-key YOUR_API_KEY, obtained from the Developer Portal
content-type application/xml or (if a custom logo is used) multipart/form-data
accept application/html

Output

The output is a formatted HTML file suitable for human review.

Details

The following sections provide additional details about the message handling.

To specify a custom logo in the HTML header, set the content type to multipart/form-data and pass the following form fields:

xml file

File containing the XML data for the CDA.

image file

File containing the custom logo image.

Error Handling

If the input data is invalid (such as improperly-formatted XML), the HTML file will not be created and a “bad request” response returned.

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, invalid data will simply be omitted from the resulting HTML.

Example

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

CDA documents and the formatted HTML files 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 result in HTML similar to: