HL7 v3 / CDA Parser

Parse and inspect HL7 v3 and CDA XML documents.

Save

Calculator

Inputs

Paste a CDA or HL7 v3 XML string.

Live output

Results

XML Structure

Message Analysis

Total Fields1
Segments Found
Error: 1
XML PathValueType
Error (1)
ErrorParsing FailedReferenceError: DOMParser is not defined

Report

Export and share

Document

Copy and share

Assumptions

  • This viewer focuses on XML structure only and does not validate document conformance, template IDs, Schematron assertions, or implementation-guide rules.
  • The flattened output shows where values live in the XML tree, but it does not infer clinical meaning beyond the raw path and attribute names.
  • Narrative sections, namespaces, and very large documents may still require manual review or a dedicated validator when exact conformance matters.

Sensitivity preview

No numeric sensitivity scenarios are available.

Logic: DOM Parsing with Attribute extraction.

Related Tools

View All

About this HL7 v3 / CDA Viewer

HL7 v3 and CDA documents are XML-heavy and often difficult to inspect quickly because important meaning lives in both nested elements and attributes. This viewer flattens the structure into paths, values, and types so you can examine the document shape without manually expanding the XML tree.

Who this calculator is for

  • Analysts and developers working with CDA, C-CDA, or HL7 v3 XML payloads.
  • Teams tracing where identifiers, codes, timestamps, or patient details appear in a large document tree.
  • Anyone comparing v3/CDA structure with FHIR or HL7 v2 representations during interoperability work.

When to use it

  • Use it when you need a quick structural view of a CDA or other HL7 v3 XML document.
  • Use it to locate attributes such as `@code`, `@codeSystem`, `@extension`, or `@value` without building a custom parser first.
  • Use it to inspect example payloads before mapping them into another format or interface layer.

How to use this calculator

  1. Paste your HL7 v3 or CDA XML content.
  2. The table will generate X-Path style rows.
  3. Look for the `@` symbol to identify attribute values versus text values.

Key assumptions

  • This viewer focuses on XML structure only and does not validate document conformance, template IDs, Schematron assertions, or implementation-guide rules.
  • The flattened output shows where values live in the XML tree, but it does not infer clinical meaning beyond the raw path and attribute names.
  • Narrative sections, namespaces, and very large documents may still require manual review or a dedicated validator when exact conformance matters.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

The tool performs a recursive traversal of the XML DOM (Document Object Model). It extracts element names, attributes, and text values, constructing a unique path for every piece of data.
DOM Parsing with Attribute extraction.

Inputs explained

XML Content

The full XML string of the CDA or v3 message.

Understanding your results

The XML Path shows where the data lives. E.g., `ClinicalDocument/recordTarget/patientRole/id/@extension` is the patient ID.

Key Features

  • Handles deep XML nesting
  • Extracts attributes (@code, @value)
  • Generated X-Path for each element

Things to Keep in Mind

Does not render the CDA narrative block (HTML). It displays the raw data structure only. Not a validator.

Tips & Best Practices

  • C-CDA (Consolidated CDA) documents can be huge. This tool works best for inspecting headers or specific sections rather than rendering the whole human-readable narrative.
  • Attributes like `@code` and `@codeSystem` are critical in v3 for semantic interoperability.

Glossary of Terms

RIM
Reference Information Model. The abstract object model from which all v3 domains are derived.
CDA
Clinical Document Architecture. An HL7 v3 standard for the exchange of clinical documents (like Discharge Summaries).

Frequently Asked Questions

What is the RIM?
The Reference Information Model (RIM) is the shared object model that is the source of all data content in HL7 v3. It defines backbone classes like Act, Role, and Entity.
How is v3 different from FHIR?
HL7 v3 is XML-only and strictly adheres to the RIM, often resulting in complex, verbose nested structures. FHIR was designed to be more developer-friendly, supporting JSON and simplified resources.
What is C-CDA?
Consolidated CDA (C-CDA) is a library of CDA templates used in the US for Meaningful Use. It defines how to structure specific documents like Discharge Summaries or Care Plans.
Why are v3 messages so large?
The rigorous derivation from the RIM means many 'wrapper' classes (like Acts and Roles) must be explicitly instantiated in the XML, creating deep nesting and verbosity.
Can this validate my CDA?
No, this is a viewer. Validation requires checking against specific Schematron rules and XSDs, which is beyond the scope of this client-side tool.