Compare two clinical XML documents structurally, match CDA sections and entries semantically, and review header, narrative, attribute, value, and internal reference changes without uploading the content.
Privacy reminder. Do not paste real patient data, credentials, secrets, production identifiers, or confidential documents. Use synthetic or properly de-identified test data only.
Structured comparison
Compare two CDA or clinical XML documents
This tool compares parsed XML structure and applies practical CDA-aware matching. It is not a CDA, schema, template, terminology, or implementation-guide conformance validator.
Both documents stay in your browser and are not saved by this tool.
Separate paths with commas, semicolons, or new lines. Asterisks act as wildcards. Paths are matched against the structured result paths shown below.
No comparison yetPaste two CDA or clinical XML documents and click Compare documents.
CDA sections
Filter by section
Sections are matched by code, then template IDs, then title when semantic section matching is enabled.
Internal references
Reference changes
Changes to CDA narrative references and their local ID resolution state are shown separately.
Status
Path
Original
Updated
Status
Scope
Path
Original
Updated
Text report
Compare two documents to generate a report.
FAQ
CDA and XML comparison questions
Is this a line-by-line XML diff?
No. The tool parses both XML documents, compares elements, attributes, and direct text values, and uses CDA-aware semantic keys for sections and structured entries when possible.
How are reordered CDA sections handled?
With semantic section matching enabled, the tool prefers section code and code system, then template IDs, then title. Reordering the same sections should not create false removed and added section results.
How are structured entries matched?
The tool looks for statement identifiers first and coded statement keys second for common entry types such as observations, substance administrations, procedures, acts, organizers, encounters, and supplies. It falls back to order when stable unique keys are unavailable.
What do the default ignored options do?
They ignore the direct ClinicalDocument document ID and effectiveTime, plus author or authenticator time elements. Encounter effectiveTime and other IDs remain significant unless you explicitly ignore their paths.
Does this validate CDA conformance?
No. It performs structured comparison and practical CDA-aware matching only. It does not validate schemas, templates, terminology, or jurisdiction-specific implementation guides.
Can I paste real patient data?
No. Use synthetic or appropriately de-identified test data only.
Practical guide
Review CDA changes at header, section, entry, and narrative level
CDA documents often contain generated IDs, timestamps, reordered XML, and formatted narrative alongside clinically important changes. The comparison tool helps expose structured differences while keeping the document's section and entry context visible.
Recommended workflow
Compare documents representing the same patient-independent test case or document revision.
Review document identity, template IDs, set ID, version number, and effective time first.
Check added, removed, and matched sections by title and code.
Inspect entry-level changes to observations, procedures, organisers, authors, and references.
Review narrative changes separately from coded-entry changes.
Changes that usually matter
A section or mandatory template disappears.
A code, code system, value, unit, status, or effective time changes.
Patient, author, custodian, encounter, or legal-authentication details differ.
A narrative reference no longer points to its intended entry.
The document version changes without the expected set ID relationship.
The document timestamp may simply indicate regeneration or a new document version. The observation timestamp changes the represented clinical event and may require clinical or mapping review. Paths, surrounding section context, and document-version fields help determine which difference is important.
Avoiding false positives
Generated XML can move without changing meaning
Ordering and generated identifiers
Equivalent sections or entries may be emitted in a different order. Random UUIDs, document IDs, timestamps, or software-specific namespace prefixes can also create large diffs that obscure the actual regression.
For repeatable tests, use stable synthetic identifiers and timestamps where possible. Compare section codes, template IDs, business identifiers, and clinical values before treating positional movement as a defect.
Limitations
The tool cannot prove that two differently coded concepts are clinically equivalent.
Whitespace changes inside narrative may still affect rendering or digital signatures.
It does not execute CDA Schematron or national implementation-guide rules.
Human review remains necessary for clinically meaningful narrative changes.
Related guides
Continue with the underlying concepts
Use these guides when the tool exposes a structure or error that needs a standards-level explanation.
CDA and XML
CDA XML Namespaces Explained
Diagnose XPath queries that return no CDA nodes because the default namespace was not mapped.
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.
These references support the technical context. Local implementation guides, vendor profiles, and receiving-system rules still take precedence for a specific interface.