XSD Health Level Seven International · R2 (normative edition)

HL7 CDA Release 2

Clinical Document Architecture

The base schema of clinical documents such as discharge summaries, referrals and C-CDA documents.

About

CDA R2 defines the structure of clinical documents: a header about the patient, author and encounter, and a body of sections with narrative and coded entries. C-CDA and many national e-health programmes build on it.

This is the original normative schema. Documents that use the SDTC extensions (sdtc: namespace) need the extended schema and are not covered.

Good to know

  • Implementation guides such as C-CDA add templates and constraints in Schematron; they are not checked here.
  • The example is the sample document from the HL7 CDA R2 normative edition.

Files

6 files · 336.6 KB

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Example document

SampleCDADocument.xml · 44.4 KB · valid against this schema

In CI and from code

The same schema by its name, hl7-cda-r2, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema hl7-cda-r2
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: hl7-cda-r2
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document={{ $schema->example ?? 'document.xml' }} -F schema=hl7-cda-r2

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups