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-
infrastructure/cda/CDA.xsd main
-
infrastructure/cda/POCD_MT000040.xsd
-
processable/coreschemas/datatypes.xsd
-
processable/coreschemas/voc.xsd
-
processable/coreschemas/NarrativeBlock.xsd
-
processable/coreschemas/datatypes-base.xsd
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