Note: Prior to reading this article, if you need an overview of XML Namespaces as they pertain to CDA, we recommend that you invest five minutes to review the CDA PRO Learn session titled XML Namespaces.

The XML namespace for the XML Schema standard is, by convention, assigned to the XML Namespace prefix xsi:. This Namespace is defined by W3C as part of the XML Schema standard.

XML Schema is used to validate CDA documents. For an overview of XML Schema as it pertains to CDA, we recommend that you invest five minutes to review the CDA PRO Learn session titled XML Schema.

In XML Schema, datatypes are defined that specify what kind of data XML attributes and element content is allowed to contain. Automated validation is then done to ensure the XML file meets the schema.

XML Schema datatypes and derived from each other. For example, a data type that takes single-digit numbers can be derived from a more generic integer data type. Sometimes, you can’t tell from the XML syntax alone which data type is being used. For example, in the example just noted, can the number be more than one digit (is it supposed to adhere to the more generic or more specific datatype)?

The xsi:type attribute is used to make it clear which XML Schema datatype is intended, when it would otherwise be ambiguous.

The XML Schema for CDA defines a datatype called “ANY” which is not intended to be used directly, only to be the generic base datatype for deriving more specific datatypes. Anywhere this datatype is used, it is required that the xsi:type attribute be used.

For example, the value element located under an observation clinical statement always needs the xsi:type attribute present, as shown in the example below:

Other CDA PRO Know Articles Referenced In This Article

Related CDA PRO Learn Sessions