CDA and XML utility

CDA & Clinical XML Viewer

Format and inspect clinical XML, explore a namespace-aware tree, summarise common CDA header details, browse sections, and check internal narrative references without uploading the document.

Privacy reminder. Do not paste real patient data, credentials, secrets, production identifiers, or confidential documents. Use synthetic or properly de-identified test data only.

Formatter and viewer

Paste a CDA or clinical XML document

The tool checks XML syntax and provides practical CDA-aware inspection. It is not a certified CDA, schema, template, terminology, or implementation-guide validator.

The document stays in your browser and is not saved by this tool.

No document loadedPaste XML and click Inspect document.

A collapsible XML tree will appear here.

FAQ

CDA and XML viewer questions

Does this validate CDA conformance?

No. It validates XML syntax and performs practical CDA-aware structural inspection. It does not validate the complete CDA model, XSD schemas, template constraints, terminology bindings, or jurisdiction-specific implementation guides.

How are XML namespaces displayed?

The tree keeps qualified element and attribute names where prefixes exist, and the Namespaces tab shows prefixes and namespace URIs discovered in the document.

What CDA details are summarised?

The tool looks for common ClinicalDocument header structures such as template IDs, document identity and code, record target, author, custodian, legal authenticator, encompassing encounter, structured body, and sections.

What are the suspicious escaping checks?

The tool flags literal double-escaped entity text such as ' in the raw XML because it can indicate that entity text was escaped twice. The note is a debugging aid, not a conformance verdict.

Can I paste real patient data?

No. Use synthetic or appropriately de-identified test data only.

Practical guide

Read a CDA document as both structured XML and a clinical document

A CDA document combines a header, coded sections, machine-readable entries, and human-readable narrative. The viewer helps move between those layers so that an integration problem can be located in the document structure rather than treated as one large XML string.

Start with the header

  • Document template identifiers and the CDA document type code.
  • Document ID, set ID, version number, creation time, and confidentiality code.
  • Patient identity, names, addresses, telecoms, birth time, and administrative gender.
  • Author, custodian, legal authenticator, encounter, and service event details.
  • Language, realm, and organisation identifiers used by the local implementation.

Then inspect sections

  1. Use the section title and code to identify the intended clinical topic.
  2. Read the narrative text as the human-consumable representation.
  3. Inspect entries beneath the section for coded observations, procedures, medications, or organisers.
  4. Check IDs and references connecting narrative items to structured entries.
  5. Confirm mandatory sections are present for the applicable CDA implementation guide.

Worked example

A section can look correct while its coded entry is wrong

<section>
  <code code="10164-2" codeSystem="2.16.840.1.113883.6.1"/>
  <title>History of Present Illness</title>
  <text>Patient reports increasing shortness of breath.</text>
</section>

The narrative may be perfectly readable, but an implementation can still fail if the section code, template ID, null flavour, required entry, or code-system identifier is missing or incorrect. Conversely, a coded entry can be present while the narrative shown to clinicians omits the important result.

Review both representations. CDA conformance and clinical usability depend on the relationship between the XML structure and the rendered document, not merely on whether the XML parser accepts the file.

Troubleshooting

Frequent CDA and clinical XML problems

Namespaces and references

  • Elements in the wrong namespace may appear visually correct but fail XPath or schema rules.
  • Namespace prefixes are aliases; the namespace URI is what determines element identity.
  • Narrative references such as #result-1 must match an ID in the document.
  • Escaped markup inside narrative text may display as literal XML instead of formatted content.

Limitations

This viewer performs practical structural checks but is not a full CDA schema, Schematron, terminology, template, or national conformance validator. It also cannot determine whether the clinical narrative is complete, accurate, or safe.

Use it to understand and troubleshoot the document, then validate against the exact implementation guide and test environment.

Authorship and review

Practical guidance backed by integration experience

Maintained and technically reviewed by Health Data Tools, drawing on more than 15 years of healthcare integration experience across HL7, FHIR, CDA, APIs, PKI, and clinical integration systems.

Technically reviewed: