This section defines a linking mechanism that allows entries or portions thereof to be connected to the text of the clinical document.
Each clinical statement that can be made in a CDA Document or HL7 Version 3 message shall be attributable to one or more authors. These are found in <author> elements, either directly within the clinical statement, or in one of its ancestors in the XML document or message.
===== Standards =====
Each clinical statement may also contain information from zero or more informants. These are found in <informant> elements, again, either directly within the clinical statement, or in one of its ancestors in the XML document or message.
{|
{{Std|RIM|HL7 Version 3 Reference Information Model}}
Elements within the narrative <text> will use the ID attribute to provide a destination for links. Elements within an <entry> will be linked to the text via a URI reference using this attribute as the fragment identifier. This links the coded entry to the specific narrative text it is related to within the CDA instance, and can be traversed in either direction. This serves three purposes:
Authors shall be described in an <author> element that is either directly on the clinical statement, or which can be reached by one of its ancestors.
# It supports diagnostics during software development and testing.
===== <time value=' '/>=====
# It provides a mechanism to enrich the markup that can be supported in the viewing application.
The time of authorship shall be recorded in the <time> element.
# It eliminates the need to duplicate content in two places, which prevents a common source of error, and eliminates steps needed to validate that content that should be identical in fact is.
In a CDA document details about the author are provided in the <assignedAuthor> element. In Version 3 messages, they are provided in the <assignedEntity1> element. The semantics are identical even though the element names differ.
The identifier of the author, and their address and telephone number shall be present inside the <id>, <addr> and <telecom> elements.
Each narrative content element within CDA may have an ID attribute. This attribute is of type xs:ID. This means that each ID in the document must be unique within that document. Within an XML document, an attribute of type xs:ID must start with a letter, and may be followed one or more letters, digits, hyphens or underscores .
This allows the text to be located with a special type of URI reference, which simply contains a fragment identifier. This URI is local to the document and so just begins with a hash mark (#), and is followed by the value of the ID being referenced.
Given one of these URIs stored in a variable named theURI, the necessary text value can be found via the following XPath expression:
string(//*[@ID=substring-after('#',$theURI)])
The table below shows the result of this expression using the examples above:
{|border=1
|+URI Dereference Result
|-bgcolor="#D9D9D9"
!$theURI!!Returned Value
|-
|"#bar"||"Table Cell 1"
|-
|"#foo"||"Table Cell 1Table Cell 2" (note the spacing issue between 1 and T)
|-
|"#p-1"||"A paragraph with content"
|-
|"#c-1"||"with content"
|}
If your XSLT processor is schema aware, even more efficient mechanisms exist to locate the element than the above expression.
Having identified the critical text in the narrative, any elements using the HL7 CD datatype (e.g., <code>) can then contain a <reference> to the <originalText> found in the narrative. That is why, although CDA allows <value> to be of any type in <entry> elements, this profile restricts them to always be of xsi:type='CD'.
Now, given an item with an ID stored in a variable named theID all <reference> elements referring to it can be found via the following XPath expression:
Each clinical statement that can be made in a CDA Document or HL7 Version 3 message shall be attributable to one or more authors. These are found in <author> elements, either directly within the clinical statement, or in one of its ancestors in the XML document or message.
Each clinical statement may also contain information from zero or more informants. These are found in <informant> elements, again, either directly within the clinical statement, or in one of its ancestors in the XML document or message.
<author>
Authors shall be described in an <author> element that is either directly on the clinical statement, or which can be reached by one of its ancestors.
In a CDA document details about the author are provided in the <assignedAuthor> element. In Version 3 messages, they are provided in the <assignedEntity1> element. The semantics are identical even though the element names differ.
The identifier of the author, and their address and telephone number shall be present inside the <id>, <addr> and <telecom> elements.