Note: Refer to the article Codes and code systems for an introduction to these two concepts.

Naming of Elements Representing Codes
In CDA, just about every XML element that is intended to represent a code has the word “code” in its name. Examples include: languageCode, raceCode, modeCode, standardIndustryClassCode, functionCode, and statusCode.

The one exception is the value element that is part of an observation clinical statement. It also can represent a code. Refer to the article The value element for more information.

Similarly, every element that has “code” in its name is intended to represent a code. There are no exceptions to this rule in CDA.

There are also a few attributes that take on codes as their assigned value. Refer to the articles: The classCode attributeThe typeCode attributeThe moodCode attribute, and The determinerCode attribute, for examples.

Note that the word “code” on its own serves as both the name of an element and the name of an attribute in CDA.

code and codeSystem Attributes
The two most fundamental attributes of XML elements in CDA that represent codes are code and codeSystem. For example:

<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>

<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>

<code code="47420-5" codeSystem="2.16.840.1.113883.6.1"/>

The codeSystem attribute contains an OID string that is associated with that code system by HL7. The code itself is in code.

displayName and codeSystemName
Corresponding to the code and codeSystem attributes are the attributes displayName and codeSystemName. These latter two attributes contains human-readable text that corresponds to the information in the first two. For example:

<religiousAffiliationCode code="1041" displayName="Roman Catholic"

<code code="140" 
   displayName="Influenza, seasonal, injectable, preservative free" 
   codeSystemName="Vaccines Administered (CVX)"/>

There is an optional codeSystemVersion attribute that is used when there is a need to specify a specific version/release for a given code system.

Simple Codes
Most CDA elements that represent a code will have all four attributes noted above (code, displayName, codeSystem, and codeSystemName). In a few cases, however, the code system is fixed and the codes are either self-explanatory or taken from a very small set that HL7 defines. In those special cases, only the code attribute is used, as in these examples:

<languageCode code="en-US"/>

<statusCode code="active"/>

<signatureCode code="S"/>

Additional Information
There are three optional sub-elements of XML attributes that represent codes in CDA – and each has its own article with more information: originalText, translation, and qualifier.

Refer to the article Value sets for an introduction to the “value set” concept that is prevalent in HL7 materials, including the CDA and C-CDA specifications, and an explanation of why most CDA PRO Know articles about codes in CDA, do not talk directly to the “value set” concept.

Other CDA PRO Know Articles Referenced In This Article