Professional Documents
Culture Documents
This letter addresses errata identified in CDA R1 and the informative schema. A
section is provided below to address each document.
CDA R1 ERRATA
The stylesheet issued with CDA R1 can be updated to handle both formats by
replacing this:
<xsl:template name='date'>
<xsl:param name='date'/>
<xsl:variable name='month' select='substring ($date, 6, 2)'/>
<xsl:choose>
<xsl:when test='$month=01'>
<xsl:text>January </xsl:text>
</xsl:when>
<xsl:when test='$month=02'>
<xsl:text>February </xsl:text>
</xsl:when>
<xsl:when test='$month=03'>
<xsl:text>March </xsl:text>
</xsl:when>
<xsl:when test='$month=04'>
<xsl:text>April </xsl:text>
1
It should be noted that CDA R2 and the final HL7 V3 datatype specification use the HL7 format.
1
</xsl:when>
<xsl:when test='$month=05'>
<xsl:text>May </xsl:text>
</xsl:when>
<xsl:when test='$month=06'>
<xsl:text>June </xsl:text>
</xsl:when>
<xsl:when test='$month=07'>
<xsl:text>July </xsl:text>
</xsl:when>
<xsl:when test='$month=08'>
<xsl:text>August </xsl:text>
</xsl:when>
<xsl:when test='$month=09'>
<xsl:text>September </xsl:text>
</xsl:when>
<xsl:when test='$month=10'>
<xsl:text>October </xsl:text>
</xsl:when>
<xsl:when test='$month=11'>
<xsl:text>November </xsl:text>
</xsl:when>
<xsl:when test='$month=12'>
<xsl:text>December </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test='substring ($date, 9, 1)="0"'>
<xsl:value-of select='substring ($date, 10, 1)'/><xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select='substring ($date, 9, 2)'/><xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select='substring ($date, 1, 4)'/>
</xsl:template>
with the following:
<xsl:template name="date">
<xsl:param name="date"/>
<xsl:choose>
<xsl:when test='substring ($date, 5, 1)="-"'>
<xsl:variable name="month" select="substring ($date, 6, 2)"/>
<xsl:choose>
<xsl:when test="$month=01">
2
<xsl:text>January </xsl:text>
</xsl:when>
<xsl:when test="$month=02">
<xsl:text>February </xsl:text>
</xsl:when>
<xsl:when test="$month=03">
<xsl:text>March </xsl:text>
</xsl:when>
<xsl:when test="$month=04">
<xsl:text>April </xsl:text>
</xsl:when>
<xsl:when test="$month=05">
<xsl:text>May </xsl:text>
</xsl:when>
<xsl:when test="$month=06">
<xsl:text>June </xsl:text>
</xsl:when>
<xsl:when test="$month=07">
<xsl:text>July </xsl:text>
</xsl:when>
<xsl:when test="$month=08">
<xsl:text>August </xsl:text>
</xsl:when>
<xsl:when test="$month=09">
<xsl:text>September </xsl:text>
</xsl:when>
<xsl:when test="$month=10">
<xsl:text>October </xsl:text>
</xsl:when>
<xsl:when test="$month=11">
<xsl:text>November </xsl:text>
</xsl:when>
<xsl:when test="$month=12">
<xsl:text>December </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test='substring ($date, 9, 1)="0"'>
<xsl:value-of select="substring ($date, 10, 1)"/>
<xsl:text>, </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring ($date, 9, 2)"/>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
3
</xsl:when>
<xsl:otherwise>
<xsl:variable name="month" select="substring ($date, 5, 2)"/>
<xsl:choose>
<xsl:when test="$month=01">
<xsl:text>January </xsl:text>
</xsl:when>
<xsl:when test="$month=02">
<xsl:text>February </xsl:text>
</xsl:when>
<xsl:when test="$month=03">
<xsl:text>March </xsl:text>
</xsl:when>
<xsl:when test="$month=04">
<xsl:text>April </xsl:text>
</xsl:when>
<xsl:when test="$month=05">
<xsl:text>May </xsl:text>
</xsl:when>
<xsl:when test="$month=06">
<xsl:text>June </xsl:text>
</xsl:when>
<xsl:when test="$month=07">
<xsl:text>July </xsl:text>
</xsl:when>
<xsl:when test="$month=08">
<xsl:text>August </xsl:text>
</xsl:when>
<xsl:when test="$month=09">
<xsl:text>September </xsl:text>
</xsl:when>
<xsl:when test="$month=10">
<xsl:text>October </xsl:text>
</xsl:when>
<xsl:when test="$month=11">
<xsl:text>November </xsl:text>
</xsl:when>
<xsl:when test="$month=12">
<xsl:text>December </xsl:text>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test='substring ($date, 7, 1)="0"'>
<xsl:value-of select="substring ($date, 8, 1)"/>
<xsl:text>, </xsl:text>
</xsl:when>
4
<xsl:otherwise>
<xsl:value-of select="substring ($date, 7, 2)"/>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="substring ($date, 1, 4)"/>
</xsl:template>
[2] PN datatype
The datatype DTD distributed with CDA R1 contains an error in the definition of
the PN datatype.
One erratum has been identified in the XML Schema for CDA Level 1, Release 1
document. The informative document stated erroneously, that there has been
defined a namespace cda: in the schemas “levelone_1.0.xsd” and
“header_1.0.xsd” and a dt: namespace in the “v3dt_1.0.xsd” and that CDA R1
XML instances therefore must use namespace prefixes. An original CDA
Release 1 XML instance neither needs to contain, nor requires to contain any
namespace.
5
In addition to being distributed to all members, this letter and the updated
schemas will be incorporated into the package that is distributed to those who
purchase a copy of the CDA, R1. The CDA, R1 package available on the web
site under Member Downloads will also be updated accordingly. Members can
download a copy of this letter and the attached schemas at
http://www.hl7.org/memonly/downloads/home_download.cfm.