Changeset 909 for qrda/schematron


Ignore:
Timestamp:
Aug 16, 2010, 10:42:20 AM (14 years ago)
Author:
George Lilly
Message:

latest

Location:
qrda/schematron
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • qrda/schematron/go.sh

    r906 r909  
    11java -jar saxon9he.jar -o schema_compiled.xsl qrdaCat1.sch iso_schematron_message_xslt2.xsl
    2 java -jar saxon9he.jar QRDA_CategoryI.xml schema_compiled.xsl
     2java -jar saxon9he.jar QRDA_CategoryI_2011-Test.xml schema_compiled.xsl
  • qrda/schematron/schema_compiled.xsl

    r906 r909  
    172172                <!--ASSERT -->
    173173<xsl:choose>
    174          <xsl:when test=".//cda:templateId/@root=&#34;2.16.840.1.113883.10.20.12&#34;"/>
    175          <xsl:otherwise>
    176             <xsl:message>
    177        Error: CONF-QRDA-I-5: The value of one ClinicalDocument/templateId/@root SHALL be
    178        2.16.840.1.113883.10.20.12 representing conformance to the generic
    179        QRDA Category I framework constraints.
    180      (.//cda:templateId/@root="2.16.840.1.113883.10.20.12")</xsl:message>
     174         <xsl:when test=".//cda:realmCode[@code = &#34;US&#34;]"/>
     175         <xsl:otherwise>
     176            <xsl:message>
     177       Error: CONF-QRDA1-I: The realmCode element SHALL be present where the value of @code is US.
     178     (.//cda:realmCode[@code = "US"])</xsl:message>
     179         </xsl:otherwise>
     180      </xsl:choose>
     181
     182                    <!--ASSERT -->
     183<xsl:choose>
     184         <xsl:when test=".//cda:typeId[@root = &#34;2.16.840.1.113883.1.3&#34; and @extension = &#34;POCD_HD000040&#34;]"/>
     185         <xsl:otherwise>
     186            <xsl:message>
     187       Error: CONF-QRDA1-2: The value of typeId/@root SHALL be 2.16.840.1.113883.1.3 and value of
     188       typeId/@extension SHALL be POCD_HD000040.
     189     (.//cda:typeId[@root = "2.16.840.1.113883.1.3" and @extension = "POCD_HD000040"])</xsl:message>
     190         </xsl:otherwise>
     191      </xsl:choose>
     192
     193                    <!--ASSERT -->
     194<xsl:choose>
     195         <xsl:when test="not(cda:ClinicalDocument/cda:templateId) = 0"/>
     196         <xsl:otherwise>
     197            <xsl:message>
     198      Error: CONF-QRDA1-3 The CMS EHR QRDA Report SHALL contain at least one ClincalDocument/templateId element
     199     (not(cda:ClinicalDocument/cda:templateId) = 0)</xsl:message>
     200         </xsl:otherwise>
     201      </xsl:choose>
     202
     203                    <!--ASSERT -->
     204<xsl:choose>
     205         <xsl:when test=".//cda:templateId/@root=&#34;2.16.840.1.113883.10.20.12&#34; and .//cda:templateId/@root=&#34;2.16.840.1.113883.3.249.11.100.1&#34;"/>
     206         <xsl:otherwise>
     207            <xsl:message>
     208       Error: CONF-QRDA-I-4: The value of one ClinicalDocument/templateId/@root SHALL be
     209       2.16.840.1.113883.10.20.12 and PQRI QRDA category I templateId 'root' value SHALL be 2.16.840.1.113883.3.249.11.100.1.
     210     (.//cda:templateId/@root="2.16.840.1.113883.10.20.12" and .//cda:templateId/@root="2.16.840.1.113883.3.249.11.100.1")</xsl:message>
    181211         </xsl:otherwise>
    182212      </xsl:choose>
     
    190220                <!--ASSERT -->
    191221<xsl:choose>
    192          <xsl:when test="cda:realmCode[@code = &#34;US&#34;]"/>
    193          <xsl:otherwise>
    194             <xsl:message>
    195        Error: CONF-QRDA-I-2: The realmCode element SHALL be present where the value of @code is US.
    196      (cda:realmCode[@code = "US"])</xsl:message>
    197          </xsl:otherwise>
    198       </xsl:choose>
    199 
    200                     <!--ASSERT -->
    201 <xsl:choose>
    202          <xsl:when test="cda:typeId[@root = &#34;2.16.840.1.113883.1.3&#34; and @extension = &#34;POCD_HD000040&#34;]"/>
    203          <xsl:otherwise>
    204             <xsl:message>
    205        Error: CONF-QRDA-I-3: The value of typeId/@root SHALL be 2.16.840.1.113883.1.3 and value of
    206        typeId/@extension SHALL be POCD_HD000040.
    207      (cda:typeId[@root = "2.16.840.1.113883.1.3" and @extension = "POCD_HD000040"])</xsl:message>
    208          </xsl:otherwise>
    209       </xsl:choose>
    210 
    211                     <!--ASSERT -->
    212 <xsl:choose>
    213222         <xsl:when test="count(cda:code) = 1 and cda:code[@code=&#34;55182-0&#34; and @codeSystem=&#34;2.16.840.1.113883.6.1&#34;]"/>
    214223         <xsl:otherwise>
    215224            <xsl:message>
    216        Error: CONF-QRDA-I-6: A QRDA Category I report SHALL contain exactly one
     225       Error: CONF-QRDA1-7: A QRDA Category I report SHALL contain exactly one
    217226       ClinicalDocument/code with a value of 55182-0 2.16.840.1.113883.6.1
    218227       LOINC STATIC.
     
    226235         <xsl:otherwise>
    227236            <xsl:message>
    228        Error: CONF-QRDA-I-7: A QRDA Category I report SHALL contain exactly one
     237       Error: CONF-QRDA1-8: A QRDA Category I report SHALL contain exactly one
    229238       ClinicalDocument/title element valued with a case-insensitive, text
    230239       string containing "QRDA Incidence Report" or "Quality measure
     
    236245                    <!--ASSERT -->
    237246<xsl:choose>
     247         <xsl:when test="string-length(cda:effectiveTime/@value) &gt;= 8"/>
     248         <xsl:otherwise>
     249            <xsl:message>
     250       Error: CONF-QRDA1-10 The effectiveTime value attribute value SHALL be at least precise to the day YYYYMMDD.
     251     (string-length(cda:effectiveTime/@value) &gt;= 8)</xsl:message>
     252         </xsl:otherwise>
     253      </xsl:choose>
     254
     255                    <!--ASSERT -->
     256<xsl:choose>
     257         <xsl:when test="cda:confidentialityCode[@code=&#34;N&#34; and @codeSystem=&#34;2.16.840.1.113883.5.25&#34;]"/>
     258         <xsl:otherwise>
     259            <xsl:message>
     260      Error: CONF-QRDA1-12: The confidentialityCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.25. The confidentialityCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.25
     261     (cda:confidentialityCode[@code="N" and @codeSystem="2.16.840.1.113883.5.25"])</xsl:message>
     262         </xsl:otherwise>
     263      </xsl:choose>
     264
     265                    <!--ASSERT -->
     266<xsl:choose>
     267         <xsl:when test="not(cda:setId) = 0"/>
     268         <xsl:otherwise>
     269            <xsl:message>
     270      Error: CONF-QRDA1-13: setId element is missing. The 'setId' element SHALL be present.
     271     (not(cda:setId) = 0)</xsl:message>
     272         </xsl:otherwise>
     273      </xsl:choose>
     274
     275                    <!--ASSERT -->
     276<xsl:choose>
     277         <xsl:when test="not(cda:versionNumber) = 0"/>
     278         <xsl:otherwise>
     279            <xsl:message>
     280      Error: CONF-QRDA1-16  versionNumber element is missing. The 'versionNumber' element SHALL be present.
     281     (not(cda:versionNumber) = 0)</xsl:message>
     282         </xsl:otherwise>
     283      </xsl:choose>
     284
     285                    <!--ASSERT -->
     286<xsl:choose>
     287         <xsl:when test="cda:versionNumber/@value castable as xs:integer"/>
     288         <xsl:otherwise>
     289            <xsl:message>
     290      Error: CONF-QRDA1-17: versionNumber/@value SHALL be an integer
     291      (cda:versionNumber/@value castable as xs:integer)</xsl:message>
     292         </xsl:otherwise>
     293      </xsl:choose>
     294
     295                    <!--ASSERT -->
     296<xsl:choose>
    238297         <xsl:when test="count(cda:recordTarget/cda:patientRole) = 1"/>
    239298         <xsl:otherwise>
    240299            <xsl:message>
    241        Error: CONF-QRDA-I-8: A QRDA Category I report SHALL contain exactly one
     300       Error: CONF-QRDA1-18: A QRDA Category I report SHALL contain exactly one
    242301       ClinicalDocument/recordTarget/PatientRole.
    243302     (count(cda:recordTarget/cda:patientRole) = 1)</xsl:message>
     
    247306                    <!--ASSERT -->
    248307<xsl:choose>
    249          <xsl:when test="cda:author/cda:assignedAuthor/cda:assignedPerson or                   cda:author/cda:assignedAuthor/cda:assignedAuthoringDevice "/>
    250          <xsl:otherwise>
    251             <xsl:message>
    252        Error: CONF-QRDA-I-9: A QRDA Category I report SHALL contain one or more
    253         ClinicalDocument/author/assignedAuthor/assignedPerson and/or
    254         ClinicalDocument/author/assignedAuthor/assignedAuthoringDevice.
    255      (cda:author/cda:assignedAuthor/cda:assignedPerson or cda:author/cda:assignedAuthor/cda:assignedAuthoringDevice)</xsl:message>
     308         <xsl:when test="cda:recordTarget/cda:patientRole/cda:id[@root = &#34;2.16.840.1.113883.4.1&#34; or @root = &#34;2.16.840.1.113883.4.2&#34; or @root = &#34;2.16.840.1.113883.4.3.40&#34; or @root = &#34;2.16.840.1.113883.4.3.49&#34; or @root = &#34;2.16.840.1.113883.4.3.38&#34; or @root = &#34;2.16.840.1.113883.4.3.37&#34; or @root = &#34;2.16.840.1.113883.4.3.36&#34; or @root = &#34;2.16.840.1.113883.4.3.35&#34; or @root = &#34;2.16.840.1.113883.4.3.34&#34; or @root = &#34;2.16.840.1.113883.4.3.48&#34; or @root = &#34;2.16.840.1.113883.4.3.32&#34; or @root = &#34;2.16.840.1.113883.4.3.39&#34; or @root = &#34;2.16.840.1.113883.4.3.15&#34; or @root = &#34;2.16.840.1.113883.4.3.51&#34; or @root = &#34;2.16.840.1.113883.4.3.53&#34; or @root = &#34;2.16.840.1.113883.4.3.54&#34; or @root = &#34;2.16.840.1.113883.4.3.55&#34; or @root = &#34;2.16.840.1.113883.4.3.56&#34; or @root = &#34;2.16.840.1.113883.4.3.42&#34; or @root = &#34;2.16.840.1.113883.4.3.47&#34; or @root = &#34;2.16.840.1.113883.4.3.41&#34; or @root = &#34;2.16.840.1.113883.4.3.46&#34; or @root = &#34;2.16.840.1.113883.4.3.45&#34; or @root = &#34;2.16.840.1.113883.4.3.31&#34; or @root = &#34;2.16.840.1.113883.4.3.50&#34; or @root = &#34;2.16.840.1.113883.4.3.30&#34; or @root = &#34;2.16.840.1.113883.4.3.44&#34; or @root = &#34;2.16.840.1.113883.4.3.16&#34; or @root = &#34;2.16.840.1.113883.4.3.5&#34; or @root = &#34;2.16.840.1.113883.4.3.9&#34; or @root = &#34;2.16.840.1.113883.4.3.8&#34; or @root = &#34;2.16.840.1.113883.4.3.6&#34; or @root = &#34;2.16.840.1.113883.4.3.33&#34; or @root = &#34;2.16.840.1.113883.4.3.11&#34; or @root = &#34;2.16.840.1.113883.4.3.10&#34; or @root = &#34;2.16.840.1.113883.4.3.12&#34; or @root = &#34;2.16.840.1.113883.4.3.4&#34; or @root = &#34;2.16.840.1.113883.4.3.2&#34; or @root = &#34;2.16.840.1.113883.4.3.1&#34; or @root = &#34;2.16.840.1.113883.4.3&#34; or @root = &#34;2.16.840.1.113883.4.3.17&#34; or @root = &#34;2.16.840.1.113883.4.3.26&#34; or @root = &#34;2.16.840.1.113883.4.3.29&#34; or @root = &#34;2.16.840.1.113883.4.3.18&#34; or @root = &#34;2.16.840.1.113883.4.3.28&#34; or @root = &#34;2.16.840.1.113883.4.3.25&#34; or @root = &#34;2.16.840.1.113883.4.3.24&#34; or @root = &#34;2.16.840.1.113883.4.3.23&#34; or @root = &#34;2.16.840.1.113883.4.3.13&#34; or @root = &#34;2.16.840.1.113883.4.3.22&#34; or @root = &#34;2.16.840.1.113883.4.3.21&#34; or @root = &#34;2.16.840.1.113883.4.3.20&#34; or @root = &#34;2.16.840.1.113883.4.3.19&#34; or @root = &#34;2.16.840.1.113883.4.3.27&#34; or @root = &#34;2.16.840.1.113883.4.4&#34; or @root = &#34;2.16.840.1.113883.4.5&#34; and @extension = &#34;*&#34;]"/>
     309         <xsl:otherwise>
     310            <xsl:message>
     311    Error:  CONF-QRDA1-19 @root contains OID for the coding system used to identify the patient.  The value of @extension is the unique patient identifier the EHR sysetm uses fo record activity on a patient.  Commonly used OIDs for entries to identify patient sucha as SSN, TIN, DLN, etc. are available at Appendix_L-OIDs tab of the Downloadable Resources table.
     312     (cda:recordTarget/cda:patientRole/cda:id[@root = "2.16.840.1.113883.4.1" or @root = "2.16.840.1.113883.4.2" or @root = "2.16.840.1.113883.4.3.40" or @root = "2.16.840.1.113883.4.3.49" or @root = "2.16.840.1.113883.4.3.38" or @root = "2.16.840.1.113883.4.3.37" or @root = "2.16.840.1.113883.4.3.36" or @root = "2.16.840.1.113883.4.3.35" or @root = "2.16.840.1.113883.4.3.34" or @root = "2.16.840.1.113883.4.3.48" or @root = "2.16.840.1.113883.4.3.32" or @root = "2.16.840.1.113883.4.3.39" or @root = "2.16.840.1.113883.4.3.15" or @root = "2.16.840.1.113883.4.3.51" or @root = "2.16.840.1.113883.4.3.53" or @root = "2.16.840.1.113883.4.3.54" or @root = "2.16.840.1.113883.4.3.55" or @root = "2.16.840.1.113883.4.3.56" or @root = "2.16.840.1.113883.4.3.42" or @root = "2.16.840.1.113883.4.3.47" or @root = "2.16.840.1.113883.4.3.41" or @root = "2.16.840.1.113883.4.3.46" or @root = "2.16.840.1.113883.4.3.45" or @root = "2.16.840.1.113883.4.3.31" or @root = "2.16.840.1.113883.4.3.50" or @root = "2.16.840.1.113883.4.3.30" or @root = "2.16.840.1.113883.4.3.44" or @root = "2.16.840.1.113883.4.3.16" or @root = "2.16.840.1.113883.4.3.5" or @root = "2.16.840.1.113883.4.3.9" or @root = "2.16.840.1.113883.4.3.8" or @root = "2.16.840.1.113883.4.3.6" or @root = "2.16.840.1.113883.4.3.33" or @root = "2.16.840.1.113883.4.3.11" or @root = "2.16.840.1.113883.4.3.10" or @root = "2.16.840.1.113883.4.3.12" or @root = "2.16.840.1.113883.4.3.4" or @root = "2.16.840.1.113883.4.3.2" or @root = "2.16.840.1.113883.4.3.1" or @root = "2.16.840.1.113883.4.3" or @root = "2.16.840.1.113883.4.3.17" or @root = "2.16.840.1.113883.4.3.26" or @root = "2.16.840.1.113883.4.3.29" or @root = "2.16.840.1.113883.4.3.18" or @root = "2.16.840.1.113883.4.3.28" or @root = "2.16.840.1.113883.4.3.25" or @root = "2.16.840.1.113883.4.3.24" or @root = "2.16.840.1.113883.4.3.23" or @root = "2.16.840.1.113883.4.3.13" or @root = "2.16.840.1.113883.4.3.22" or @root = "2.16.840.1.113883.4.3.21" or @root = "2.16.840.1.113883.4.3.20" or @root = "2.16.840.1.113883.4.3.19" or @root = "2.16.840.1.113883.4.3.27" or @root = "2.16.840.1.113883.4.4" or @root = "2.16.840.1.113883.4.5" and @extension = "*"])</xsl:message>
     313         </xsl:otherwise>
     314      </xsl:choose>
     315
     316                    <!--ASSERT -->
     317<xsl:choose>
     318         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:patient/cda:name) &gt;= 1"/>
     319         <xsl:otherwise>
     320            <xsl:message>
     321       Error:  CONF-QRDA1-23 patient's legal 'name' element is expected at least once. The patient's legal 'name' element SHALL be submitted at least exactly once.
     322     (count(cda:recordTarget/cda:patientRole/cda:patient/cda:name) &gt;= 1)</xsl:message>
     323         </xsl:otherwise>
     324      </xsl:choose>
     325
     326                    <!--ASSERT -->
     327<xsl:choose>
     328         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given) &gt;= 1"/>
     329         <xsl:otherwise>
     330            <xsl:message>
     331       Error:  CONF-QRDA1-24 patient's legal name 'given' (first name) element is expected at least once. The patient's legal 'given' (first name) element SHALL be submitted at least exactly once.
     332     (count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given) &gt;= 1)</xsl:message>
     333         </xsl:otherwise>
     334      </xsl:choose>
     335
     336                    <!--ASSERT -->
     337<xsl:choose>
     338         <xsl:when test="string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given/@value) &lt;= 30"/>
     339         <xsl:otherwise>
     340            <xsl:message>
     341       Error:  CONF-QRDA1-24 patient's legal name 'given' (first name) element value length SHALL not be more than 30 characters. patient's legal name 'given' (first name) element value length SHALL not be more than 30 characters.
     342     (string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given/@value) &lt;= 30)</xsl:message>
     343         </xsl:otherwise>
     344      </xsl:choose>
     345
     346                    <!--ASSERT -->
     347<xsl:choose>
     348         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family) &gt;= 1"/>
     349         <xsl:otherwise>
     350            <xsl:message>
     351       Error:  CONF-QRDA1-25 patient's legal name 'family' (last name) element is expected at least once. The patient's legal 'family' (last name) element SHALL be submitted at least exactly once.
     352     (count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family) &gt;= 1)</xsl:message>
     353         </xsl:otherwise>
     354      </xsl:choose>
     355
     356                    <!--ASSERT -->
     357<xsl:choose>
     358         <xsl:when test="string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family/@value) &lt;= 30"/>
     359         <xsl:otherwise>
     360            <xsl:message>
     361       Error:  CONF-QRDA1-25 patient's legal name 'family' (last name) element value length SHALL not be more than 30 characters. patient's legal name 'family' (last name) element value length SHALL not be more than 30 characters.
     362     (string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family/@value) &lt;= 30)</xsl:message>
     363         </xsl:otherwise>
     364      </xsl:choose>
     365
     366                    <!--ASSERT -->
     367<xsl:choose>
     368         <xsl:when test="cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@codeSystem=&#34;2.16.840.1.113883.5.50&#34;]"/>
     369         <xsl:otherwise>
     370            <xsl:message>
     371    Error:  CONF-QRDA1-26 The patient's ethnic group code 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.50'.
     372     (cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@codeSystem="2.16.840.1.113883.5.50"])</xsl:message>
     373         </xsl:otherwise>
     374      </xsl:choose>
     375
     376                    <!--ASSERT -->
     377<xsl:choose>
     378         <xsl:when test="cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@code = &#34;2135-2&#34; or @code = &#34;2137-8&#34; or @code = &#34;2138-6&#34; or @code = &#34;2139-4&#34; or @code = &#34;2140-2&#34; or @code = &#34;2141-0&#34; or @code = &#34;2142-8&#34; or @code = &#34;2143-6&#34; or @code = &#34;2144-4&#34; or @code = &#34;2145-1&#34; or @code = &#34;2146-9&#34; or @code = &#34;2148-5&#34; or @code = &#34;2149-3&#34; or @code = &#34;2150-1&#34; or @code = &#34;2151-9&#34; or @code = &#34;2152-7&#34; or @code = &#34;2153-5&#34; or @code = &#34;2155-0&#34; or @code = &#34;2156-8&#34; or @code = &#34;2157-6&#34; or @code = &#34;2158-4&#34; or @code = &#34;2159-2&#34; or @code = &#34;2160-0&#34; or @code = &#34;2161-8&#34; or @code = &#34;2162-6&#34; or @code = &#34;2163-4&#34; or @code = &#34;2165-9&#34; or @code = &#34;2166-7&#34; or @code = &#34;2167-5&#34; or @code = &#34;2168-3&#34; or @code = &#34;2169-1&#34; or @code = &#34;2170-9&#34; or @code = &#34;2171-7&#34; or @code = &#34;2172-5&#34; or @code = &#34;2173-3&#34; or @code = &#34;2174-1&#34; or @code = &#34;2175-8&#34; or @code = &#34;2176-6&#34; or @code = &#34;2178-2&#34; or @code = &#34;2180-8&#34; or @code = &#34;2182-4&#34; or @code = &#34;2184-0&#34; or @code = &#34;2186-5&#34;]"/>
     379         <xsl:otherwise>
     380            <xsl:message>
     381    Error:  CONF-QRDA1-26  The patient's ethnic group 'code' value SHALL be valid according to Appendix_M-Ethnicity in the posted Downloadable Resource table.
     382     (cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@code = "2135-2" or @code = "2137-8" or @code = "2138-6" or @code = "2139-4" or @code = "2140-2" or @code = "2141-0" or @code = "2142-8" or @code = "2143-6" or @code = "2144-4" or @code = "2145-1" or @code = "2146-9" or @code = "2148-5" or @code = "2149-3" or @code = "2150-1" or @code = "2151-9" or @code = "2152-7" or @code = "2153-5" or @code = "2155-0" or @code = "2156-8" or @code = "2157-6" or @code = "2158-4" or @code = "2159-2" or @code = "2160-0" or @code = "2161-8" or @code = "2162-6" or @code = "2163-4" or @code = "2165-9" or @code = "2166-7" or @code = "2167-5" or @code = "2168-3" or @code = "2169-1" or @code = "2170-9" or @code = "2171-7" or @code = "2172-5" or @code = "2173-3" or @code = "2174-1" or @code = "2175-8" or @code = "2176-6" or @code = "2178-2" or @code = "2180-8" or @code = "2182-4" or @code = "2184-0" or @code = "2186-5"])</xsl:message>
     383         </xsl:otherwise>
     384      </xsl:choose>
     385
     386                    <!--ASSERT -->
     387<xsl:choose>
     388         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode)"/>
     389         <xsl:otherwise>
     390            <xsl:message>
     391    Error:  CONF-QRDA1-27 The 'administrativeGenderCode' element SHALL be present.
     392     ((cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode))</xsl:message>
     393         </xsl:otherwise>
     394      </xsl:choose>
     395
     396                    <!--ASSERT -->
     397<xsl:choose>
     398         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@codeSystem = &#34;2.16.840.1.113883.5.1&#34;])"/>
     399         <xsl:otherwise>
     400            <xsl:message>
     401    Error:  CONF-QRDA1-27 The patient's administrativeGenderCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.1'.
     402     ((cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@codeSystem = "2.16.840.1.113883.5.1"]))</xsl:message>
     403         </xsl:otherwise>
     404      </xsl:choose>
     405
     406                    <!--ASSERT -->
     407<xsl:choose>
     408         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@code=&#34;M&#34; or @code=&#34;F&#34; or @code=&#34;UN&#34;])"/>
     409         <xsl:otherwise>
     410            <xsl:message>
     411    Error:  CONF-QRDA1-27 The patient's administrative gender 'code'  value SHALL be valid according to Appendix_N-Gender in the posted Downloadable Resource table.
     412     ((cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@code="M" or @code="F" or @code="UN"]))</xsl:message>
     413         </xsl:otherwise>
     414      </xsl:choose>
     415
     416                    <!--ASSERT -->
     417<xsl:choose>
     418         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode)"/>
     419         <xsl:otherwise>
     420            <xsl:message>
     421    Error:  CONF-QRDA1-28 The 'raceCode' element SHALL be present.
     422     ((cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode))</xsl:message>
     423         </xsl:otherwise>
     424      </xsl:choose>
     425
     426                    <!--ASSERT -->
     427<xsl:choose>
     428         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@codeSystem = &#34;2.16.840.1.113883.5.104&#34;])"/>
     429         <xsl:otherwise>
     430            <xsl:message>
     431    Error:  CONF-QRDA1-28 The patient's raceCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.104'.
     432     ((cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@codeSystem = "2.16.840.1.113883.5.104"]))</xsl:message>
     433         </xsl:otherwise>
     434      </xsl:choose>
     435
     436                    <!--ASSERT -->
     437<xsl:choose>
     438         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@code = &#34;1002-5&#34; or @code = &#34;1004-1&#34; or @code = &#34;1006-6&#34; or @code = &#34;1008-2&#34; or @code = &#34;1010-8&#34; or @code = &#34;1011-6&#34; or @code = &#34;1012-4&#34; or @code = &#34;1013-2&#34; or @code = &#34;1014-0&#34; or @code = &#34;1015-7&#34; or @code = &#34;1016-5&#34; or @code = &#34;1017-3&#34; or @code = &#34;1018-1&#34; or @code = &#34;1019-9&#34; or @code = &#34;1021-5&#34; or @code = &#34;1022-3&#34; or @code = &#34;1023-1&#34; or @code = &#34;1024-9&#34; or @code = &#34;1026-4&#34; or @code = &#34;1028-0&#34; or @code = &#34;1030-6&#34; or @code = &#34;1031-4&#34; or @code = &#34;1033-0&#34; or @code = &#34;1035-5&#34; or @code = &#34;1037-1&#34; or @code = &#34;1039-7&#34; or @code = &#34;1041-3&#34; or @code = &#34;1042-1&#34; or @code = &#34;1044-7&#34; or @code = &#34;1045-4&#34; or @code = &#34;1046-2&#34; or @code = &#34;1047-0&#34; or @code = &#34;1048-8&#34; or @code = &#34;1049-6&#34; or @code = &#34;1050-4&#34; or @code = &#34;1051-2&#34; or @code = &#34;1053-8&#34; or @code = &#34;1054-6&#34; or @code = &#34;1055-3&#34; or @code = &#34;1056-1&#34; or @code = &#34;1057-9&#34; or @code = &#34;1058-7&#34; or @code = &#34;1059-5&#34; or @code = &#34;1060-3&#34; or @code = &#34;1061-1&#34; or @code = &#34;1062-9&#34; or @code = &#34;1063-7&#34; or @code = &#34;1064-5&#34; or @code = &#34;1065-2&#34; or @code = &#34;1066-0&#34; or @code = &#34;1068-6&#34; or @code = &#34;1069-4&#34; or @code = &#34;1070-2&#34; or @code = &#34;1071-0&#34; or @code = &#34;1072-8&#34; or @code = &#34;1073-6&#34; or @code = &#34;1074-4&#34; or @code = &#34;1076-9&#34; or @code = &#34;1078-5&#34; or @code = &#34;1080-1&#34; or @code = &#34;1082-7&#34; or @code = &#34;1083-5&#34; or @code = &#34;1084-3&#34; or @code = &#34;1086-8&#34; or @code = &#34;1088-4&#34; or @code = &#34;1089-2&#34; or @code = &#34;1090-0&#34; or @code = &#34;1091-8&#34; or @code = &#34;1092-6&#34; or @code = &#34;1093-4&#34; or @code = &#34;1094-2&#34; or @code = &#34;1095-9&#34; or @code = &#34;1096-7&#34; or @code = &#34;1097-5&#34; or @code = &#34;1098-3&#34; or @code = &#34;1100-7&#34; or @code = &#34;1102-3&#34; or @code = &#34;1103-1&#34; or @code = &#34;1104-9&#34; or @code = &#34;1106-4&#34; or @code = &#34;1108-0&#34; or @code = &#34;1109-8&#34; or @code = &#34;1110-6&#34; or @code = &#34;1112-2&#34; or @code = &#34;1114-8&#34; or @code = &#34;1115-5&#34; or @code = &#34;1116-3&#34; or @code = &#34;1117-1&#34; or @code = &#34;1118-9&#34; or @code = &#34;1119-7&#34; or @code = &#34;1120-5&#34; or @code = &#34;1121-3&#34; or @code = &#34;1123-9&#34; or @code = &#34;1124-7&#34; or @code = &#34;1125-4&#34; or @code = &#34;1126-2&#34; or @code = &#34;1127-0&#34; or @code = &#34;1128-8&#34; or @code = &#34;1129-6&#34; or @code = &#34;1130-4&#34; or @code = &#34;1131-2&#34; or @code = &#34;1132-0&#34; or @code = &#34;1133-8&#34; or @code = &#34;1134-6&#34; or @code = &#34;1135-3&#34; or @code = &#34;1136-1&#34; or @code = &#34;1137-9&#34; or @code = &#34;1138-7&#34; or @code = &#34;1139-5&#34; or @code = &#34;1140-3&#34; or @code = &#34;1141-1&#34; or @code = &#34;1142-9&#34; or @code = &#34;1143-7&#34; or @code = &#34;1144-5&#34; or @code = &#34;1145-2&#34; or @code = &#34;1146-0&#34; or @code = &#34;1147-8&#34; or @code = &#34;1148-6&#34; or @code = &#34;1150-2&#34; or @code = &#34;1151-0&#34; or @code = &#34;1153-6&#34; or @code = &#34;1155-1&#34; or @code = &#34;1156-9&#34; or @code = &#34;1157-7&#34; or @code = &#34;1158-5&#34; or @code = &#34;1159-3&#34; or @code = &#34;1160-1&#34; or @code = &#34;1162-7&#34; or @code = &#34;1163-5&#34; or @code = &#34;1165-0&#34; or @code = &#34;1167-6&#34; or @code = &#34;1169-2&#34; or @code = &#34;1171-8&#34; or @code = &#34;1173-4&#34; or @code = &#34;1175-9&#34; or @code = &#34;1176-7&#34; or @code = &#34;1178-3&#34; or @code = &#34;1180-9&#34; or @code = &#34;1182-5&#34; or @code = &#34;1184-1&#34; or @code = &#34;1186-6&#34; or @code = &#34;1187-4&#34; or @code = &#34;1189-0&#34; or @code = &#34;1191-6&#34; or @code = &#34;1193-2&#34; or @code = &#34;1194-0&#34; or @code = &#34;1195-7&#34; or @code = &#34;1196-5&#34; or @code = &#34;1197-3&#34; or @code = &#34;1198-1&#34; or @code = &#34;1199-9&#34; or @code = &#34;1200-5&#34; or @code = &#34;1201-3&#34; or @code = &#34;1202-1&#34; or @code = &#34;1203-9&#34; or @code = &#34;1204-7&#34; or @code = &#34;1205-4&#34; or @code = &#34;1207-0&#34; or @code = &#34;1209-6&#34; or @code = &#34;1211-2&#34; or @code = &#34;1212-0&#34; or @code = &#34;1214-6&#34; or @code = &#34;1215-3&#34; or @code = &#34;1216-1&#34; or @code = &#34;1217-9&#34; or @code = &#34;1218-7&#34; or @code = &#34;1219-5&#34; or @code = &#34;1220-3&#34; or @code = &#34;1222-9&#34; or @code = &#34;1223-7&#34; or @code = &#34;1224-5&#34; or @code = &#34;1225-2&#34; or @code = &#34;1226-0&#34; or @code = &#34;1227-8&#34; or @code = &#34;1228-6&#34; or @code = &#34;1229-4&#34; or @code = &#34;1230-2&#34; or @code = &#34;1231-0&#34; or @code = &#34;1233-6&#34; or @code = &#34;1234-4&#34; or @code = &#34;1235-1&#34; or @code = &#34;1236-9&#34; or @code = &#34;1237-7&#34; or @code = &#34;1238-5&#34; or @code = &#34;1239-3&#34; or @code = &#34;1240-1&#34; or @code = &#34;1241-9&#34; or @code = &#34;1242-7&#34; or @code = &#34;1243-5&#34; or @code = &#34;1244-3&#34; or @code = &#34;1245-0&#34; or @code = &#34;1246-8&#34; or @code = &#34;1247-6&#34; or @code = &#34;1248-4&#34; or @code = &#34;1250-0&#34; or @code = &#34;1252-6&#34; or @code = &#34;1254-2&#34; or @code = &#34;1256-7&#34; or @code = &#34;1258-3&#34; or @code = &#34;1260-9&#34; or @code = &#34;1262-5&#34; or @code = &#34;1264-1&#34; or @code = &#34;1265-8&#34; or @code = &#34;1267-4&#34; or @code = &#34;1269-0&#34; or @code = &#34;1271-6&#34; or @code = &#34;1272-4&#34; or @code = &#34;1273-2&#34; or @code = &#34;1275-7&#34; or @code = &#34;1277-3&#34; or @code = &#34;1279-9&#34; or @code = &#34;1281-5&#34; or @code = &#34;1282-3&#34; or @code = &#34;1283-1&#34; or @code = &#34;1285-6&#34; or @code = &#34;1286-4&#34; or @code = &#34;1287-2&#34; or @code = &#34;1288-0&#34; or @code = &#34;1289-8&#34; or @code = &#34;1290-6&#34; or @code = &#34;1291-4&#34; or @code = &#34;1292-2&#34; or @code = &#34;1293-0&#34; or @code = &#34;1294-8&#34; or @code = &#34;1295-5&#34; or @code = &#34;1297-1&#34; or @code = &#34;1299-7&#34; or @code = &#34;1301-1&#34; or @code = &#34;1303-7&#34; or @code = &#34;1305-2&#34; or @code = &#34;1306-0&#34; or @code = &#34;1307-8&#34; or @code = &#34;1309-4&#34; or @code = &#34;1310-2&#34; or @code = &#34;1312-8&#34; or @code = &#34;1313-6&#34; or @code = &#34;1314-4&#34; or @code = &#34;1315-1&#34; or @code = &#34;1317-7&#34; or @code = &#34;1319-3&#34; or @code = &#34;1321-9&#34; or @code = &#34;1323-5&#34; or @code = &#34;1325-0&#34; or @code = &#34;1326-8&#34; or @code = &#34;1327-6&#34; or @code = &#34;1328-4&#34; or @code = &#34;1329-2&#34; or @code = &#34;1331-8&#34; or @code = &#34;1332-6&#34; or @code = &#34;1333-4&#34; or @code = &#34;1334-2&#34; or @code = &#34;1335-9&#34; or @code = &#34;1336-7&#34; or @code = &#34;1337-5&#34; or @code = &#34;1338-3&#34; or @code = &#34;1340-9&#34; or @code = &#34;1342-5&#34; or @code = &#34;1344-1&#34; or @code = &#34;1345-8&#34; or @code = &#34;1346-6&#34; or @code = &#34;1348-2&#34; or @code = &#34;1350-8&#34; or @code = &#34;1352-4&#34; or @code = &#34;1354-0&#34; or @code = &#34;1356-5&#34; or @code = &#34;1358-1&#34; or @code = &#34;1359-9&#34; or @code = &#34;1360-7&#34; or @code = &#34;1361-5&#34; or @code = &#34;1363-1&#34; or @code = &#34;1365-6&#34; or @code = &#34;1366-4&#34; or @code = &#34;1368-0&#34; or @code = &#34;1370-6&#34; or @code = &#34;1372-2&#34; or @code = &#34;1374-8&#34; or @code = &#34;1376-3&#34; or @code = &#34;1378-9&#34; or @code = &#34;1380-5&#34; or @code = &#34;1382-1&#34; or @code = &#34;1383-9&#34; or @code = &#34;1384-7&#34; or @code = &#34;1385-4&#34; or @code = &#34;1387-0&#34; or @code = &#34;1389-6&#34; or @code = &#34;1391-2&#34; or @code = &#34;1392-0&#34; or @code = &#34;1393-8&#34; or @code = &#34;1394-6&#34; or @code = &#34;1395-3&#34; or @code = &#34;1396-1&#34; or @code = &#34;1397-9&#34; or @code = &#34;1398-7&#34; or @code = &#34;1399-5&#34; or @code = &#34;1400-1&#34; or @code = &#34;1401-9&#34; or @code = &#34;1403-5&#34; or @code = &#34;1405-0&#34; or @code = &#34;1407-6&#34; or @code = &#34;1409-2&#34; or @code = &#34;1411-8&#34; or @code = &#34;1412-6&#34; or @code = &#34;1413-4&#34; or @code = &#34;1414-2&#34; or @code = &#34;1416-7&#34; or @code = &#34;1417-5&#34; or @code = &#34;1418-3&#34; or @code = &#34;1419-1&#34; or @code = &#34;1420-9&#34; or @code = &#34;1421-7&#34; or @code = &#34;1422-5&#34; or @code = &#34;1423-3&#34; or @code = &#34;1424-1&#34; or @code = &#34;1425-8&#34; or @code = &#34;1426-6&#34; or @code = &#34;1427-4&#34; or @code = &#34;1428-2&#34; or @code = &#34;1429-0&#34; or @code = &#34;1430-8&#34; or @code = &#34;1431-6&#34; or @code = &#34;1432-4&#34; or @code = &#34;1433-2&#34; or @code = &#34;1434-0&#34; or @code = &#34;1435-7&#34; or @code = &#34;1436-5&#34; or @code = &#34;1437-3&#34; or @code = &#34;1439-9&#34; or @code = &#34;1441-5&#34; or @code = &#34;1442-3&#34; or @code = &#34;1443-1&#34; or @code = &#34;1445-6&#34; or @code = &#34;1446-4&#34; or @code = &#34;1448-0&#34; or @code = &#34;1450-6&#34; or @code = &#34;1451-4&#34; or @code = &#34;1453-0&#34; or @code = &#34;1454-8&#34; or @code = &#34;1456-3&#34; or @code = &#34;1457-1&#34; or @code = &#34;1458-9&#34; or @code = &#34;1460-5&#34; or @code = &#34;1462-1&#34; or @code = &#34;1464-7&#34; or @code = &#34;1465-4&#34; or @code = &#34;1466-2&#34; or @code = &#34;1467-0&#34; or @code = &#34;1468-8&#34; or @code = &#34;1469-6&#34; or @code = &#34;1470-4&#34; or @code = &#34;1471-2&#34; or @code = &#34;1472-0&#34; or @code = &#34;1474-6&#34; or @code = &#34;1475-3&#34; or @code = &#34;1476-1&#34; or @code = &#34;1478-7&#34; or @code = &#34;1479-5&#34; or @code = &#34;1480-3&#34; or @code = &#34;1481-1&#34; or @code = &#34;1482-9&#34; or @code = &#34;1483-7&#34; or @code = &#34;1484-5&#34; or @code = &#34;1485-2&#34; or @code = &#34;1487-8&#34; or @code = &#34;1489-4&#34; or @code = &#34;1490-2&#34; or @code = &#34;1491-0&#34; or @code = &#34;1492-8&#34; or @code = &#34;1493-6&#34; or @code = &#34;1494-4&#34; or @code = &#34;1495-1&#34; or @code = &#34;1496-9&#34; or @code = &#34;1497-7&#34; or @code = &#34;1498-5&#34; or @code = &#34;1499-3&#34; or @code = &#34;1500-8&#34; or @code = &#34;1501-6&#34; or @code = &#34;1502-4&#34; or @code = &#34;1503-2&#34; or @code = &#34;1504-0&#34; or @code = &#34;1505-7&#34; or @code = &#34;1506-5&#34; or @code = &#34;1507-3&#34; or @code = &#34;1508-1&#34; or @code = &#34;1509-9&#34; or @code = &#34;1510-7&#34; or @code = &#34;1511-5&#34; or @code = &#34;1512-3&#34; or @code = &#34;1513-1&#34; or @code = &#34;1514-9&#34; or @code = &#34;1515-6&#34; or @code = &#34;1516-4&#34; or @code = &#34;1518-0&#34; or @code = &#34;1519-8&#34; or @code = &#34;1520-6&#34; or @code = &#34;1521-4&#34; or @code = &#34;1522-2&#34; or @code = &#34;1523-0&#34; or @code = &#34;1524-8&#34; or @code = &#34;1525-5&#34; or @code = &#34;1526-3&#34; or @code = &#34;1527-1&#34; or @code = &#34;1528-9&#34; or @code = &#34;1529-7&#34; or @code = &#34;1530-5&#34; or @code = &#34;1531-3&#34; or @code = &#34;1532-1&#34; or @code = &#34;1533-9&#34; or @code = &#34;1534-7&#34; or @code = &#34;1535-4&#34; or @code = &#34;1536-2&#34; or @code = &#34;1537-0&#34; or @code = &#34;1538-8&#34; or @code = &#34;1539-6&#34; or @code = &#34;1541-2&#34; or @code = &#34;1543-8&#34; or @code = &#34;1545-3&#34; or @code = &#34;1547-9&#34; or @code = &#34;1549-5&#34; or @code = &#34;1551-1&#34; or @code = &#34;1552-9&#34; or @code = &#34;1553-7&#34; or @code = &#34;1554-5&#34; or @code = &#34;1556-0&#34; or @code = &#34;1558-6&#34; or @code = &#34;1560-2&#34; or @code = &#34;1562-8&#34; or @code = &#34;1564-4&#34; or @code = &#34;1566-9&#34; or @code = &#34;1567-7&#34; or @code = &#34;1568-5&#34; or @code = &#34;1569-3&#34; or @code = &#34;1570-1&#34; or @code = &#34;1571-9&#34; or @code = &#34;1573-5&#34; or @code = &#34;1574-3&#34; or @code = &#34;1576-8&#34; or @code = &#34;1578-4&#34; or @code = &#34;1579-2&#34; or @code = &#34;1580-0&#34; or @code = &#34;1582-6&#34; or @code = &#34;1584-2&#34; or @code = &#34;1586-7&#34; or @code = &#34;1587-5&#34; or @code = &#34;1588-3&#34; or @code = &#34;1589-1&#34; or @code = &#34;1590-9&#34; or @code = &#34;1591-7&#34; or @code = &#34;1592-5&#34; or @code = &#34;1593-3&#34; or @code = &#34;1594-1&#34; or @code = &#34;1595-8&#34; or @code = &#34;1596-6&#34; or @code = &#34;1597-4&#34; or @code = &#34;1598-2&#34; or @code = &#34;1599-0&#34; or @code = &#34;1600-6&#34; or @code = &#34;1602-2&#34; or @code = &#34;1603-0&#34; or @code = &#34;1604-8&#34; or @code = &#34;1605-5&#34; or @code = &#34;1607-1&#34; or @code = &#34;1609-7&#34; or @code = &#34;1610-5&#34; or @code = &#34;1611-3&#34; or @code = &#34;1612-1&#34; or @code = &#34;1613-9&#34; or @code = &#34;1614-7&#34; or @code = &#34;1615-4&#34; or @code = &#34;1616-2&#34; or @code = &#34;1617-0&#34; or @code = &#34;1618-8&#34; or @code = &#34;1619-6&#34; or @code = &#34;1620-4&#34; or @code = &#34;1621-2&#34; or @code = &#34;1622-0&#34; or @code = &#34;1623-8&#34; or @code = &#34;1624-6&#34; or @code = &#34;1625-3&#34; or @code = &#34;1626-1&#34; or @code = &#34;1627-9&#34; or @code = &#34;1628-7&#34; or @code = &#34;1629-5&#34; or @code = &#34;1630-3&#34; or @code = &#34;1631-1&#34; or @code = &#34;1632-9&#34; or @code = &#34;1633-7&#34; or @code = &#34;1634-5&#34; or @code = &#34;1635-2&#34; or @code = &#34;1636-0&#34; or @code = &#34;1637-8&#34; or @code = &#34;1638-6&#34; or @code = &#34;1639-4&#34; or @code = &#34;1640-2&#34; or @code = &#34;1641-0&#34; or @code = &#34;1643-6&#34; or @code = &#34;1645-1&#34; or @code = &#34;1647-7&#34; or @code = &#34;1649-3&#34; or @code = &#34;1651-9&#34; or @code = &#34;1653-5&#34; or @code = &#34;1654-3&#34; or @code = &#34;1655-0&#34; or @code = &#34;1656-8&#34; or @code = &#34;1657-6&#34; or @code = &#34;1659-2&#34; or @code = &#34;1661-8&#34; or @code = &#34;1663-4&#34; or @code = &#34;1665-9&#34; or @code = &#34;1667-5&#34; or @code = &#34;1668-3&#34; or @code = &#34;1670-9&#34; or @code = &#34;1671-7&#34; or @code = &#34;1672-5&#34; or @code = &#34;1673-3&#34; or @code = &#34;1675-8&#34; or @code = &#34;1677-4&#34; or @code = &#34;1679-0&#34; or @code = &#34;1680-8&#34; or @code = &#34;1681-6&#34; or @code = &#34;1683-2&#34; or @code = &#34;1685-7&#34; or @code = &#34;1687-3&#34; or @code = &#34;1688-1&#34; or @code = &#34;1689-9&#34; or @code = &#34;1690-7&#34; or @code = &#34;1692-3&#34; or @code = &#34;1694-9&#34; or @code = &#34;1696-4&#34; or @code = &#34;1697-2&#34; or @code = &#34;1698-0&#34; or @code = &#34;1700-4&#34; or @code = &#34;1702-0&#34; or @code = &#34;1704-6&#34; or @code = &#34;1705-3&#34; or @code = &#34;1707-9&#34; or @code = &#34;1709-5&#34; or @code = &#34;1711-1&#34; or @code = &#34;1712-9&#34; or @code = &#34;1713-7&#34; or @code = &#34;1715-2&#34; or @code = &#34;1717-8&#34; or @code = &#34;1718-6&#34; or @code = &#34;1719-4&#34; or @code = &#34;1720-2&#34; or @code = &#34;1722-8&#34; or @code = &#34;1724-4&#34; or @code = &#34;1725-1&#34; or @code = &#34;1726-9&#34; or @code = &#34;1727-7&#34; or @code = &#34;1728-5&#34; or @code = &#34;1729-3&#34; or @code = &#34;1730-1&#34; or @code = &#34;1731-9&#34; or @code = &#34;1732-7&#34; or @code = &#34;1733-5&#34; or @code = &#34;1735-0&#34; or @code = &#34;1737-6&#34; or @code = &#34;1739-2&#34; or @code = &#34;1740-0&#34; or @code = &#34;1741-8&#34; or @code = &#34;1742-6&#34; or @code = &#34;1743-4&#34; or @code = &#34;1744-2&#34; or @code = &#34;1745-9&#34; or @code = &#34;1746-7&#34; or @code = &#34;1747-5&#34; or @code = &#34;1748-3&#34; or @code = &#34;1749-1&#34; or @code = &#34;1750-9&#34; or @code = &#34;1751-7&#34; or @code = &#34;1752-5&#34; or @code = &#34;1753-3&#34; or @code = &#34;1754-1&#34; or @code = &#34;1755-8&#34; or @code = &#34;1756-6&#34; or @code = &#34;1757-4&#34; or @code = &#34;1758-2&#34; or @code = &#34;1759-0&#34; or @code = &#34;1760-8&#34; or @code = &#34;1761-6&#34; or @code = &#34;1762-4&#34; or @code = &#34;1763-2&#34; or @code = &#34;1764-0&#34; or @code = &#34;1765-7&#34; or @code = &#34;1766-5&#34; or @code = &#34;1767-3&#34; or @code = &#34;1768-1&#34; or @code = &#34;1769-9&#34; or @code = &#34;1770-7&#34; or @code = &#34;1771-5&#34; or @code = &#34;1772-3&#34; or @code = &#34;1773-1&#34; or @code = &#34;1774-9&#34; or @code = &#34;1775-6&#34; or @code = &#34;1776-4&#34; or @code = &#34;1777-2&#34; or @code = &#34;1778-0&#34; or @code = &#34;1779-8&#34; or @code = &#34;1780-6&#34; or @code = &#34;1781-4&#34; or @code = &#34;1782-2&#34; or @code = &#34;1783-0&#34; or @code = &#34;1784-8&#34; or @code = &#34;1785-5&#34; or @code = &#34;1786-3&#34; or @code = &#34;1787-1&#34; or @code = &#34;1788-9&#34; or @code = &#34;1789-7&#34; or @code = &#34;1790-5&#34; or @code = &#34;1791-3&#34; or @code = &#34;1792-1&#34; or @code = &#34;1793-9&#34; or @code = &#34;1794-7&#34; or @code = &#34;1795-4&#34; or @code = &#34;1796-2&#34; or @code = &#34;1797-0&#34; or @code = &#34;1798-8&#34; or @code = &#34;1799-6&#34; or @code = &#34;1800-2&#34; or @code = &#34;1801-0&#34; or @code = &#34;1802-8&#34; or @code = &#34;1803-6&#34; or @code = &#34;1804-4&#34; or @code = &#34;1805-1&#34; or @code = &#34;1806-9&#34; or @code = &#34;1807-7&#34; or @code = &#34;1808-5&#34; or @code = &#34;1809-3&#34; or @code = &#34;1811-9&#34; or @code = &#34;1813-5&#34; or @code = &#34;1814-3&#34; or @code = &#34;1815-0&#34; or @code = &#34;1816-8&#34; or @code = &#34;1817-6&#34; or @code = &#34;1818-4&#34; or @code = &#34;1819-2&#34; or @code = &#34;1820-0&#34; or @code = &#34;1821-8&#34; or @code = &#34;1822-6&#34; or @code = &#34;1823-4&#34; or @code = &#34;1824-2&#34; or @code = &#34;1825-9&#34; or @code = &#34;1826-7&#34; or @code = &#34;1827-5&#34; or @code = &#34;1828-3&#34; or @code = &#34;1829-1&#34; or @code = &#34;1830-9&#34; or @code = &#34;1831-7&#34; or @code = &#34;1832-5&#34; or @code = &#34;1833-3&#34; or @code = &#34;1834-1&#34; or @code = &#34;1835-8&#34; or @code = &#34;1837-4&#34; or @code = &#34;1838-2&#34; or @code = &#34;1840-8&#34; or @code = &#34;1842-4&#34; or @code = &#34;1844-0&#34; or @code = &#34;1845-7&#34; or @code = &#34;1846-5&#34; or @code = &#34;1847-3&#34; or @code = &#34;1848-1&#34; or @code = &#34;1849-9&#34; or @code = &#34;1850-7&#34; or @code = &#34;1851-5&#34; or @code = &#34;1852-3&#34; or @code = &#34;1853-1&#34; or @code = &#34;1854-9&#34; or @code = &#34;1855-6&#34; or @code = &#34;1856-4&#34; or @code = &#34;1857-2&#34; or @code = &#34;1858-0&#34; or @code = &#34;1859-8&#34; or @code = &#34;1860-6&#34; or @code = &#34;1861-4&#34; or @code = &#34;1862-2&#34; or @code = &#34;1863-0&#34; or @code = &#34;1864-8&#34; or @code = &#34;1865-5&#34; or @code = &#34;1866-3&#34; or @code = &#34;1867-1&#34; or @code = &#34;1868-9&#34; or @code = &#34;1869-7&#34; or @code = &#34;1870-5&#34; or @code = &#34;1871-3&#34; or @code = &#34;1872-1&#34; or @code = &#34;1873-9&#34; or @code = &#34;1874-7&#34; or @code = &#34;1875-4&#34; or @code = &#34;1876-2&#34; or @code = &#34;1877-0&#34; or @code = &#34;1878-8&#34; or @code = &#34;1879-6&#34; or @code = &#34;1880-4&#34; or @code = &#34;1881-2&#34; or @code = &#34;1882-0&#34; or @code = &#34;1883-8&#34; or @code = &#34;1884-6&#34; or @code = &#34;1885-3&#34; or @code = &#34;1886-1&#34; or @code = &#34;1887-9&#34; or @code = &#34;1888-7&#34; or @code = &#34;1889-5&#34; or @code = &#34;1891-1&#34; or @code = &#34;1892-9&#34; or @code = &#34;1893-7&#34; or @code = &#34;1894-5&#34; or @code = &#34;1896-0&#34; or @code = &#34;1897-8&#34; or @code = &#34;1898-6&#34; or @code = &#34;1899-4&#34; or @code = &#34;1900-0&#34; or @code = &#34;1901-8&#34; or @code = &#34;1902-6&#34; or @code = &#34;1903-4&#34; or @code = &#34;1904-2&#34; or @code = &#34;1905-9&#34; or @code = &#34;1906-7&#34; or @code = &#34;1907-5&#34; or @code = &#34;1908-3&#34; or @code = &#34;1909-1&#34; or @code = &#34;1910-9&#34; or @code = &#34;1911-7&#34; or @code = &#34;1912-5&#34; or @code = &#34;1913-3&#34; or @code = &#34;1914-1&#34; or @code = &#34;1915-8&#34; or @code = &#34;1916-6&#34; or @code = &#34;1917-4&#34; or @code = &#34;1918-2&#34; or @code = &#34;1919-0&#34; or @code = &#34;1920-8&#34; or @code = &#34;1921-6&#34; or @code = &#34;1922-4&#34; or @code = &#34;1923-2&#34; or @code = &#34;1924-0&#34; or @code = &#34;1925-7&#34; or @code = &#34;1926-5&#34; or @code = &#34;1927-3&#34; or @code = &#34;1928-1&#34; or @code = &#34;1929-9&#34; or @code = &#34;1930-7&#34; or @code = &#34;1931-5&#34; or @code = &#34;1932-3&#34; or @code = &#34;1933-1&#34; or @code = &#34;1934-9&#34; or @code = &#34;1935-6&#34; or @code = &#34;1936-4&#34; or @code = &#34;1937-2&#34; or @code = &#34;1938-0&#34; or @code = &#34;1939-8&#34; or @code = &#34;1940-6&#34; or @code = &#34;1941-4&#34; or @code = &#34;1942-2&#34; or @code = &#34;1943-0&#34; or @code = &#34;1944-8&#34; or @code = &#34;1945-5&#34; or @code = &#34;1946-3&#34; or @code = &#34;1947-1&#34; or @code = &#34;1948-9&#34; or @code = &#34;1949-7&#34; or @code = &#34;1950-5&#34; or @code = &#34;1951-3&#34; or @code = &#34;1952-1&#34; or @code = &#34;1953-9&#34; or @code = &#34;1954-7&#34; or @code = &#34;1955-4&#34; or @code = &#34;1956-2&#34; or @code = &#34;1957-0&#34; or @code = &#34;1958-8&#34; or @code = &#34;1959-6&#34; or @code = &#34;1960-4&#34; or @code = &#34;1961-2&#34; or @code = &#34;1962-0&#34; or @code = &#34;1963-8&#34; or @code = &#34;1964-6&#34; or @code = &#34;1966-1&#34; or @code = &#34;1968-7&#34; or @code = &#34;1969-5&#34; or @code = &#34;1970-3&#34; or @code = &#34;1972-9&#34; or @code = &#34;1973-7&#34; or @code = &#34;1974-5&#34; or @code = &#34;1975-2&#34; or @code = &#34;1976-0&#34; or @code = &#34;1977-8&#34; or @code = &#34;1978-6&#34; or @code = &#34;1979-4&#34; or @code = &#34;1980-2&#34; or @code = &#34;1981-0&#34; or @code = &#34;1982-8&#34; or @code = &#34;1984-4&#34; or @code = &#34;1985-1&#34; or @code = &#34;1986-9&#34; or @code = &#34;1987-7&#34; or @code = &#34;1988-5&#34; or @code = &#34;1990-1&#34; or @code = &#34;1992-7&#34; or @code = &#34;1993-5&#34; or @code = &#34;1994-3&#34; or @code = &#34;1995-0&#34; or @code = &#34;1996-8&#34; or @code = &#34;1997-6&#34; or @code = &#34;1998-4&#34; or @code = &#34;1999-2&#34; or @code = &#34;2000-8&#34; or @code = &#34;2002-4&#34; or @code = &#34;2004-0&#34; or @code = &#34;2006-5&#34; or @code = &#34;2007-3&#34; or @code = &#34;2008-1&#34; or @code = &#34;2009-9&#34; or @code = &#34;2010-7&#34; or @code = &#34;2011-5&#34; or @code = &#34;2012-3&#34; or @code = &#34;2013-1&#34; or @code = &#34;2014-9&#34; or @code = &#34;2015-6&#34; or @code = &#34;2016-4&#34; or @code = &#34;2017-2&#34; or @code = &#34;2018-0&#34; or @code = &#34;2019-8&#34; or @code = &#34;2020-6&#34; or @code = &#34;2021-4&#34; or @code = &#34;2022-2&#34; or @code = &#34;2023-0&#34; or @code = &#34;2024-8&#34; or @code = &#34;2025-5&#34; or @code = &#34;2026-3&#34; or @code = &#34;2028-9&#34; or @code = &#34;2029-7&#34; or @code = &#34;2030-5&#34; or @code = &#34;2031-3&#34; or @code = &#34;2032-1&#34; or @code = &#34;2033-9&#34; or @code = &#34;2034-7&#34; or @code = &#34;2035-4&#34; or @code = &#34;2036-2&#34; or @code = &#34;2037-0&#34; or @code = &#34;2038-8&#34; or @code = &#34;2039-6&#34; or @code = &#34;2040-4&#34; or @code = &#34;2041-2&#34; or @code = &#34;2042-0&#34; or @code = &#34;2043-8&#34; or @code = &#34;2044-6&#34; or @code = &#34;2045-3&#34; or @code = &#34;2046-1&#34; or @code = &#34;2047-9&#34; or @code = &#34;2048-7&#34; or @code = &#34;2049-5&#34; or @code = &#34;2050-3&#34; or @code = &#34;2051-1&#34; or @code = &#34;2052-9&#34; or @code = &#34;2054-5&#34; or @code = &#34;2056-0&#34; or @code = &#34;2058-6&#34; or @code = &#34;2060-2&#34; or @code = &#34;2061-0&#34; or @code = &#34;2062-8&#34; or @code = &#34;2063-6&#34; or @code = &#34;2064-4&#34; or @code = &#34;2065-1&#34; or @code = &#34;2066-9&#34; or @code = &#34;2067-7&#34; or @code = &#34;2068-5&#34; or @code = &#34;2069-3&#34; or @code = &#34;2070-1&#34; or @code = &#34;2071-9&#34; or @code = &#34;2072-7&#34; or @code = &#34;2073-5&#34; or @code = &#34;2074-3&#34; or @code = &#34;2075-0&#34; or @code = &#34;2076-8&#34; or @code = &#34;2078-4&#34; or @code = &#34;2079-2&#34; or @code = &#34;2080-0&#34; or @code = &#34;2081-8&#34; or @code = &#34;2082-6&#34; or @code = &#34;2083-4&#34; or @code = &#34;2085-9&#34; or @code = &#34;2086-7&#34; or @code = &#34;2087-5&#34; or @code = &#34;2088-3&#34; or @code = &#34;2089-1&#34; or @code = &#34;2090-9&#34; or @code = &#34;2091-7&#34; or @code = &#34;2092-5&#34; or @code = &#34;2093-3&#34; or @code = &#34;2094-1&#34; or @code = &#34;2095-8&#34; or @code = &#34;2096-6&#34; or @code = &#34;2097-4&#34; or @code = &#34;2098-2&#34; or @code = &#34;2100-6&#34; or @code = &#34;2101-4&#34; or @code = &#34;2102-2&#34; or @code = &#34;2103-0&#34; or @code = &#34;2104-8&#34; or @code = &#34;2106-3&#34; or @code = &#34;2108-9&#34; or @code = &#34;2109-7&#34; or @code = &#34;2110-5&#34; or @code = &#34;2111-3&#34; or @code = &#34;2112-1&#34; or @code = &#34;2113-9&#34; or @code = &#34;2114-7&#34; or @code = &#34;2115-4&#34; or @code = &#34;2116-2&#34; or @code = &#34;2118-8&#34; or @code = &#34;2119-6&#34; or @code = &#34;2120-4&#34; or @code = &#34;2121-2&#34; or @code = &#34;2122-0&#34; or @code = &#34;2123-8&#34; or @code = &#34;2124-6&#34; or @code = &#34;2125-3&#34; or @code = &#34;2126-1&#34; or @code = &#34;2127-9&#34; or @code = &#34;2129-5&#34; or @code = &#34;2131-1&#34; or @code = &#34;2500-7&#34;])"/>
     439         <xsl:otherwise>
     440            <xsl:message>
     441     Error: CONF-QRDA1-28 The patient's race 'code' attribute value SHALL be valid according to Appendix_O-Race in the posted Downloadable Resource table.
     442      ((cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@code = "1002-5" or @code = "1004-1" or @code = "1006-6" or @code = "1008-2" or @code = "1010-8" or @code = "1011-6" or @code = "1012-4" or @code = "1013-2" or @code = "1014-0" or @code = "1015-7" or @code = "1016-5" or @code = "1017-3" or @code = "1018-1" or @code = "1019-9" or @code = "1021-5" or @code = "1022-3" or @code = "1023-1" or @code = "1024-9" or @code = "1026-4" or @code = "1028-0" or @code = "1030-6" or @code = "1031-4" or @code = "1033-0" or @code = "1035-5" or @code = "1037-1" or @code = "1039-7" or @code = "1041-3" or @code = "1042-1" or @code = "1044-7" or @code = "1045-4" or @code = "1046-2" or @code = "1047-0" or @code = "1048-8" or @code = "1049-6" or @code = "1050-4" or @code = "1051-2" or @code = "1053-8" or @code = "1054-6" or @code = "1055-3" or @code = "1056-1" or @code = "1057-9" or @code = "1058-7" or @code = "1059-5" or @code = "1060-3" or @code = "1061-1" or @code = "1062-9" or @code = "1063-7" or @code = "1064-5" or @code = "1065-2" or @code = "1066-0" or @code = "1068-6" or @code = "1069-4" or @code = "1070-2" or @code = "1071-0" or @code = "1072-8" or @code = "1073-6" or @code = "1074-4" or @code = "1076-9" or @code = "1078-5" or @code = "1080-1" or @code = "1082-7" or @code = "1083-5" or @code = "1084-3" or @code = "1086-8" or @code = "1088-4" or @code = "1089-2" or @code = "1090-0" or @code = "1091-8" or @code = "1092-6" or @code = "1093-4" or @code = "1094-2" or @code = "1095-9" or @code = "1096-7" or @code = "1097-5" or @code = "1098-3" or @code = "1100-7" or @code = "1102-3" or @code = "1103-1" or @code = "1104-9" or @code = "1106-4" or @code = "1108-0" or @code = "1109-8" or @code = "1110-6" or @code = "1112-2" or @code = "1114-8" or @code = "1115-5" or @code = "1116-3" or @code = "1117-1" or @code = "1118-9" or @code = "1119-7" or @code = "1120-5" or @code = "1121-3" or @code = "1123-9" or @code = "1124-7" or @code = "1125-4" or @code = "1126-2" or @code = "1127-0" or @code = "1128-8" or @code = "1129-6" or @code = "1130-4" or @code = "1131-2" or @code = "1132-0" or @code = "1133-8" or @code = "1134-6" or @code = "1135-3" or @code = "1136-1" or @code = "1137-9" or @code = "1138-7" or @code = "1139-5" or @code = "1140-3" or @code = "1141-1" or @code = "1142-9" or @code = "1143-7" or @code = "1144-5" or @code = "1145-2" or @code = "1146-0" or @code = "1147-8" or @code = "1148-6" or @code = "1150-2" or @code = "1151-0" or @code = "1153-6" or @code = "1155-1" or @code = "1156-9" or @code = "1157-7" or @code = "1158-5" or @code = "1159-3" or @code = "1160-1" or @code = "1162-7" or @code = "1163-5" or @code = "1165-0" or @code = "1167-6" or @code = "1169-2" or @code = "1171-8" or @code = "1173-4" or @code = "1175-9" or @code = "1176-7" or @code = "1178-3" or @code = "1180-9" or @code = "1182-5" or @code = "1184-1" or @code = "1186-6" or @code = "1187-4" or @code = "1189-0" or @code = "1191-6" or @code = "1193-2" or @code = "1194-0" or @code = "1195-7" or @code = "1196-5" or @code = "1197-3" or @code = "1198-1" or @code = "1199-9" or @code = "1200-5" or @code = "1201-3" or @code = "1202-1" or @code = "1203-9" or @code = "1204-7" or @code = "1205-4" or @code = "1207-0" or @code = "1209-6" or @code = "1211-2" or @code = "1212-0" or @code = "1214-6" or @code = "1215-3" or @code = "1216-1" or @code = "1217-9" or @code = "1218-7" or @code = "1219-5" or @code = "1220-3" or @code = "1222-9" or @code = "1223-7" or @code = "1224-5" or @code = "1225-2" or @code = "1226-0" or @code = "1227-8" or @code = "1228-6" or @code = "1229-4" or @code = "1230-2" or @code = "1231-0" or @code = "1233-6" or @code = "1234-4" or @code = "1235-1" or @code = "1236-9" or @code = "1237-7" or @code = "1238-5" or @code = "1239-3" or @code = "1240-1" or @code = "1241-9" or @code = "1242-7" or @code = "1243-5" or @code = "1244-3" or @code = "1245-0" or @code = "1246-8" or @code = "1247-6" or @code = "1248-4" or @code = "1250-0" or @code = "1252-6" or @code = "1254-2" or @code = "1256-7" or @code = "1258-3" or @code = "1260-9" or @code = "1262-5" or @code = "1264-1" or @code = "1265-8" or @code = "1267-4" or @code = "1269-0" or @code = "1271-6" or @code = "1272-4" or @code = "1273-2" or @code = "1275-7" or @code = "1277-3" or @code = "1279-9" or @code = "1281-5" or @code = "1282-3" or @code = "1283-1" or @code = "1285-6" or @code = "1286-4" or @code = "1287-2" or @code = "1288-0" or @code = "1289-8" or @code = "1290-6" or @code = "1291-4" or @code = "1292-2" or @code = "1293-0" or @code = "1294-8" or @code = "1295-5" or @code = "1297-1" or @code = "1299-7" or @code = "1301-1" or @code = "1303-7" or @code = "1305-2" or @code = "1306-0" or @code = "1307-8" or @code = "1309-4" or @code = "1310-2" or @code = "1312-8" or @code = "1313-6" or @code = "1314-4" or @code = "1315-1" or @code = "1317-7" or @code = "1319-3" or @code = "1321-9" or @code = "1323-5" or @code = "1325-0" or @code = "1326-8" or @code = "1327-6" or @code = "1328-4" or @code = "1329-2" or @code = "1331-8" or @code = "1332-6" or @code = "1333-4" or @code = "1334-2" or @code = "1335-9" or @code = "1336-7" or @code = "1337-5" or @code = "1338-3" or @code = "1340-9" or @code = "1342-5" or @code = "1344-1" or @code = "1345-8" or @code = "1346-6" or @code = "1348-2" or @code = "1350-8" or @code = "1352-4" or @code = "1354-0" or @code = "1356-5" or @code = "1358-1" or @code = "1359-9" or @code = "1360-7" or @code = "1361-5" or @code = "1363-1" or @code = "1365-6" or @code = "1366-4" or @code = "1368-0" or @code = "1370-6" or @code = "1372-2" or @code = "1374-8" or @code = "1376-3" or @code = "1378-9" or @code = "1380-5" or @code = "1382-1" or @code = "1383-9" or @code = "1384-7" or @code = "1385-4" or @code = "1387-0" or @code = "1389-6" or @code = "1391-2" or @code = "1392-0" or @code = "1393-8" or @code = "1394-6" or @code = "1395-3" or @code = "1396-1" or @code = "1397-9" or @code = "1398-7" or @code = "1399-5" or @code = "1400-1" or @code = "1401-9" or @code = "1403-5" or @code = "1405-0" or @code = "1407-6" or @code = "1409-2" or @code = "1411-8" or @code = "1412-6" or @code = "1413-4" or @code = "1414-2" or @code = "1416-7" or @code = "1417-5" or @code = "1418-3" or @code = "1419-1" or @code = "1420-9" or @code = "1421-7" or @code = "1422-5" or @code = "1423-3" or @code = "1424-1" or @code = "1425-8" or @code = "1426-6" or @code = "1427-4" or @code = "1428-2" or @code = "1429-0" or @code = "1430-8" or @code = "1431-6" or @code = "1432-4" or @code = "1433-2" or @code = "1434-0" or @code = "1435-7" or @code = "1436-5" or @code = "1437-3" or @code = "1439-9" or @code = "1441-5" or @code = "1442-3" or @code = "1443-1" or @code = "1445-6" or @code = "1446-4" or @code = "1448-0" or @code = "1450-6" or @code = "1451-4" or @code = "1453-0" or @code = "1454-8" or @code = "1456-3" or @code = "1457-1" or @code = "1458-9" or @code = "1460-5" or @code = "1462-1" or @code = "1464-7" or @code = "1465-4" or @code = "1466-2" or @code = "1467-0" or @code = "1468-8" or @code = "1469-6" or @code = "1470-4" or @code = "1471-2" or @code = "1472-0" or @code = "1474-6" or @code = "1475-3" or @code = "1476-1" or @code = "1478-7" or @code = "1479-5" or @code = "1480-3" or @code = "1481-1" or @code = "1482-9" or @code = "1483-7" or @code = "1484-5" or @code = "1485-2" or @code = "1487-8" or @code = "1489-4" or @code = "1490-2" or @code = "1491-0" or @code = "1492-8" or @code = "1493-6" or @code = "1494-4" or @code = "1495-1" or @code = "1496-9" or @code = "1497-7" or @code = "1498-5" or @code = "1499-3" or @code = "1500-8" or @code = "1501-6" or @code = "1502-4" or @code = "1503-2" or @code = "1504-0" or @code = "1505-7" or @code = "1506-5" or @code = "1507-3" or @code = "1508-1" or @code = "1509-9" or @code = "1510-7" or @code = "1511-5" or @code = "1512-3" or @code = "1513-1" or @code = "1514-9" or @code = "1515-6" or @code = "1516-4" or @code = "1518-0" or @code = "1519-8" or @code = "1520-6" or @code = "1521-4" or @code = "1522-2" or @code = "1523-0" or @code = "1524-8" or @code = "1525-5" or @code = "1526-3" or @code = "1527-1" or @code = "1528-9" or @code = "1529-7" or @code = "1530-5" or @code = "1531-3" or @code = "1532-1" or @code = "1533-9" or @code = "1534-7" or @code = "1535-4" or @code = "1536-2" or @code = "1537-0" or @code = "1538-8" or @code = "1539-6" or @code = "1541-2" or @code = "1543-8" or @code = "1545-3" or @code = "1547-9" or @code = "1549-5" or @code = "1551-1" or @code = "1552-9" or @code = "1553-7" or @code = "1554-5" or @code = "1556-0" or @code = "1558-6" or @code = "1560-2" or @code = "1562-8" or @code = "1564-4" or @code = "1566-9" or @code = "1567-7" or @code = "1568-5" or @code = "1569-3" or @code = "1570-1" or @code = "1571-9" or @code = "1573-5" or @code = "1574-3" or @code = "1576-8" or @code = "1578-4" or @code = "1579-2" or @code = "1580-0" or @code = "1582-6" or @code = "1584-2" or @code = "1586-7" or @code = "1587-5" or @code = "1588-3" or @code = "1589-1" or @code = "1590-9" or @code = "1591-7" or @code = "1592-5" or @code = "1593-3" or @code = "1594-1" or @code = "1595-8" or @code = "1596-6" or @code = "1597-4" or @code = "1598-2" or @code = "1599-0" or @code = "1600-6" or @code = "1602-2" or @code = "1603-0" or @code = "1604-8" or @code = "1605-5" or @code = "1607-1" or @code = "1609-7" or @code = "1610-5" or @code = "1611-3" or @code = "1612-1" or @code = "1613-9" or @code = "1614-7" or @code = "1615-4" or @code = "1616-2" or @code = "1617-0" or @code = "1618-8" or @code = "1619-6" or @code = "1620-4" or @code = "1621-2" or @code = "1622-0" or @code = "1623-8" or @code = "1624-6" or @code = "1625-3" or @code = "1626-1" or @code = "1627-9" or @code = "1628-7" or @code = "1629-5" or @code = "1630-3" or @code = "1631-1" or @code = "1632-9" or @code = "1633-7" or @code = "1634-5" or @code = "1635-2" or @code = "1636-0" or @code = "1637-8" or @code = "1638-6" or @code = "1639-4" or @code = "1640-2" or @code = "1641-0" or @code = "1643-6" or @code = "1645-1" or @code = "1647-7" or @code = "1649-3" or @code = "1651-9" or @code = "1653-5" or @code = "1654-3" or @code = "1655-0" or @code = "1656-8" or @code = "1657-6" or @code = "1659-2" or @code = "1661-8" or @code = "1663-4" or @code = "1665-9" or @code = "1667-5" or @code = "1668-3" or @code = "1670-9" or @code = "1671-7" or @code = "1672-5" or @code = "1673-3" or @code = "1675-8" or @code = "1677-4" or @code = "1679-0" or @code = "1680-8" or @code = "1681-6" or @code = "1683-2" or @code = "1685-7" or @code = "1687-3" or @code = "1688-1" or @code = "1689-9" or @code = "1690-7" or @code = "1692-3" or @code = "1694-9" or @code = "1696-4" or @code = "1697-2" or @code = "1698-0" or @code = "1700-4" or @code = "1702-0" or @code = "1704-6" or @code = "1705-3" or @code = "1707-9" or @code = "1709-5" or @code = "1711-1" or @code = "1712-9" or @code = "1713-7" or @code = "1715-2" or @code = "1717-8" or @code = "1718-6" or @code = "1719-4" or @code = "1720-2" or @code = "1722-8" or @code = "1724-4" or @code = "1725-1" or @code = "1726-9" or @code = "1727-7" or @code = "1728-5" or @code = "1729-3" or @code = "1730-1" or @code = "1731-9" or @code = "1732-7" or @code = "1733-5" or @code = "1735-0" or @code = "1737-6" or @code = "1739-2" or @code = "1740-0" or @code = "1741-8" or @code = "1742-6" or @code = "1743-4" or @code = "1744-2" or @code = "1745-9" or @code = "1746-7" or @code = "1747-5" or @code = "1748-3" or @code = "1749-1" or @code = "1750-9" or @code = "1751-7" or @code = "1752-5" or @code = "1753-3" or @code = "1754-1" or @code = "1755-8" or @code = "1756-6" or @code = "1757-4" or @code = "1758-2" or @code = "1759-0" or @code = "1760-8" or @code = "1761-6" or @code = "1762-4" or @code = "1763-2" or @code = "1764-0" or @code = "1765-7" or @code = "1766-5" or @code = "1767-3" or @code = "1768-1" or @code = "1769-9" or @code = "1770-7" or @code = "1771-5" or @code = "1772-3" or @code = "1773-1" or @code = "1774-9" or @code = "1775-6" or @code = "1776-4" or @code = "1777-2" or @code = "1778-0" or @code = "1779-8" or @code = "1780-6" or @code = "1781-4" or @code = "1782-2" or @code = "1783-0" or @code = "1784-8" or @code = "1785-5" or @code = "1786-3" or @code = "1787-1" or @code = "1788-9" or @code = "1789-7" or @code = "1790-5" or @code = "1791-3" or @code = "1792-1" or @code = "1793-9" or @code = "1794-7" or @code = "1795-4" or @code = "1796-2" or @code = "1797-0" or @code = "1798-8" or @code = "1799-6" or @code = "1800-2" or @code = "1801-0" or @code = "1802-8" or @code = "1803-6" or @code = "1804-4" or @code = "1805-1" or @code = "1806-9" or @code = "1807-7" or @code = "1808-5" or @code = "1809-3" or @code = "1811-9" or @code = "1813-5" or @code = "1814-3" or @code = "1815-0" or @code = "1816-8" or @code = "1817-6" or @code = "1818-4" or @code = "1819-2" or @code = "1820-0" or @code = "1821-8" or @code = "1822-6" or @code = "1823-4" or @code = "1824-2" or @code = "1825-9" or @code = "1826-7" or @code = "1827-5" or @code = "1828-3" or @code = "1829-1" or @code = "1830-9" or @code = "1831-7" or @code = "1832-5" or @code = "1833-3" or @code = "1834-1" or @code = "1835-8" or @code = "1837-4" or @code = "1838-2" or @code = "1840-8" or @code = "1842-4" or @code = "1844-0" or @code = "1845-7" or @code = "1846-5" or @code = "1847-3" or @code = "1848-1" or @code = "1849-9" or @code = "1850-7" or @code = "1851-5" or @code = "1852-3" or @code = "1853-1" or @code = "1854-9" or @code = "1855-6" or @code = "1856-4" or @code = "1857-2" or @code = "1858-0" or @code = "1859-8" or @code = "1860-6" or @code = "1861-4" or @code = "1862-2" or @code = "1863-0" or @code = "1864-8" or @code = "1865-5" or @code = "1866-3" or @code = "1867-1" or @code = "1868-9" or @code = "1869-7" or @code = "1870-5" or @code = "1871-3" or @code = "1872-1" or @code = "1873-9" or @code = "1874-7" or @code = "1875-4" or @code = "1876-2" or @code = "1877-0" or @code = "1878-8" or @code = "1879-6" or @code = "1880-4" or @code = "1881-2" or @code = "1882-0" or @code = "1883-8" or @code = "1884-6" or @code = "1885-3" or @code = "1886-1" or @code = "1887-9" or @code = "1888-7" or @code = "1889-5" or @code = "1891-1" or @code = "1892-9" or @code = "1893-7" or @code = "1894-5" or @code = "1896-0" or @code = "1897-8" or @code = "1898-6" or @code = "1899-4" or @code = "1900-0" or @code = "1901-8" or @code = "1902-6" or @code = "1903-4" or @code = "1904-2" or @code = "1905-9" or @code = "1906-7" or @code = "1907-5" or @code = "1908-3" or @code = "1909-1" or @code = "1910-9" or @code = "1911-7" or @code = "1912-5" or @code = "1913-3" or @code = "1914-1" or @code = "1915-8" or @code = "1916-6" or @code = "1917-4" or @code = "1918-2" or @code = "1919-0" or @code = "1920-8" or @code = "1921-6" or @code = "1922-4" or @code = "1923-2" or @code = "1924-0" or @code = "1925-7" or @code = "1926-5" or @code = "1927-3" or @code = "1928-1" or @code = "1929-9" or @code = "1930-7" or @code = "1931-5" or @code = "1932-3" or @code = "1933-1" or @code = "1934-9" or @code = "1935-6" or @code = "1936-4" or @code = "1937-2" or @code = "1938-0" or @code = "1939-8" or @code = "1940-6" or @code = "1941-4" or @code = "1942-2" or @code = "1943-0" or @code = "1944-8" or @code = "1945-5" or @code = "1946-3" or @code = "1947-1" or @code = "1948-9" or @code = "1949-7" or @code = "1950-5" or @code = "1951-3" or @code = "1952-1" or @code = "1953-9" or @code = "1954-7" or @code = "1955-4" or @code = "1956-2" or @code = "1957-0" or @code = "1958-8" or @code = "1959-6" or @code = "1960-4" or @code = "1961-2" or @code = "1962-0" or @code = "1963-8" or @code = "1964-6" or @code = "1966-1" or @code = "1968-7" or @code = "1969-5" or @code = "1970-3" or @code = "1972-9" or @code = "1973-7" or @code = "1974-5" or @code = "1975-2" or @code = "1976-0" or @code = "1977-8" or @code = "1978-6" or @code = "1979-4" or @code = "1980-2" or @code = "1981-0" or @code = "1982-8" or @code = "1984-4" or @code = "1985-1" or @code = "1986-9" or @code = "1987-7" or @code = "1988-5" or @code = "1990-1" or @code = "1992-7" or @code = "1993-5" or @code = "1994-3" or @code = "1995-0" or @code = "1996-8" or @code = "1997-6" or @code = "1998-4" or @code = "1999-2" or @code = "2000-8" or @code = "2002-4" or @code = "2004-0" or @code = "2006-5" or @code = "2007-3" or @code = "2008-1" or @code = "2009-9" or @code = "2010-7" or @code = "2011-5" or @code = "2012-3" or @code = "2013-1" or @code = "2014-9" or @code = "2015-6" or @code = "2016-4" or @code = "2017-2" or @code = "2018-0" or @code = "2019-8" or @code = "2020-6" or @code = "2021-4" or @code = "2022-2" or @code = "2023-0" or @code = "2024-8" or @code = "2025-5" or @code = "2026-3" or @code = "2028-9" or @code = "2029-7" or @code = "2030-5" or @code = "2031-3" or @code = "2032-1" or @code = "2033-9" or @code = "2034-7" or @code = "2035-4" or @code = "2036-2" or @code = "2037-0" or @code = "2038-8" or @code = "2039-6" or @code = "2040-4" or @code = "2041-2" or @code = "2042-0" or @code = "2043-8" or @code = "2044-6" or @code = "2045-3" or @code = "2046-1" or @code = "2047-9" or @code = "2048-7" or @code = "2049-5" or @code = "2050-3" or @code = "2051-1" or @code = "2052-9" or @code = "2054-5" or @code = "2056-0" or @code = "2058-6" or @code = "2060-2" or @code = "2061-0" or @code = "2062-8" or @code = "2063-6" or @code = "2064-4" or @code = "2065-1" or @code = "2066-9" or @code = "2067-7" or @code = "2068-5" or @code = "2069-3" or @code = "2070-1" or @code = "2071-9" or @code = "2072-7" or @code = "2073-5" or @code = "2074-3" or @code = "2075-0" or @code = "2076-8" or @code = "2078-4" or @code = "2079-2" or @code = "2080-0" or @code = "2081-8" or @code = "2082-6" or @code = "2083-4" or @code = "2085-9" or @code = "2086-7" or @code = "2087-5" or @code = "2088-3" or @code = "2089-1" or @code = "2090-9" or @code = "2091-7" or @code = "2092-5" or @code = "2093-3" or @code = "2094-1" or @code = "2095-8" or @code = "2096-6" or @code = "2097-4" or @code = "2098-2" or @code = "2100-6" or @code = "2101-4" or @code = "2102-2" or @code = "2103-0" or @code = "2104-8" or @code = "2106-3" or @code = "2108-9" or @code = "2109-7" or @code = "2110-5" or @code = "2111-3" or @code = "2112-1" or @code = "2113-9" or @code = "2114-7" or @code = "2115-4" or @code = "2116-2" or @code = "2118-8" or @code = "2119-6" or @code = "2120-4" or @code = "2121-2" or @code = "2122-0" or @code = "2123-8" or @code = "2124-6" or @code = "2125-3" or @code = "2126-1" or @code = "2127-9" or @code = "2129-5" or @code = "2131-1" or @code = "2500-7"]))</xsl:message>
     443         </xsl:otherwise>
     444      </xsl:choose>
     445
     446                    <!--ASSERT -->
     447<xsl:choose>
     448         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime)"/>
     449         <xsl:otherwise>
     450            <xsl:message>
     451    Error:  CONF-QRDA1-29 The 'birthTime' element SHALL be present.
     452     ((cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime))</xsl:message>
     453         </xsl:otherwise>
     454      </xsl:choose>
     455
     456                    <!--ASSERT -->
     457<xsl:choose>
     458         <xsl:when test="string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime/@value) &gt;= 8"/>
     459         <xsl:otherwise>
     460            <xsl:message>
     461       Error: CONF-QRDA1-30 The birthTime value attribute value SHALL be at least precise to the day (YYYYMMDD).
     462     (string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime/@value) &gt;= 8)</xsl:message>
     463         </xsl:otherwise>
     464      </xsl:choose>
     465
     466                    <!--ASSERT -->
     467<xsl:choose>
     468         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:providerOrganization) = 1"/>
     469         <xsl:otherwise>
     470            <xsl:message>
     471     Error: CONF-QRDA1-31  The report SHALL contain exactly one /recordTarget/patientRole/providerOrganization.
     472      (count(cda:recordTarget/cda:patientRole/cda:providerOrganization) = 1)</xsl:message>
     473         </xsl:otherwise>
     474      </xsl:choose>
     475
     476                    <!--ASSERT -->
     477<xsl:choose>
     478         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id[@root=&#34;2.16.840.1.113883.4.6&#34;])"/>
     479         <xsl:otherwise>
     480            <xsl:message>
     481     Error: CONF-QRDA1-32 The id 'root' attribute value SHALL be '2.16.840.1.113883.4.6'.
     482      ((cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id[@root="2.16.840.1.113883.4.6"]))</xsl:message>
     483         </xsl:otherwise>
     484      </xsl:choose>
     485      <xsl:variable name="npi"
     486                    select="cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id/@extension"/>
     487
     488                    <!--ASSERT -->
     489<xsl:choose>
     490         <xsl:when test="((sum(for $j in (for $i in reverse(string-to-codepoints($npi))[position() mod 2 = 0] return ($i - 48) * 2, for $i in reverse(string-to-codepoints($npi))[position() mod 2 = 1] return ($i - 48)) return ($j mod 10, $j idiv 10)) + 24) mod 10) = 0"/>
     491         <xsl:otherwise>
     492            <xsl:message>
     493  Error: CONF-QRDA1-32 cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id[@extension that containst the NPI Failed the NPI validation test!!
     494   (((sum(for $j in (for $i in reverse(string-to-codepoints($npi))[position() mod 2 = 0] return ($i - 48) * 2, for $i in reverse(string-to-codepoints($npi))[position() mod 2 = 1] return ($i - 48)) return ($j mod 10, $j idiv 10)) + 24) mod 10) = 0)</xsl:message>
     495         </xsl:otherwise>
     496      </xsl:choose>
     497
     498                    <!--ASSERT -->
     499<xsl:choose>
     500         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:name)"/>
     501         <xsl:otherwise>
     502            <xsl:message>
     503  Warning: CONF-QRDA1-33 recordTarget/patientRole/providerOrganization/name element SHOULD be present
     504   ((cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:name))</xsl:message>
     505         </xsl:otherwise>
     506      </xsl:choose>
     507
     508                    <!--ASSERT -->
     509<xsl:choose>
     510         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr) &gt;= 1"/>
     511         <xsl:otherwise>
     512            <xsl:message>
     513  Error: CONF-QRDA1-34 At least one recordTarget/patientRole/providerOrganization/name element SHALL be present
     514   (count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr) &gt;= 1)</xsl:message>
     515         </xsl:otherwise>
     516      </xsl:choose>
     517
     518                    <!--ASSERT -->
     519<xsl:choose>
     520         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:streetAddressLine)"/>
     521         <xsl:otherwise>
     522            <xsl:message>
     523  Warning: CONF-QRDA1-35 recordTarget/patientRole/providerOrganization/addr/streetAddressLine) element MAY be present
     524   ((cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:streetAddressLine))</xsl:message>
     525         </xsl:otherwise>
     526      </xsl:choose>
     527
     528                    <!--ASSERT -->
     529<xsl:choose>
     530         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:city)"/>
     531         <xsl:otherwise>
     532            <xsl:message>
     533  Warning: CONF-QRDA1-36 recordTarget/patientRole/providerOrganization/addr/city) element MAY be present
     534   ((cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:city))</xsl:message>
     535         </xsl:otherwise>
     536      </xsl:choose>
     537
     538                    <!--ASSERT -->
     539<xsl:choose>
     540         <xsl:when test="contains(&#34;AL AK AZ AR AS CA CO CT DE DC FL GA GU HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC MP ND OH OK OR PA PR RI SC SD TN TX UT VT VI VA WA WV WI WY&#34;,cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:state)"/>
     541         <xsl:otherwise>
     542            <xsl:message>
     543  Error: CONF-QRDA1-37 recordTarget/patientRole/providerOrganization/addr/state) element SHALL be present and shall be one of the states in the Appendix_V-States Downloadable Resource
     544   (contains("AL AK AZ AR AS CA CO CT DE DC FL GA GU HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC MP ND OH OK OR PA PR RI SC SD TN TX UT VT VI VA WA WV WI WY",cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:state))</xsl:message>
     545         </xsl:otherwise>
     546      </xsl:choose>
     547
     548                    <!--ASSERT -->
     549<xsl:choose>
     550         <xsl:when test="(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:postalCode)"/>
     551         <xsl:otherwise>
     552            <xsl:message>
     553  Warning: CONF-QRDA1-38 recordTarget/patientRole/providerOrganization/addr/postalCode) element MAY be present
     554   ((cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:postalCode))</xsl:message>
     555         </xsl:otherwise>
     556      </xsl:choose>
     557
     558                    <!--ASSERT -->
     559<xsl:choose>
     560         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf) = 1"/>
     561         <xsl:otherwise>
     562            <xsl:message>
     563  Error: CONF-QRDA1-39 Report SHALL contain exactly one recordTarget/patientRole/providerOrganization/asOrganizationPartOf element.
     564   (count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf) = 1)</xsl:message>
     565         </xsl:otherwise>
     566      </xsl:choose>
     567
     568                    <!--ASSERT -->
     569<xsl:choose>
     570         <xsl:when test="count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization) = 1"/>
     571         <xsl:otherwise>
     572            <xsl:message>
     573  Error: CONF-QRDA1-40 Report SHALL contain exactly one recordTarget/patientRole/providerOrganization/asOrganizationPartOf/wholeOrganization element.
     574   (count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization) = 1)</xsl:message>
     575         </xsl:otherwise>
     576      </xsl:choose>
     577
     578                    <!--ASSERT -->
     579<xsl:choose>
     580         <xsl:when test="cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id[@root = &#34;2.16.840.1.113883.4.2&#34;]"/>
     581         <xsl:otherwise>
     582            <xsl:message>
     583    Error:  CONF-QRDA1-41 The id 'root' attribute value SHALL be '2.16.840.1.113883.4.2'.
     584   (cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id[@root = "2.16.840.1.113883.4.2"])</xsl:message>
     585         </xsl:otherwise>
     586      </xsl:choose>
     587
     588                    <!--ASSERT -->
     589<xsl:choose>
     590         <xsl:when test="string-length(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id/@extension) = &#34;9&#34;"/>
     591         <xsl:otherwise>
     592            <xsl:message>
     593  Error: CONF-QRDA1-41 The patient's provider's organization's id 'extension' attribute value SHALL be present as the provider's TIN (nine-digit value in XXXXXXXXX format).
     594   (string-length(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id/@extension) = "9")</xsl:message>
     595         </xsl:otherwise>
     596      </xsl:choose>
     597
     598                    <!--ASSERT -->
     599<xsl:choose>
     600         <xsl:when test="count(cda:author)= 1"/>
     601         <xsl:otherwise>
     602            <xsl:message>
     603  CONF-QRDA1-42 Report SHALL contain exactly one /clinicalDocument/author.
     604   (count(cda:author)= 1)</xsl:message>
     605         </xsl:otherwise>
     606      </xsl:choose>
     607
     608                    <!--ASSERT -->
     609<xsl:choose>
     610         <xsl:when test="cda:author/cda:time"/>
     611         <xsl:otherwise>
     612            <xsl:message>
     613       Error: CONF-QRDA1-43 The /clinicalDocument/author/time element shall be present.
     614   (cda:author/cda:time)</xsl:message>
     615         </xsl:otherwise>
     616      </xsl:choose>
     617
     618                    <!--ASSERT -->
     619<xsl:choose>
     620         <xsl:when test="string-length(cda:author/cda:time/@value) &gt;= 8"/>
     621         <xsl:otherwise>
     622            <xsl:message>
     623       Error: CONF-QRDA1-44 The effectiveTime value attribute value SHALL be at least precise to the day YYYYMMDD.
     624   (string-length(cda:author/cda:time/@value) &gt;= 8)</xsl:message>
     625         </xsl:otherwise>
     626      </xsl:choose>
     627
     628                    <!--ASSERT -->
     629<xsl:choose>
     630         <xsl:when test="cda:author/cda:assignedAuthor"/>
     631         <xsl:otherwise>
     632            <xsl:message>
     633     Error: CONF-QRDA1-45 clinicalDocument/author/assignedAuthor element SHALL be present.
     634   (cda:author/cda:assignedAuthor)</xsl:message>
     635         </xsl:otherwise>
     636      </xsl:choose>
     637
     638                    <!--ASSERT -->
     639<xsl:choose>
     640         <xsl:when test="cda:author/cda:assignedAuthor/cda:id[@root=&#34;2.16.840.1.113883.249.6&#34;]"/>
     641         <xsl:otherwise>
     642            <xsl:message>
     643     Error: CONF-QRDA1-46 clinicalDocument/author/assignedAuthor/id element SHALL be present.  The id @root SHALL be 2.16.840.1.113883.249.6 and the @extension SHALL be the CMS Approved Qualified Software Version.
     644   (cda:author/cda:assignedAuthor/cda:id[@root="2.16.840.1.113883.249.6"])</xsl:message>
     645         </xsl:otherwise>
     646      </xsl:choose>
     647
     648                    <!--ASSERT -->
     649<xsl:choose>
     650         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:assignedPerson) &lt;= 1"/>
     651         <xsl:otherwise>
     652            <xsl:message>                 
     653     Warning: CONF-QRDA1-47 and 48: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/assignedPerson element and if present may contain exactly one.
     654   (count(cda:author/cda:assignedAuthor/cda:assignedPerson) &lt;= 1)</xsl:message>
     655         </xsl:otherwise>
     656      </xsl:choose>
     657
     658                    <!--ASSERT -->
     659<xsl:choose>
     660         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:assignedPerson/name) &gt;= 0"/>
     661         <xsl:otherwise>
     662            <xsl:message>                 
     663       Error: CONF-QRDA1-49: A QRDA Category I report MAY contain at least one legal name ClinicalDocument/author/assignedAuthor/assignedPerson/name.
     664   (count(cda:author/cda:assignedAuthor/cda:assignedPerson/name) &gt;= 0)</xsl:message>
     665         </xsl:otherwise>
     666      </xsl:choose>
     667
     668                    <!--ASSERT -->
     669<xsl:choose>
     670         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:given) &gt;= 0"/>
     671         <xsl:otherwise>
     672            <xsl:message>                 
     673       Error: CONF-QRDA1-50: A QRDA Category I report MAY contain at least one ClinicalDocument/author/assignedAuthor/assignedPerson/name/given.
     674   (count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:given) &gt;= 0)</xsl:message>
     675         </xsl:otherwise>
     676      </xsl:choose>
     677
     678                    <!--ASSERT -->
     679<xsl:choose>
     680         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:family) &gt;= 0"/>
     681         <xsl:otherwise>
     682            <xsl:message>                 
     683       Error: CONF-QRDA1-51: A QRDA Category I report MAY contain at least one ClinicalDocument/author/assignedAuthor/assignedPerson/name/family.
     684   (count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:family) &gt;= 0)</xsl:message>
     685         </xsl:otherwise>
     686      </xsl:choose>
     687
     688                    <!--ASSERT -->
     689<xsl:choose>
     690         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:representedOrganization) &lt;= 1"/>
     691         <xsl:otherwise>
     692            <xsl:message>                 
     693       Error: CONF-QRDA1-52: A QRDA Category I report MAY contain one ClinicalDocument/author/assignedAuthor/representedOrganization.
     694   (count(cda:author/cda:assignedAuthor/cda:representedOrganization) &lt;= 1)</xsl:message>
     695         </xsl:otherwise>
     696      </xsl:choose>
     697
     698                    <!--ASSERT -->
     699<xsl:choose>
     700         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:representeOrganization/cda:id[@root=&#34;*&#34;]) &gt;= 0"/>
     701         <xsl:otherwise>
     702            <xsl:message>                 
     703       Error: CONF-QRDA1-53: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/representedOrganization/id element with @root containing the OID of the authoring organization.
     704   (count(cda:author/cda:assignedAuthor/cda:representeOrganization/cda:id[@root="*"]) &gt;= 0)</xsl:message>
     705         </xsl:otherwise>
     706      </xsl:choose>
     707
     708                    <!--ASSERT -->
     709<xsl:choose>
     710         <xsl:when test="count(cda:author/cda:assignedAuthor/cda:representeOrganization/name) &gt;= 0"/>
     711         <xsl:otherwise>
     712            <xsl:message>                 
     713       Error: CONF-QRDA1-54: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/representedOrganization/name element.
     714   (count(cda:author/cda:assignedAuthor/cda:representeOrganization/name) &gt;= 0)</xsl:message>
    256715         </xsl:otherwise>
    257716      </xsl:choose>
  • qrda/schematron/templates/2.16.840.1.113883.10.20.12.ent

    r906 r909  
    11<!--  HL7 QRDA Category I Header (Section 2) -->
    2 
     2<!-- This document provides errors and edits pertinent to the header section of the QRDA files. It is assumed that the QRDA files are VALID CDA release 2 files.-->
    33<!-- errors -->
    4   <pattern id="p-2.16.840.1.113883.10.20.12-errors">
     4    <pattern id="p-2.16.840.1.113883.10.20.12-errors">
    55    <title>HL7 QRDA Category I Header (Section 2) - errors validation phase</title>
    6 
    7     <rule context='/'>
    8     <assert test='.//cda:templateId/@root="2.16.840.1.113883.10.20.12"'>
     6  <rule context='/'>
     7    <assert test='.//cda:realmCode[@code = "US"]'>
     8       Error: CONF-QRDA1-I: The realmCode element SHALL be present where the value of @code is US.
     9    </assert>
     10    <assert test='.//cda:typeId[@root = "2.16.840.1.113883.1.3" and @extension = "POCD_HD000040"]'>
     11       Error: CONF-QRDA1-2: The value of typeId/@root SHALL be 2.16.840.1.113883.1.3 and value of
     12       typeId/@extension SHALL be POCD_HD000040.
     13    </assert>
     14    <assert test='not(cda:ClinicalDocument/cda:templateId) = 0'>
     15      Error: CONF-QRDA1-3 The CMS EHR QRDA Report SHALL contain at least one ClincalDocument/templateId element
     16    </assert>
     17    <assert test='.//cda:templateId/@root="2.16.840.1.113883.10.20.12" and .//cda:templateId/@root="2.16.840.1.113883.3.249.11.100.1"'>
     18       Error: CONF-QRDA-I-4: The value of one ClinicalDocument/templateId/@root SHALL be
     19       2.16.840.1.113883.10.20.12 and PQRI QRDA category I templateId 'root' value SHALL be 2.16.840.1.113883.3.249.11.100.1.
     20    </assert>
     21    </rule>
     22
     23<!--    <assert test='.//cda:templateId/@root="2.16.840.1.113883.10.20.12"'>
    924       Error: CONF-QRDA-I-5: The value of one ClinicalDocument/templateId/@root SHALL be
    1025       2.16.840.1.113883.10.20.12 representing conformance to the generic
    1126       QRDA Category I framework constraints.
    1227    </assert>
    13     </rule>
    14 
     28    </rule> -->
     29   
    1530    <rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.12"]'>
    16     <assert test='cda:realmCode[@code = "US"]'>
    17        Error: CONF-QRDA-I-2: The realmCode element SHALL be present where the value of @code is US.
    18     </assert>
    19     <assert test='cda:typeId[@root = "2.16.840.1.113883.1.3" and @extension = "POCD_HD000040"]'>
    20        Error: CONF-QRDA-I-3: The value of typeId/@root SHALL be 2.16.840.1.113883.1.3 and value of
    21        typeId/@extension SHALL be POCD_HD000040.
    22     </assert>
    2331    <assert test='count(cda:code) = 1 and cda:code[@code="55182-0" and @codeSystem="2.16.840.1.113883.6.1"]'>
    24        Error: CONF-QRDA-I-6: A QRDA Category I report SHALL contain exactly one
     32       Error: CONF-QRDA1-7: A QRDA Category I report SHALL contain exactly one
    2533       ClinicalDocument/code with a value of 55182-0 2.16.840.1.113883.6.1
    2634       LOINC STATIC.
     
    2836    <assert test="contains(translate(cda:title,'QWERTYUIOPASDFGHJKLZXCVBNM','qwertyuiopasdfghjklzxcvbnm'),'qrda incidence report') or
    2937                  contains(translate(cda:title,'QWERTYUIOPASDFGHJKLZXCVBNM','qwertyuiopasdfghjklzxcvbnm'),'quality measure report')">
    30        Error: CONF-QRDA-I-7: A QRDA Category I report SHALL contain exactly one
     38       Error: CONF-QRDA1-8: A QRDA Category I report SHALL contain exactly one
    3139       ClinicalDocument/title element valued with a case-insensitive, text
    3240       string containing "QRDA Incidence Report" or "Quality measure
    3341       Report".
    3442    </assert>
     43    <assert test='string-length(cda:effectiveTime/@value) &gt;= 8'>
     44       Error: CONF-QRDA1-10 The effectiveTime value attribute value SHALL be at least precise to the day YYYYMMDD.
     45    </assert>
     46    <assert test='cda:confidentialityCode[@code="N" and @codeSystem="2.16.840.1.113883.5.25"]'>
     47      Error: CONF-QRDA1-12: The confidentialityCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.25. The confidentialityCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.25
     48    </assert>
     49    <assert test='not(cda:setId) = 0'>
     50      Error: CONF-QRDA1-13: setId element is missing. The 'setId' element SHALL be present.
     51    </assert>
     52    <assert test='not(cda:versionNumber) = 0'>
     53      Error: CONF-QRDA1-16  versionNumber element is missing. The 'versionNumber' element SHALL be present.
     54    </assert>
     55   
     56    <assert test='cda:versionNumber/@value castable as xs:integer' >
     57      Error: CONF-QRDA1-17: versionNumber/@value SHALL be an integer
     58     </assert>
     59    <!--  This did not work with type xsi or type xsd
     60    <assert test='cda:versionNumber/value/@xsi:type = "int"' >
     61      Error: CONF-QRDA1-17: versionNumber/@value SHALL be an integer
     62     </assert> -->
     63    <!-- 2010 entry below -->
     64
    3565    <assert test='count(cda:recordTarget/cda:patientRole) = 1'>
    36        Error: CONF-QRDA-I-8: A QRDA Category I report SHALL contain exactly one
     66       Error: CONF-QRDA1-18: A QRDA Category I report SHALL contain exactly one
    3767       ClinicalDocument/recordTarget/PatientRole.
    3868    </assert>
    39     <assert test='cda:author/cda:assignedAuthor/cda:assignedPerson or
    40                   cda:author/cda:assignedAuthor/cda:assignedAuthoringDevice '>
    41        Error: CONF-QRDA-I-9: A QRDA Category I report SHALL contain one or more
    42         ClinicalDocument/author/assignedAuthor/assignedPerson and/or
    43         ClinicalDocument/author/assignedAuthor/assignedAuthoringDevice.
    44     </assert>
    45     <assert test='count(cda:informant) = 1'>
     69   
     70    <assert test='cda:recordTarget/cda:patientRole/cda:id[@root = "2.16.840.1.113883.4.1" or @root = "2.16.840.1.113883.4.2" or @root = "2.16.840.1.113883.4.3.40" or @root = "2.16.840.1.113883.4.3.49" or @root = "2.16.840.1.113883.4.3.38" or @root = "2.16.840.1.113883.4.3.37" or @root = "2.16.840.1.113883.4.3.36" or @root = "2.16.840.1.113883.4.3.35" or @root = "2.16.840.1.113883.4.3.34" or @root = "2.16.840.1.113883.4.3.48" or @root = "2.16.840.1.113883.4.3.32" or @root = "2.16.840.1.113883.4.3.39" or @root = "2.16.840.1.113883.4.3.15" or @root = "2.16.840.1.113883.4.3.51" or @root = "2.16.840.1.113883.4.3.53" or @root = "2.16.840.1.113883.4.3.54" or @root = "2.16.840.1.113883.4.3.55" or @root = "2.16.840.1.113883.4.3.56" or @root = "2.16.840.1.113883.4.3.42" or @root = "2.16.840.1.113883.4.3.47" or @root = "2.16.840.1.113883.4.3.41" or @root = "2.16.840.1.113883.4.3.46" or @root = "2.16.840.1.113883.4.3.45" or @root = "2.16.840.1.113883.4.3.31" or @root = "2.16.840.1.113883.4.3.50" or @root = "2.16.840.1.113883.4.3.30" or @root = "2.16.840.1.113883.4.3.44" or @root = "2.16.840.1.113883.4.3.16" or @root = "2.16.840.1.113883.4.3.5" or @root = "2.16.840.1.113883.4.3.9" or @root = "2.16.840.1.113883.4.3.8" or @root = "2.16.840.1.113883.4.3.6" or @root = "2.16.840.1.113883.4.3.33" or @root = "2.16.840.1.113883.4.3.11" or @root = "2.16.840.1.113883.4.3.10" or @root = "2.16.840.1.113883.4.3.12" or @root = "2.16.840.1.113883.4.3.4" or @root = "2.16.840.1.113883.4.3.2" or @root = "2.16.840.1.113883.4.3.1" or @root = "2.16.840.1.113883.4.3" or @root = "2.16.840.1.113883.4.3.17" or @root = "2.16.840.1.113883.4.3.26" or @root = "2.16.840.1.113883.4.3.29" or @root = "2.16.840.1.113883.4.3.18" or @root = "2.16.840.1.113883.4.3.28" or @root = "2.16.840.1.113883.4.3.25" or @root = "2.16.840.1.113883.4.3.24" or @root = "2.16.840.1.113883.4.3.23" or @root = "2.16.840.1.113883.4.3.13" or @root = "2.16.840.1.113883.4.3.22" or @root = "2.16.840.1.113883.4.3.21" or @root = "2.16.840.1.113883.4.3.20" or @root = "2.16.840.1.113883.4.3.19" or @root = "2.16.840.1.113883.4.3.27" or @root = "2.16.840.1.113883.4.4" or @root = "2.16.840.1.113883.4.5" and @extension = "*"]'>
     71    Error:  CONF-QRDA1-19 @root contains OID for the coding system used to identify the patient.  The value of @extension is the unique patient identifier the EHR sysetm uses fo record activity on a patient.  Commonly used OIDs for entries to identify patient sucha as SSN, TIN, DLN, etc. are available at Appendix_L-OIDs tab of the Downloadable Resources table.
     72    </assert>
     73    <!--<assert test='count(cda:recordTarget/cda:patientRole/cda:patient) = 1'>
     74       Error:  CONF-QRDA1-22  patientRole 'patient' element is missing. The 'patient' element SHALL be submitted exactly once.
     75    </assert> -->
     76    <!--<assert test='cda:recordTarget/cda:patientRole/cda:patient/id' >
     77      Error:  CONF-QRDA1-19 @root contains OID for the coding system used to identify the patient.  The value of @extension is the unique patient identifier the EHR sysetm uses fo record activity on a patient.  Commoly used OIDs for entries to identify patient sucha as SSN, TIN, DLN, etc. are avaialbe at Appendix_L-OIDs tab of the Downloadable Resources table.
     78      </assert> -->
     79    <assert test='count(cda:recordTarget/cda:patientRole/cda:patient/cda:name) &gt;= 1'>
     80       Error:  CONF-QRDA1-23 patient's legal 'name' element is expected at least once. The patient's legal 'name' element SHALL be submitted at least exactly once.
     81    </assert>
     82    <assert test='count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given) &gt;= 1'>
     83       Error:  CONF-QRDA1-24 patient's legal name 'given' (first name) element is expected at least once. The patient's legal 'given' (first name) element SHALL be submitted at least exactly once.
     84    </assert>
     85    <!-- This restriction for length is not in the specification, only in the error table.-->
     86    <assert test='string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:given/@value) &lt;= 30'>
     87       Error:  CONF-QRDA1-24 patient's legal name 'given' (first name) element value length SHALL not be more than 30 characters. patient's legal name 'given' (first name) element value length SHALL not be more than 30 characters.
     88    </assert>
     89    <!-- This restriction for length is not in the specification, only in the error table.-->
     90    <assert test='count(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family) &gt;= 1'>
     91       Error:  CONF-QRDA1-25 patient's legal name 'family' (last name) element is expected at least once. The patient's legal 'family' (last name) element SHALL be submitted at least exactly once.
     92    </assert>
     93   
     94    <assert test='string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:name/cda:family/@value) &lt;= 30'>
     95       Error:  CONF-QRDA1-25 patient's legal name 'family' (last name) element value length SHALL not be more than 30 characters. patient's legal name 'family' (last name) element value length SHALL not be more than 30 characters.
     96    </assert>
     97    <assert test='cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@codeSystem="2.16.840.1.113883.5.50"]'>
     98    Error:  CONF-QRDA1-26 The patient's ethnic group code 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.50'.
     99    </assert>
     100    <assert test='cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@code = "2135-2" or @code = "2137-8" or @code = "2138-6" or @code = "2139-4" or @code = "2140-2" or @code = "2141-0" or @code = "2142-8" or @code = "2143-6" or @code = "2144-4" or @code = "2145-1" or @code = "2146-9" or @code = "2148-5" or @code = "2149-3" or @code = "2150-1" or @code = "2151-9" or @code = "2152-7" or @code = "2153-5" or @code = "2155-0" or @code = "2156-8" or @code = "2157-6" or @code = "2158-4" or @code = "2159-2" or @code = "2160-0" or @code = "2161-8" or @code = "2162-6" or @code = "2163-4" or @code = "2165-9" or @code = "2166-7" or @code = "2167-5" or @code = "2168-3" or @code = "2169-1" or @code = "2170-9" or @code = "2171-7" or @code = "2172-5" or @code = "2173-3" or @code = "2174-1" or @code = "2175-8" or @code = "2176-6" or @code = "2178-2" or @code = "2180-8" or @code = "2182-4" or @code = "2184-0" or @code = "2186-5"]'>
     101    Error:  CONF-QRDA1-26  The patient's ethnic group 'code' value SHALL be valid according to Appendix_M-Ethnicity in the posted Downloadable Resource table.
     102    </assert>
     103    <!-- above two asserts combined into one.  It is separate in the error sheets
     104    <assert test='cda:recordTarget/cda:patientRole/cda:patient/cda:ethnicGroupCode[@codeSystem="2.16.840.1.113883.5.50" and @code = "2135-2" or @code = "2137-8" or @code = "2138-6" or @code = "2139-4" or @code = "2140-2" or @code = "2141-0" or @code = "2142-8" or @code = "2143-6" or @code = "2144-4" or @code = "2145-1" or @code = "2146-9" or @code = "2148-5" or @code = "2149-3" or @code = "2150-1" or @code = "2151-9" or @code = "2152-7" or @code = "2153-5" or @code = "2155-0" or @code = "2156-8" or @code = "2157-6" or @code = "2158-4" or @code = "2159-2" or @code = "2160-0" or @code = "2161-8" or @code = "2162-6" or @code = "2163-4" or @code = "2165-9" or @code = "2166-7" or @code = "2167-5" or @code = "2168-3" or @code = "2169-1" or @code = "2170-9" or @code = "2171-7" or @code = "2172-5" or @code = "2173-3" or @code = "2174-1" or @code = "2175-8" or @code = "2176-6" or @code = "2178-2" or @code = "2180-8" or @code = "2182-4" or @code = "2184-0" or @code = "2186-5"]'>
     105    Error:  CONF-QRDA1-26 The patient's ethnic group code 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.50'. The patient's ethnic group 'code' value SHALL be valid according to Appendix_M-Ethnicity in the posted Downloadable Resource table.
     106    </assert> -->
     107    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode)'>
     108    Error:  CONF-QRDA1-27 The 'administrativeGenderCode' element SHALL be present.
     109    </assert>
     110    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@codeSystem = "2.16.840.1.113883.5.1"])'>
     111    Error:  CONF-QRDA1-27 The patient's administrativeGenderCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.1'.
     112    </assert>
     113    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@code="M" or @code="F" or @code="UN"])'>
     114    Error:  CONF-QRDA1-27 The patient's administrative gender 'code'  value SHALL be valid according to Appendix_N-Gender in the posted Downloadable Resource table.
     115    </assert>
     116    <!-- Combining the previous three asserts and using language from the specs document
     117    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:administrativeGenderCode[@codeSystem = "2.16.840.1.113883.5.1" and @code="M" or @code="F" or @code="UN"])'>
     118      Error:  CONF-QRDA1-27 Code element SHALL be present where the value of the @codeSystem SHALL be 2.16.840.1.113883.5.1 and the value of @code SHALL be from the Appendix_N-Gender tab of the Downloadable Resources Table.
     119     </assert> -->
     120     <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode)'>
     121    Error:  CONF-QRDA1-28 The 'raceCode' element SHALL be present.
     122    </assert>
     123    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@codeSystem = "2.16.840.1.113883.5.104"])'>
     124    Error:  CONF-QRDA1-28 The patient's raceCode 'codeSystem' attribute value SHALL be '2.16.840.1.113883.5.104'.
     125    </assert>
     126     <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@code = "1002-5" or @code = "1004-1" or @code = "1006-6" or @code = "1008-2" or @code = "1010-8" or @code = "1011-6" or @code = "1012-4" or @code = "1013-2" or @code = "1014-0" or @code = "1015-7" or @code = "1016-5" or @code = "1017-3" or @code = "1018-1" or @code = "1019-9" or @code = "1021-5" or @code = "1022-3" or @code = "1023-1" or @code = "1024-9" or @code = "1026-4" or @code = "1028-0" or @code = "1030-6" or @code = "1031-4" or @code = "1033-0" or @code = "1035-5" or @code = "1037-1" or @code = "1039-7" or @code = "1041-3" or @code = "1042-1" or @code = "1044-7" or @code = "1045-4" or @code = "1046-2" or @code = "1047-0" or @code = "1048-8" or @code = "1049-6" or @code = "1050-4" or @code = "1051-2" or @code = "1053-8" or @code = "1054-6" or @code = "1055-3" or @code = "1056-1" or @code = "1057-9" or @code = "1058-7" or @code = "1059-5" or @code = "1060-3" or @code = "1061-1" or @code = "1062-9" or @code = "1063-7" or @code = "1064-5" or @code = "1065-2" or @code = "1066-0" or @code = "1068-6" or @code = "1069-4" or @code = "1070-2" or @code = "1071-0" or @code = "1072-8" or @code = "1073-6" or @code = "1074-4" or @code = "1076-9" or @code = "1078-5" or @code = "1080-1" or @code = "1082-7" or @code = "1083-5" or @code = "1084-3" or @code = "1086-8" or @code = "1088-4" or @code = "1089-2" or @code = "1090-0" or @code = "1091-8" or @code = "1092-6" or @code = "1093-4" or @code = "1094-2" or @code = "1095-9" or @code = "1096-7" or @code = "1097-5" or @code = "1098-3" or @code = "1100-7" or @code = "1102-3" or @code = "1103-1" or @code = "1104-9" or @code = "1106-4" or @code = "1108-0" or @code = "1109-8" or @code = "1110-6" or @code = "1112-2" or @code = "1114-8" or @code = "1115-5" or @code = "1116-3" or @code = "1117-1" or @code = "1118-9" or @code = "1119-7" or @code = "1120-5" or @code = "1121-3" or @code = "1123-9" or @code = "1124-7" or @code = "1125-4" or @code = "1126-2" or @code = "1127-0" or @code = "1128-8" or @code = "1129-6" or @code = "1130-4" or @code = "1131-2" or @code = "1132-0" or @code = "1133-8" or @code = "1134-6" or @code = "1135-3" or @code = "1136-1" or @code = "1137-9" or @code = "1138-7" or @code = "1139-5" or @code = "1140-3" or @code = "1141-1" or @code = "1142-9" or @code = "1143-7" or @code = "1144-5" or @code = "1145-2" or @code = "1146-0" or @code = "1147-8" or @code = "1148-6" or @code = "1150-2" or @code = "1151-0" or @code = "1153-6" or @code = "1155-1" or @code = "1156-9" or @code = "1157-7" or @code = "1158-5" or @code = "1159-3" or @code = "1160-1" or @code = "1162-7" or @code = "1163-5" or @code = "1165-0" or @code = "1167-6" or @code = "1169-2" or @code = "1171-8" or @code = "1173-4" or @code = "1175-9" or @code = "1176-7" or @code = "1178-3" or @code = "1180-9" or @code = "1182-5" or @code = "1184-1" or @code = "1186-6" or @code = "1187-4" or @code = "1189-0" or @code = "1191-6" or @code = "1193-2" or @code = "1194-0" or @code = "1195-7" or @code = "1196-5" or @code = "1197-3" or @code = "1198-1" or @code = "1199-9" or @code = "1200-5" or @code = "1201-3" or @code = "1202-1" or @code = "1203-9" or @code = "1204-7" or @code = "1205-4" or @code = "1207-0" or @code = "1209-6" or @code = "1211-2" or @code = "1212-0" or @code = "1214-6" or @code = "1215-3" or @code = "1216-1" or @code = "1217-9" or @code = "1218-7" or @code = "1219-5" or @code = "1220-3" or @code = "1222-9" or @code = "1223-7" or @code = "1224-5" or @code = "1225-2" or @code = "1226-0" or @code = "1227-8" or @code = "1228-6" or @code = "1229-4" or @code = "1230-2" or @code = "1231-0" or @code = "1233-6" or @code = "1234-4" or @code = "1235-1" or @code = "1236-9" or @code = "1237-7" or @code = "1238-5" or @code = "1239-3" or @code = "1240-1" or @code = "1241-9" or @code = "1242-7" or @code = "1243-5" or @code = "1244-3" or @code = "1245-0" or @code = "1246-8" or @code = "1247-6" or @code = "1248-4" or @code = "1250-0" or @code = "1252-6" or @code = "1254-2" or @code = "1256-7" or @code = "1258-3" or @code = "1260-9" or @code = "1262-5" or @code = "1264-1" or @code = "1265-8" or @code = "1267-4" or @code = "1269-0" or @code = "1271-6" or @code = "1272-4" or @code = "1273-2" or @code = "1275-7" or @code = "1277-3" or @code = "1279-9" or @code = "1281-5" or @code = "1282-3" or @code = "1283-1" or @code = "1285-6" or @code = "1286-4" or @code = "1287-2" or @code = "1288-0" or @code = "1289-8" or @code = "1290-6" or @code = "1291-4" or @code = "1292-2" or @code = "1293-0" or @code = "1294-8" or @code = "1295-5" or @code = "1297-1" or @code = "1299-7" or @code = "1301-1" or @code = "1303-7" or @code = "1305-2" or @code = "1306-0" or @code = "1307-8" or @code = "1309-4" or @code = "1310-2" or @code = "1312-8" or @code = "1313-6" or @code = "1314-4" or @code = "1315-1" or @code = "1317-7" or @code = "1319-3" or @code = "1321-9" or @code = "1323-5" or @code = "1325-0" or @code = "1326-8" or @code = "1327-6" or @code = "1328-4" or @code = "1329-2" or @code = "1331-8" or @code = "1332-6" or @code = "1333-4" or @code = "1334-2" or @code = "1335-9" or @code = "1336-7" or @code = "1337-5" or @code = "1338-3" or @code = "1340-9" or @code = "1342-5" or @code = "1344-1" or @code = "1345-8" or @code = "1346-6" or @code = "1348-2" or @code = "1350-8" or @code = "1352-4" or @code = "1354-0" or @code = "1356-5" or @code = "1358-1" or @code = "1359-9" or @code = "1360-7" or @code = "1361-5" or @code = "1363-1" or @code = "1365-6" or @code = "1366-4" or @code = "1368-0" or @code = "1370-6" or @code = "1372-2" or @code = "1374-8" or @code = "1376-3" or @code = "1378-9" or @code = "1380-5" or @code = "1382-1" or @code = "1383-9" or @code = "1384-7" or @code = "1385-4" or @code = "1387-0" or @code = "1389-6" or @code = "1391-2" or @code = "1392-0" or @code = "1393-8" or @code = "1394-6" or @code = "1395-3" or @code = "1396-1" or @code = "1397-9" or @code = "1398-7" or @code = "1399-5" or @code = "1400-1" or @code = "1401-9" or @code = "1403-5" or @code = "1405-0" or @code = "1407-6" or @code = "1409-2" or @code = "1411-8" or @code = "1412-6" or @code = "1413-4" or @code = "1414-2" or @code = "1416-7" or @code = "1417-5" or @code = "1418-3" or @code = "1419-1" or @code = "1420-9" or @code = "1421-7" or @code = "1422-5" or @code = "1423-3" or @code = "1424-1" or @code = "1425-8" or @code = "1426-6" or @code = "1427-4" or @code = "1428-2" or @code = "1429-0" or @code = "1430-8" or @code = "1431-6" or @code = "1432-4" or @code = "1433-2" or @code = "1434-0" or @code = "1435-7" or @code = "1436-5" or @code = "1437-3" or @code = "1439-9" or @code = "1441-5" or @code = "1442-3" or @code = "1443-1" or @code = "1445-6" or @code = "1446-4" or @code = "1448-0" or @code = "1450-6" or @code = "1451-4" or @code = "1453-0" or @code = "1454-8" or @code = "1456-3" or @code = "1457-1" or @code = "1458-9" or @code = "1460-5" or @code = "1462-1" or @code = "1464-7" or @code = "1465-4" or @code = "1466-2" or @code = "1467-0" or @code = "1468-8" or @code = "1469-6" or @code = "1470-4" or @code = "1471-2" or @code = "1472-0" or @code = "1474-6" or @code = "1475-3" or @code = "1476-1" or @code = "1478-7" or @code = "1479-5" or @code = "1480-3" or @code = "1481-1" or @code = "1482-9" or @code = "1483-7" or @code = "1484-5" or @code = "1485-2" or @code = "1487-8" or @code = "1489-4" or @code = "1490-2" or @code = "1491-0" or @code = "1492-8" or @code = "1493-6" or @code = "1494-4" or @code = "1495-1" or @code = "1496-9" or @code = "1497-7" or @code = "1498-5" or @code = "1499-3" or @code = "1500-8" or @code = "1501-6" or @code = "1502-4" or @code = "1503-2" or @code = "1504-0" or @code = "1505-7" or @code = "1506-5" or @code = "1507-3" or @code = "1508-1" or @code = "1509-9" or @code = "1510-7" or @code = "1511-5" or @code = "1512-3" or @code = "1513-1" or @code = "1514-9" or @code = "1515-6" or @code = "1516-4" or @code = "1518-0" or @code = "1519-8" or @code = "1520-6" or @code = "1521-4" or @code = "1522-2" or @code = "1523-0" or @code = "1524-8" or @code = "1525-5" or @code = "1526-3" or @code = "1527-1" or @code = "1528-9" or @code = "1529-7" or @code = "1530-5" or @code = "1531-3" or @code = "1532-1" or @code = "1533-9" or @code = "1534-7" or @code = "1535-4" or @code = "1536-2" or @code = "1537-0" or @code = "1538-8" or @code = "1539-6" or @code = "1541-2" or @code = "1543-8" or @code = "1545-3" or @code = "1547-9" or @code = "1549-5" or @code = "1551-1" or @code = "1552-9" or @code = "1553-7" or @code = "1554-5" or @code = "1556-0" or @code = "1558-6" or @code = "1560-2" or @code = "1562-8" or @code = "1564-4" or @code = "1566-9" or @code = "1567-7" or @code = "1568-5" or @code = "1569-3" or @code = "1570-1" or @code = "1571-9" or @code = "1573-5" or @code = "1574-3" or @code = "1576-8" or @code = "1578-4" or @code = "1579-2" or @code = "1580-0" or @code = "1582-6" or @code = "1584-2" or @code = "1586-7" or @code = "1587-5" or @code = "1588-3" or @code = "1589-1" or @code = "1590-9" or @code = "1591-7" or @code = "1592-5" or @code = "1593-3" or @code = "1594-1" or @code = "1595-8" or @code = "1596-6" or @code = "1597-4" or @code = "1598-2" or @code = "1599-0" or @code = "1600-6" or @code = "1602-2" or @code = "1603-0" or @code = "1604-8" or @code = "1605-5" or @code = "1607-1" or @code = "1609-7" or @code = "1610-5" or @code = "1611-3" or @code = "1612-1" or @code = "1613-9" or @code = "1614-7" or @code = "1615-4" or @code = "1616-2" or @code = "1617-0" or @code = "1618-8" or @code = "1619-6" or @code = "1620-4" or @code = "1621-2" or @code = "1622-0" or @code = "1623-8" or @code = "1624-6" or @code = "1625-3" or @code = "1626-1" or @code = "1627-9" or @code = "1628-7" or @code = "1629-5" or @code = "1630-3" or @code = "1631-1" or @code = "1632-9" or @code = "1633-7" or @code = "1634-5" or @code = "1635-2" or @code = "1636-0" or @code = "1637-8" or @code = "1638-6" or @code = "1639-4" or @code = "1640-2" or @code = "1641-0" or @code = "1643-6" or @code = "1645-1" or @code = "1647-7" or @code = "1649-3" or @code = "1651-9" or @code = "1653-5" or @code = "1654-3" or @code = "1655-0" or @code = "1656-8" or @code = "1657-6" or @code = "1659-2" or @code = "1661-8" or @code = "1663-4" or @code = "1665-9" or @code = "1667-5" or @code = "1668-3" or @code = "1670-9" or @code = "1671-7" or @code = "1672-5" or @code = "1673-3" or @code = "1675-8" or @code = "1677-4" or @code = "1679-0" or @code = "1680-8" or @code = "1681-6" or @code = "1683-2" or @code = "1685-7" or @code = "1687-3" or @code = "1688-1" or @code = "1689-9" or @code = "1690-7" or @code = "1692-3" or @code = "1694-9" or @code = "1696-4" or @code = "1697-2" or @code = "1698-0" or @code = "1700-4" or @code = "1702-0" or @code = "1704-6" or @code = "1705-3" or @code = "1707-9" or @code = "1709-5" or @code = "1711-1" or @code = "1712-9" or @code = "1713-7" or @code = "1715-2" or @code = "1717-8" or @code = "1718-6" or @code = "1719-4" or @code = "1720-2" or @code = "1722-8" or @code = "1724-4" or @code = "1725-1" or @code = "1726-9" or @code = "1727-7" or @code = "1728-5" or @code = "1729-3" or @code = "1730-1" or @code = "1731-9" or @code = "1732-7" or @code = "1733-5" or @code = "1735-0" or @code = "1737-6" or @code = "1739-2" or @code = "1740-0" or @code = "1741-8" or @code = "1742-6" or @code = "1743-4" or @code = "1744-2" or @code = "1745-9" or @code = "1746-7" or @code = "1747-5" or @code = "1748-3" or @code = "1749-1" or @code = "1750-9" or @code = "1751-7" or @code = "1752-5" or @code = "1753-3" or @code = "1754-1" or @code = "1755-8" or @code = "1756-6" or @code = "1757-4" or @code = "1758-2" or @code = "1759-0" or @code = "1760-8" or @code = "1761-6" or @code = "1762-4" or @code = "1763-2" or @code = "1764-0" or @code = "1765-7" or @code = "1766-5" or @code = "1767-3" or @code = "1768-1" or @code = "1769-9" or @code = "1770-7" or @code = "1771-5" or @code = "1772-3" or @code = "1773-1" or @code = "1774-9" or @code = "1775-6" or @code = "1776-4" or @code = "1777-2" or @code = "1778-0" or @code = "1779-8" or @code = "1780-6" or @code = "1781-4" or @code = "1782-2" or @code = "1783-0" or @code = "1784-8" or @code = "1785-5" or @code = "1786-3" or @code = "1787-1" or @code = "1788-9" or @code = "1789-7" or @code = "1790-5" or @code = "1791-3" or @code = "1792-1" or @code = "1793-9" or @code = "1794-7" or @code = "1795-4" or @code = "1796-2" or @code = "1797-0" or @code = "1798-8" or @code = "1799-6" or @code = "1800-2" or @code = "1801-0" or @code = "1802-8" or @code = "1803-6" or @code = "1804-4" or @code = "1805-1" or @code = "1806-9" or @code = "1807-7" or @code = "1808-5" or @code = "1809-3" or @code = "1811-9" or @code = "1813-5" or @code = "1814-3" or @code = "1815-0" or @code = "1816-8" or @code = "1817-6" or @code = "1818-4" or @code = "1819-2" or @code = "1820-0" or @code = "1821-8" or @code = "1822-6" or @code = "1823-4" or @code = "1824-2" or @code = "1825-9" or @code = "1826-7" or @code = "1827-5" or @code = "1828-3" or @code = "1829-1" or @code = "1830-9" or @code = "1831-7" or @code = "1832-5" or @code = "1833-3" or @code = "1834-1" or @code = "1835-8" or @code = "1837-4" or @code = "1838-2" or @code = "1840-8" or @code = "1842-4" or @code = "1844-0" or @code = "1845-7" or @code = "1846-5" or @code = "1847-3" or @code = "1848-1" or @code = "1849-9" or @code = "1850-7" or @code = "1851-5" or @code = "1852-3" or @code = "1853-1" or @code = "1854-9" or @code = "1855-6" or @code = "1856-4" or @code = "1857-2" or @code = "1858-0" or @code = "1859-8" or @code = "1860-6" or @code = "1861-4" or @code = "1862-2" or @code = "1863-0" or @code = "1864-8" or @code = "1865-5" or @code = "1866-3" or @code = "1867-1" or @code = "1868-9" or @code = "1869-7" or @code = "1870-5" or @code = "1871-3" or @code = "1872-1" or @code = "1873-9" or @code = "1874-7" or @code = "1875-4" or @code = "1876-2" or @code = "1877-0" or @code = "1878-8" or @code = "1879-6" or @code = "1880-4" or @code = "1881-2" or @code = "1882-0" or @code = "1883-8" or @code = "1884-6" or @code = "1885-3" or @code = "1886-1" or @code = "1887-9" or @code = "1888-7" or @code = "1889-5" or @code = "1891-1" or @code = "1892-9" or @code = "1893-7" or @code = "1894-5" or @code = "1896-0" or @code = "1897-8" or @code = "1898-6" or @code = "1899-4" or @code = "1900-0" or @code = "1901-8" or @code = "1902-6" or @code = "1903-4" or @code = "1904-2" or @code = "1905-9" or @code = "1906-7" or @code = "1907-5" or @code = "1908-3" or @code = "1909-1" or @code = "1910-9" or @code = "1911-7" or @code = "1912-5" or @code = "1913-3" or @code = "1914-1" or @code = "1915-8" or @code = "1916-6" or @code = "1917-4" or @code = "1918-2" or @code = "1919-0" or @code = "1920-8" or @code = "1921-6" or @code = "1922-4" or @code = "1923-2" or @code = "1924-0" or @code = "1925-7" or @code = "1926-5" or @code = "1927-3" or @code = "1928-1" or @code = "1929-9" or @code = "1930-7" or @code = "1931-5" or @code = "1932-3" or @code = "1933-1" or @code = "1934-9" or @code = "1935-6" or @code = "1936-4" or @code = "1937-2" or @code = "1938-0" or @code = "1939-8" or @code = "1940-6" or @code = "1941-4" or @code = "1942-2" or @code = "1943-0" or @code = "1944-8" or @code = "1945-5" or @code = "1946-3" or @code = "1947-1" or @code = "1948-9" or @code = "1949-7" or @code = "1950-5" or @code = "1951-3" or @code = "1952-1" or @code = "1953-9" or @code = "1954-7" or @code = "1955-4" or @code = "1956-2" or @code = "1957-0" or @code = "1958-8" or @code = "1959-6" or @code = "1960-4" or @code = "1961-2" or @code = "1962-0" or @code = "1963-8" or @code = "1964-6" or @code = "1966-1" or @code = "1968-7" or @code = "1969-5" or @code = "1970-3" or @code = "1972-9" or @code = "1973-7" or @code = "1974-5" or @code = "1975-2" or @code = "1976-0" or @code = "1977-8" or @code = "1978-6" or @code = "1979-4" or @code = "1980-2" or @code = "1981-0" or @code = "1982-8" or @code = "1984-4" or @code = "1985-1" or @code = "1986-9" or @code = "1987-7" or @code = "1988-5" or @code = "1990-1" or @code = "1992-7" or @code = "1993-5" or @code = "1994-3" or @code = "1995-0" or @code = "1996-8" or @code = "1997-6" or @code = "1998-4" or @code = "1999-2" or @code = "2000-8" or @code = "2002-4" or @code = "2004-0" or @code = "2006-5" or @code = "2007-3" or @code = "2008-1" or @code = "2009-9" or @code = "2010-7" or @code = "2011-5" or @code = "2012-3" or @code = "2013-1" or @code = "2014-9" or @code = "2015-6" or @code = "2016-4" or @code = "2017-2" or @code = "2018-0" or @code = "2019-8" or @code = "2020-6" or @code = "2021-4" or @code = "2022-2" or @code = "2023-0" or @code = "2024-8" or @code = "2025-5" or @code = "2026-3" or @code = "2028-9" or @code = "2029-7" or @code = "2030-5" or @code = "2031-3" or @code = "2032-1" or @code = "2033-9" or @code = "2034-7" or @code = "2035-4" or @code = "2036-2" or @code = "2037-0" or @code = "2038-8" or @code = "2039-6" or @code = "2040-4" or @code = "2041-2" or @code = "2042-0" or @code = "2043-8" or @code = "2044-6" or @code = "2045-3" or @code = "2046-1" or @code = "2047-9" or @code = "2048-7" or @code = "2049-5" or @code = "2050-3" or @code = "2051-1" or @code = "2052-9" or @code = "2054-5" or @code = "2056-0" or @code = "2058-6" or @code = "2060-2" or @code = "2061-0" or @code = "2062-8" or @code = "2063-6" or @code = "2064-4" or @code = "2065-1" or @code = "2066-9" or @code = "2067-7" or @code = "2068-5" or @code = "2069-3" or @code = "2070-1" or @code = "2071-9" or @code = "2072-7" or @code = "2073-5" or @code = "2074-3" or @code = "2075-0" or @code = "2076-8" or @code = "2078-4" or @code = "2079-2" or @code = "2080-0" or @code = "2081-8" or @code = "2082-6" or @code = "2083-4" or @code = "2085-9" or @code = "2086-7" or @code = "2087-5" or @code = "2088-3" or @code = "2089-1" or @code = "2090-9" or @code = "2091-7" or @code = "2092-5" or @code = "2093-3" or @code = "2094-1" or @code = "2095-8" or @code = "2096-6" or @code = "2097-4" or @code = "2098-2" or @code = "2100-6" or @code = "2101-4" or @code = "2102-2" or @code = "2103-0" or @code = "2104-8" or @code = "2106-3" or @code = "2108-9" or @code = "2109-7" or @code = "2110-5" or @code = "2111-3" or @code = "2112-1" or @code = "2113-9" or @code = "2114-7" or @code = "2115-4" or @code = "2116-2" or @code = "2118-8" or @code = "2119-6" or @code = "2120-4" or @code = "2121-2" or @code = "2122-0" or @code = "2123-8" or @code = "2124-6" or @code = "2125-3" or @code = "2126-1" or @code = "2127-9" or @code = "2129-5" or @code = "2131-1" or @code = "2500-7"])'>
     127     Error: CONF-QRDA1-28 The patient's race 'code' attribute value SHALL be valid according to Appendix_O-Race in the posted Downloadable Resource table.
     128     </assert>
     129     <!-- Combining the previous three asserts and using language from the specs document.  If the 88 page document is normative, I think we should use this instead of the three above
     130   
     131    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:raceCode[@codeSystem = "2.16.840.1.113883.5.104" and @code = "1002-5" or @code = "1004-1" or @code = "1006-6" or @code = "1008-2" or @code = "1010-8" or @code = "1011-6" or @code = "1012-4" or @code = "1013-2" or @code = "1014-0" or @code = "1015-7" or @code = "1016-5" or @code = "1017-3" or @code = "1018-1" or @code = "1019-9" or @code = "1021-5" or @code = "1022-3" or @code = "1023-1" or @code = "1024-9" or @code = "1026-4" or @code = "1028-0" or @code = "1030-6" or @code = "1031-4" or @code = "1033-0" or @code = "1035-5" or @code = "1037-1" or @code = "1039-7" or @code = "1041-3" or @code = "1042-1" or @code = "1044-7" or @code = "1045-4" or @code = "1046-2" or @code = "1047-0" or @code = "1048-8" or @code = "1049-6" or @code = "1050-4" or @code = "1051-2" or @code = "1053-8" or @code = "1054-6" or @code = "1055-3" or @code = "1056-1" or @code = "1057-9" or @code = "1058-7" or @code = "1059-5" or @code = "1060-3" or @code = "1061-1" or @code = "1062-9" or @code = "1063-7" or @code = "1064-5" or @code = "1065-2" or @code = "1066-0" or @code = "1068-6" or @code = "1069-4" or @code = "1070-2" or @code = "1071-0" or @code = "1072-8" or @code = "1073-6" or @code = "1074-4" or @code = "1076-9" or @code = "1078-5" or @code = "1080-1" or @code = "1082-7" or @code = "1083-5" or @code = "1084-3" or @code = "1086-8" or @code = "1088-4" or @code = "1089-2" or @code = "1090-0" or @code = "1091-8" or @code = "1092-6" or @code = "1093-4" or @code = "1094-2" or @code = "1095-9" or @code = "1096-7" or @code = "1097-5" or @code = "1098-3" or @code = "1100-7" or @code = "1102-3" or @code = "1103-1" or @code = "1104-9" or @code = "1106-4" or @code = "1108-0" or @code = "1109-8" or @code = "1110-6" or @code = "1112-2" or @code = "1114-8" or @code = "1115-5" or @code = "1116-3" or @code = "1117-1" or @code = "1118-9" or @code = "1119-7" or @code = "1120-5" or @code = "1121-3" or @code = "1123-9" or @code = "1124-7" or @code = "1125-4" or @code = "1126-2" or @code = "1127-0" or @code = "1128-8" or @code = "1129-6" or @code = "1130-4" or @code = "1131-2" or @code = "1132-0" or @code = "1133-8" or @code = "1134-6" or @code = "1135-3" or @code = "1136-1" or @code = "1137-9" or @code = "1138-7" or @code = "1139-5" or @code = "1140-3" or @code = "1141-1" or @code = "1142-9" or @code = "1143-7" or @code = "1144-5" or @code = "1145-2" or @code = "1146-0" or @code = "1147-8" or @code = "1148-6" or @code = "1150-2" or @code = "1151-0" or @code = "1153-6" or @code = "1155-1" or @code = "1156-9" or @code = "1157-7" or @code = "1158-5" or @code = "1159-3" or @code = "1160-1" or @code = "1162-7" or @code = "1163-5" or @code = "1165-0" or @code = "1167-6" or @code = "1169-2" or @code = "1171-8" or @code = "1173-4" or @code = "1175-9" or @code = "1176-7" or @code = "1178-3" or @code = "1180-9" or @code = "1182-5" or @code = "1184-1" or @code = "1186-6" or @code = "1187-4" or @code = "1189-0" or @code = "1191-6" or @code = "1193-2" or @code = "1194-0" or @code = "1195-7" or @code = "1196-5" or @code = "1197-3" or @code = "1198-1" or @code = "1199-9" or @code = "1200-5" or @code = "1201-3" or @code = "1202-1" or @code = "1203-9" or @code = "1204-7" or @code = "1205-4" or @code = "1207-0" or @code = "1209-6" or @code = "1211-2" or @code = "1212-0" or @code = "1214-6" or @code = "1215-3" or @code = "1216-1" or @code = "1217-9" or @code = "1218-7" or @code = "1219-5" or @code = "1220-3" or @code = "1222-9" or @code = "1223-7" or @code = "1224-5" or @code = "1225-2" or @code = "1226-0" or @code = "1227-8" or @code = "1228-6" or @code = "1229-4" or @code = "1230-2" or @code = "1231-0" or @code = "1233-6" or @code = "1234-4" or @code = "1235-1" or @code = "1236-9" or @code = "1237-7" or @code = "1238-5" or @code = "1239-3" or @code = "1240-1" or @code = "1241-9" or @code = "1242-7" or @code = "1243-5" or @code = "1244-3" or @code = "1245-0" or @code = "1246-8" or @code = "1247-6" or @code = "1248-4" or @code = "1250-0" or @code = "1252-6" or @code = "1254-2" or @code = "1256-7" or @code = "1258-3" or @code = "1260-9" or @code = "1262-5" or @code = "1264-1" or @code = "1265-8" or @code = "1267-4" or @code = "1269-0" or @code = "1271-6" or @code = "1272-4" or @code = "1273-2" or @code = "1275-7" or @code = "1277-3" or @code = "1279-9" or @code = "1281-5" or @code = "1282-3" or @code = "1283-1" or @code = "1285-6" or @code = "1286-4" or @code = "1287-2" or @code = "1288-0" or @code = "1289-8" or @code = "1290-6" or @code = "1291-4" or @code = "1292-2" or @code = "1293-0" or @code = "1294-8" or @code = "1295-5" or @code = "1297-1" or @code = "1299-7" or @code = "1301-1" or @code = "1303-7" or @code = "1305-2" or @code = "1306-0" or @code = "1307-8" or @code = "1309-4" or @code = "1310-2" or @code = "1312-8" or @code = "1313-6" or @code = "1314-4" or @code = "1315-1" or @code = "1317-7" or @code = "1319-3" or @code = "1321-9" or @code = "1323-5" or @code = "1325-0" or @code = "1326-8" or @code = "1327-6" or @code = "1328-4" or @code = "1329-2" or @code = "1331-8" or @code = "1332-6" or @code = "1333-4" or @code = "1334-2" or @code = "1335-9" or @code = "1336-7" or @code = "1337-5" or @code = "1338-3" or @code = "1340-9" or @code = "1342-5" or @code = "1344-1" or @code = "1345-8" or @code = "1346-6" or @code = "1348-2" or @code = "1350-8" or @code = "1352-4" or @code = "1354-0" or @code = "1356-5" or @code = "1358-1" or @code = "1359-9" or @code = "1360-7" or @code = "1361-5" or @code = "1363-1" or @code = "1365-6" or @code = "1366-4" or @code = "1368-0" or @code = "1370-6" or @code = "1372-2" or @code = "1374-8" or @code = "1376-3" or @code = "1378-9" or @code = "1380-5" or @code = "1382-1" or @code = "1383-9" or @code = "1384-7" or @code = "1385-4" or @code = "1387-0" or @code = "1389-6" or @code = "1391-2" or @code = "1392-0" or @code = "1393-8" or @code = "1394-6" or @code = "1395-3" or @code = "1396-1" or @code = "1397-9" or @code = "1398-7" or @code = "1399-5" or @code = "1400-1" or @code = "1401-9" or @code = "1403-5" or @code = "1405-0" or @code = "1407-6" or @code = "1409-2" or @code = "1411-8" or @code = "1412-6" or @code = "1413-4" or @code = "1414-2" or @code = "1416-7" or @code = "1417-5" or @code = "1418-3" or @code = "1419-1" or @code = "1420-9" or @code = "1421-7" or @code = "1422-5" or @code = "1423-3" or @code = "1424-1" or @code = "1425-8" or @code = "1426-6" or @code = "1427-4" or @code = "1428-2" or @code = "1429-0" or @code = "1430-8" or @code = "1431-6" or @code = "1432-4" or @code = "1433-2" or @code = "1434-0" or @code = "1435-7" or @code = "1436-5" or @code = "1437-3" or @code = "1439-9" or @code = "1441-5" or @code = "1442-3" or @code = "1443-1" or @code = "1445-6" or @code = "1446-4" or @code = "1448-0" or @code = "1450-6" or @code = "1451-4" or @code = "1453-0" or @code = "1454-8" or @code = "1456-3" or @code = "1457-1" or @code = "1458-9" or @code = "1460-5" or @code = "1462-1" or @code = "1464-7" or @code = "1465-4" or @code = "1466-2" or @code = "1467-0" or @code = "1468-8" or @code = "1469-6" or @code = "1470-4" or @code = "1471-2" or @code = "1472-0" or @code = "1474-6" or @code = "1475-3" or @code = "1476-1" or @code = "1478-7" or @code = "1479-5" or @code = "1480-3" or @code = "1481-1" or @code = "1482-9" or @code = "1483-7" or @code = "1484-5" or @code = "1485-2" or @code = "1487-8" or @code = "1489-4" or @code = "1490-2" or @code = "1491-0" or @code = "1492-8" or @code = "1493-6" or @code = "1494-4" or @code = "1495-1" or @code = "1496-9" or @code = "1497-7" or @code = "1498-5" or @code = "1499-3" or @code = "1500-8" or @code = "1501-6" or @code = "1502-4" or @code = "1503-2" or @code = "1504-0" or @code = "1505-7" or @code = "1506-5" or @code = "1507-3" or @code = "1508-1" or @code = "1509-9" or @code = "1510-7" or @code = "1511-5" or @code = "1512-3" or @code = "1513-1" or @code = "1514-9" or @code = "1515-6" or @code = "1516-4" or @code = "1518-0" or @code = "1519-8" or @code = "1520-6" or @code = "1521-4" or @code = "1522-2" or @code = "1523-0" or @code = "1524-8" or @code = "1525-5" or @code = "1526-3" or @code = "1527-1" or @code = "1528-9" or @code = "1529-7" or @code = "1530-5" or @code = "1531-3" or @code = "1532-1" or @code = "1533-9" or @code = "1534-7" or @code = "1535-4" or @code = "1536-2" or @code = "1537-0" or @code = "1538-8" or @code = "1539-6" or @code = "1541-2" or @code = "1543-8" or @code = "1545-3" or @code = "1547-9" or @code = "1549-5" or @code = "1551-1" or @code = "1552-9" or @code = "1553-7" or @code = "1554-5" or @code = "1556-0" or @code = "1558-6" or @code = "1560-2" or @code = "1562-8" or @code = "1564-4" or @code = "1566-9" or @code = "1567-7" or @code = "1568-5" or @code = "1569-3" or @code = "1570-1" or @code = "1571-9" or @code = "1573-5" or @code = "1574-3" or @code = "1576-8" or @code = "1578-4" or @code = "1579-2" or @code = "1580-0" or @code = "1582-6" or @code = "1584-2" or @code = "1586-7" or @code = "1587-5" or @code = "1588-3" or @code = "1589-1" or @code = "1590-9" or @code = "1591-7" or @code = "1592-5" or @code = "1593-3" or @code = "1594-1" or @code = "1595-8" or @code = "1596-6" or @code = "1597-4" or @code = "1598-2" or @code = "1599-0" or @code = "1600-6" or @code = "1602-2" or @code = "1603-0" or @code = "1604-8" or @code = "1605-5" or @code = "1607-1" or @code = "1609-7" or @code = "1610-5" or @code = "1611-3" or @code = "1612-1" or @code = "1613-9" or @code = "1614-7" or @code = "1615-4" or @code = "1616-2" or @code = "1617-0" or @code = "1618-8" or @code = "1619-6" or @code = "1620-4" or @code = "1621-2" or @code = "1622-0" or @code = "1623-8" or @code = "1624-6" or @code = "1625-3" or @code = "1626-1" or @code = "1627-9" or @code = "1628-7" or @code = "1629-5" or @code = "1630-3" or @code = "1631-1" or @code = "1632-9" or @code = "1633-7" or @code = "1634-5" or @code = "1635-2" or @code = "1636-0" or @code = "1637-8" or @code = "1638-6" or @code = "1639-4" or @code = "1640-2" or @code = "1641-0" or @code = "1643-6" or @code = "1645-1" or @code = "1647-7" or @code = "1649-3" or @code = "1651-9" or @code = "1653-5" or @code = "1654-3" or @code = "1655-0" or @code = "1656-8" or @code = "1657-6" or @code = "1659-2" or @code = "1661-8" or @code = "1663-4" or @code = "1665-9" or @code = "1667-5" or @code = "1668-3" or @code = "1670-9" or @code = "1671-7" or @code = "1672-5" or @code = "1673-3" or @code = "1675-8" or @code = "1677-4" or @code = "1679-0" or @code = "1680-8" or @code = "1681-6" or @code = "1683-2" or @code = "1685-7" or @code = "1687-3" or @code = "1688-1" or @code = "1689-9" or @code = "1690-7" or @code = "1692-3" or @code = "1694-9" or @code = "1696-4" or @code = "1697-2" or @code = "1698-0" or @code = "1700-4" or @code = "1702-0" or @code = "1704-6" or @code = "1705-3" or @code = "1707-9" or @code = "1709-5" or @code = "1711-1" or @code = "1712-9" or @code = "1713-7" or @code = "1715-2" or @code = "1717-8" or @code = "1718-6" or @code = "1719-4" or @code = "1720-2" or @code = "1722-8" or @code = "1724-4" or @code = "1725-1" or @code = "1726-9" or @code = "1727-7" or @code = "1728-5" or @code = "1729-3" or @code = "1730-1" or @code = "1731-9" or @code = "1732-7" or @code = "1733-5" or @code = "1735-0" or @code = "1737-6" or @code = "1739-2" or @code = "1740-0" or @code = "1741-8" or @code = "1742-6" or @code = "1743-4" or @code = "1744-2" or @code = "1745-9" or @code = "1746-7" or @code = "1747-5" or @code = "1748-3" or @code = "1749-1" or @code = "1750-9" or @code = "1751-7" or @code = "1752-5" or @code = "1753-3" or @code = "1754-1" or @code = "1755-8" or @code = "1756-6" or @code = "1757-4" or @code = "1758-2" or @code = "1759-0" or @code = "1760-8" or @code = "1761-6" or @code = "1762-4" or @code = "1763-2" or @code = "1764-0" or @code = "1765-7" or @code = "1766-5" or @code = "1767-3" or @code = "1768-1" or @code = "1769-9" or @code = "1770-7" or @code = "1771-5" or @code = "1772-3" or @code = "1773-1" or @code = "1774-9" or @code = "1775-6" or @code = "1776-4" or @code = "1777-2" or @code = "1778-0" or @code = "1779-8" or @code = "1780-6" or @code = "1781-4" or @code = "1782-2" or @code = "1783-0" or @code = "1784-8" or @code = "1785-5" or @code = "1786-3" or @code = "1787-1" or @code = "1788-9" or @code = "1789-7" or @code = "1790-5" or @code = "1791-3" or @code = "1792-1" or @code = "1793-9" or @code = "1794-7" or @code = "1795-4" or @code = "1796-2" or @code = "1797-0" or @code = "1798-8" or @code = "1799-6" or @code = "1800-2" or @code = "1801-0" or @code = "1802-8" or @code = "1803-6" or @code = "1804-4" or @code = "1805-1" or @code = "1806-9" or @code = "1807-7" or @code = "1808-5" or @code = "1809-3" or @code = "1811-9" or @code = "1813-5" or @code = "1814-3" or @code = "1815-0" or @code = "1816-8" or @code = "1817-6" or @code = "1818-4" or @code = "1819-2" or @code = "1820-0" or @code = "1821-8" or @code = "1822-6" or @code = "1823-4" or @code = "1824-2" or @code = "1825-9" or @code = "1826-7" or @code = "1827-5" or @code = "1828-3" or @code = "1829-1" or @code = "1830-9" or @code = "1831-7" or @code = "1832-5" or @code = "1833-3" or @code = "1834-1" or @code = "1835-8" or @code = "1837-4" or @code = "1838-2" or @code = "1840-8" or @code = "1842-4" or @code = "1844-0" or @code = "1845-7" or @code = "1846-5" or @code = "1847-3" or @code = "1848-1" or @code = "1849-9" or @code = "1850-7" or @code = "1851-5" or @code = "1852-3" or @code = "1853-1" or @code = "1854-9" or @code = "1855-6" or @code = "1856-4" or @code = "1857-2" or @code = "1858-0" or @code = "1859-8" or @code = "1860-6" or @code = "1861-4" or @code = "1862-2" or @code = "1863-0" or @code = "1864-8" or @code = "1865-5" or @code = "1866-3" or @code = "1867-1" or @code = "1868-9" or @code = "1869-7" or @code = "1870-5" or @code = "1871-3" or @code = "1872-1" or @code = "1873-9" or @code = "1874-7" or @code = "1875-4" or @code = "1876-2" or @code = "1877-0" or @code = "1878-8" or @code = "1879-6" or @code = "1880-4" or @code = "1881-2" or @code = "1882-0" or @code = "1883-8" or @code = "1884-6" or @code = "1885-3" or @code = "1886-1" or @code = "1887-9" or @code = "1888-7" or @code = "1889-5" or @code = "1891-1" or @code = "1892-9" or @code = "1893-7" or @code = "1894-5" or @code = "1896-0" or @code = "1897-8" or @code = "1898-6" or @code = "1899-4" or @code = "1900-0" or @code = "1901-8" or @code = "1902-6" or @code = "1903-4" or @code = "1904-2" or @code = "1905-9" or @code = "1906-7" or @code = "1907-5" or @code = "1908-3" or @code = "1909-1" or @code = "1910-9" or @code = "1911-7" or @code = "1912-5" or @code = "1913-3" or @code = "1914-1" or @code = "1915-8" or @code = "1916-6" or @code = "1917-4" or @code = "1918-2" or @code = "1919-0" or @code = "1920-8" or @code = "1921-6" or @code = "1922-4" or @code = "1923-2" or @code = "1924-0" or @code = "1925-7" or @code = "1926-5" or @code = "1927-3" or @code = "1928-1" or @code = "1929-9" or @code = "1930-7" or @code = "1931-5" or @code = "1932-3" or @code = "1933-1" or @code = "1934-9" or @code = "1935-6" or @code = "1936-4" or @code = "1937-2" or @code = "1938-0" or @code = "1939-8" or @code = "1940-6" or @code = "1941-4" or @code = "1942-2" or @code = "1943-0" or @code = "1944-8" or @code = "1945-5" or @code = "1946-3" or @code = "1947-1" or @code = "1948-9" or @code = "1949-7" or @code = "1950-5" or @code = "1951-3" or @code = "1952-1" or @code = "1953-9" or @code = "1954-7" or @code = "1955-4" or @code = "1956-2" or @code = "1957-0" or @code = "1958-8" or @code = "1959-6" or @code = "1960-4" or @code = "1961-2" or @code = "1962-0" or @code = "1963-8" or @code = "1964-6" or @code = "1966-1" or @code = "1968-7" or @code = "1969-5" or @code = "1970-3" or @code = "1972-9" or @code = "1973-7" or @code = "1974-5" or @code = "1975-2" or @code = "1976-0" or @code = "1977-8" or @code = "1978-6" or @code = "1979-4" or @code = "1980-2" or @code = "1981-0" or @code = "1982-8" or @code = "1984-4" or @code = "1985-1" or @code = "1986-9" or @code = "1987-7" or @code = "1988-5" or @code = "1990-1" or @code = "1992-7" or @code = "1993-5" or @code = "1994-3" or @code = "1995-0" or @code = "1996-8" or @code = "1997-6" or @code = "1998-4" or @code = "1999-2" or @code = "2000-8" or @code = "2002-4" or @code = "2004-0" or @code = "2006-5" or @code = "2007-3" or @code = "2008-1" or @code = "2009-9" or @code = "2010-7" or @code = "2011-5" or @code = "2012-3" or @code = "2013-1" or @code = "2014-9" or @code = "2015-6" or @code = "2016-4" or @code = "2017-2" or @code = "2018-0" or @code = "2019-8" or @code = "2020-6" or @code = "2021-4" or @code = "2022-2" or @code = "2023-0" or @code = "2024-8" or @code = "2025-5" or @code = "2026-3" or @code = "2028-9" or @code = "2029-7" or @code = "2030-5" or @code = "2031-3" or @code = "2032-1" or @code = "2033-9" or @code = "2034-7" or @code = "2035-4" or @code = "2036-2" or @code = "2037-0" or @code = "2038-8" or @code = "2039-6" or @code = "2040-4" or @code = "2041-2" or @code = "2042-0" or @code = "2043-8" or @code = "2044-6" or @code = "2045-3" or @code = "2046-1" or @code = "2047-9" or @code = "2048-7" or @code = "2049-5" or @code = "2050-3" or @code = "2051-1" or @code = "2052-9" or @code = "2054-5" or @code = "2056-0" or @code = "2058-6" or @code = "2060-2" or @code = "2061-0" or @code = "2062-8" or @code = "2063-6" or @code = "2064-4" or @code = "2065-1" or @code = "2066-9" or @code = "2067-7" or @code = "2068-5" or @code = "2069-3" or @code = "2070-1" or @code = "2071-9" or @code = "2072-7" or @code = "2073-5" or @code = "2074-3" or @code = "2075-0" or @code = "2076-8" or @code = "2078-4" or @code = "2079-2" or @code = "2080-0" or @code = "2081-8" or @code = "2082-6" or @code = "2083-4" or @code = "2085-9" or @code = "2086-7" or @code = "2087-5" or @code = "2088-3" or @code = "2089-1" or @code = "2090-9" or @code = "2091-7" or @code = "2092-5" or @code = "2093-3" or @code = "2094-1" or @code = "2095-8" or @code = "2096-6" or @code = "2097-4" or @code = "2098-2" or @code = "2100-6" or @code = "2101-4" or @code = "2102-2" or @code = "2103-0" or @code = "2104-8" or @code = "2106-3" or @code = "2108-9" or @code = "2109-7" or @code = "2110-5" or @code = "2111-3" or @code = "2112-1" or @code = "2113-9" or @code = "2114-7" or @code = "2115-4" or @code = "2116-2" or @code = "2118-8" or @code = "2119-6" or @code = "2120-4" or @code = "2121-2" or @code = "2122-0" or @code = "2123-8" or @code = "2124-6" or @code = "2125-3" or @code = "2126-1" or @code = "2127-9" or @code = "2129-5" or @code = "2131-1" or @code = "2500-7"])'>
     132    Error:  CONF-QRDA1-28 The raceCode element SHALL be 2.16.840.1.113883.5.104 and the value of the @code SHALL be from Appendix_O-Race tab of the Downloadabel Resources table.
     133    </assert> -->
     134   <!-- <include href="templates/2.16.840.113883.5.104.ent" /> -->
     135    <assert test='(cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime)'>
     136    Error:  CONF-QRDA1-29 The 'birthTime' element SHALL be present.
     137    </assert>
     138    <assert test='string-length(cda:recordTarget/cda:patientRole/cda:patient/cda:birthTime/@value) &gt;= 8'>
     139       Error: CONF-QRDA1-30 The birthTime value attribute value SHALL be at least precise to the day (YYYYMMDD).
     140    </assert>
     141    <assert test='count(cda:recordTarget/cda:patientRole/cda:providerOrganization) = 1'>
     142     Error: CONF-QRDA1-31  The report SHALL contain exactly one /recordTarget/patientRole/providerOrganization.
     143     </assert>
     144     <assert test='(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id[@root="2.16.840.1.113883.4.6"])'>
     145     Error: CONF-QRDA1-32 The id 'root' attribute value SHALL be '2.16.840.1.113883.4.6'.
     146     </assert>
     147    <!-- NPI validation -->
     148  <let name="npi" value="cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id/@extension" />
     149  <assert test="((sum(for $j in (for $i in
     150reverse(string-to-codepoints($npi))[position() mod 2 = 0] return ($i - 48) *
     1512, for $i in reverse(string-to-codepoints($npi))[position() mod 2 = 1]
     152return ($i - 48)) return ($j mod 10, $j idiv 10)) + 24) mod 10) = 0">
     153  Error: CONF-QRDA1-32 cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:id[@extension that containst the NPI Failed the NPI validation test!!
     154  </assert>
     155  <assert test='(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:name)'>
     156  Warning: CONF-QRDA1-33 recordTarget/patientRole/providerOrganization/name element SHOULD be present
     157  </assert>
     158  <assert test='count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr) &gt;= 1'>
     159  Error: CONF-QRDA1-34 At least one recordTarget/patientRole/providerOrganization/name element SHALL be present
     160  </assert>
     161  <assert test='(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:streetAddressLine)'>
     162  Warning: CONF-QRDA1-35 recordTarget/patientRole/providerOrganization/addr/streetAddressLine) element MAY be present
     163  </assert>
     164  <assert test='(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:city)'>
     165  Warning: CONF-QRDA1-36 recordTarget/patientRole/providerOrganization/addr/city) element MAY be present
     166  </assert>
     167  <assert test='contains("AL AK AZ AR AS CA CO CT DE DC FL GA GU HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC MP ND OH OK OR PA PR RI SC SD TN TX UT VT VI VA WA WV WI WY",cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:state)'>
     168  Error: CONF-QRDA1-37 recordTarget/patientRole/providerOrganization/addr/state) element SHALL be present and shall be one of the states in the Appendix_V-States Downloadable Resource
     169  </assert>
     170  <assert test='(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:addr/cda:postalCode)'>
     171  Warning: CONF-QRDA1-38 recordTarget/patientRole/providerOrganization/addr/postalCode) element MAY be present
     172  </assert>
     173  <assert test='count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf) = 1'>
     174  Error: CONF-QRDA1-39 Report SHALL contain exactly one recordTarget/patientRole/providerOrganization/asOrganizationPartOf element.
     175  </assert>
     176  <assert test='count(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization) = 1'>
     177  Error: CONF-QRDA1-40 Report SHALL contain exactly one recordTarget/patientRole/providerOrganization/asOrganizationPartOf/wholeOrganization element.
     178  </assert> 
     179  <assert test='cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id[@root = "2.16.840.1.113883.4.2"]'>
     180    Error:  CONF-QRDA1-41 The id 'root' attribute value SHALL be '2.16.840.1.113883.4.2'.
     181  </assert>
     182  <!--<let name="tin" value="cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/@extension"/>-->
     183  <assert test='string-length(cda:recordTarget/cda:patientRole/cda:providerOrganization/cda:asOrganizationPartOf/cda:wholeOrganization/cda:id/@extension) = "9"'>
     184  Error: CONF-QRDA1-41 The patient's provider's organization's id 'extension' attribute value SHALL be present as the provider's TIN (nine-digit value in XXXXXXXXX format).
     185  </assert>
     186  <assert test='count(cda:author)= 1'>
     187  CONF-QRDA1-42 Report SHALL contain exactly one /clinicalDocument/author.
     188  </assert>
     189  <assert test='cda:author/cda:time'>
     190       Error: CONF-QRDA1-43 The /clinicalDocument/author/time element shall be present.
     191  </assert>
     192  <assert test='string-length(cda:author/cda:time/@value) &gt;= 8'>
     193       Error: CONF-QRDA1-44 The effectiveTime value attribute value SHALL be at least precise to the day YYYYMMDD.
     194  </assert>
     195  <assert test='cda:author/cda:assignedAuthor'>
     196     Error: CONF-QRDA1-45 clinicalDocument/author/assignedAuthor element SHALL be present.
     197  </assert>
     198  <assert test='cda:author/cda:assignedAuthor/cda:id[@root="2.16.840.1.113883.249.6"]'>
     199     Error: CONF-QRDA1-46 clinicalDocument/author/assignedAuthor/id element SHALL be present.  The id @root SHALL be 2.16.840.1.113883.249.6 and the @extension SHALL be the CMS Approved Qualified Software Version.
     200  </assert>
     201  <assert test='count(cda:author/cda:assignedAuthor/cda:assignedPerson) &lt;= 1'>                 
     202     Warning: CONF-QRDA1-47 and 48: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/assignedPerson element and if present may contain exactly one.
     203  </assert>
     204  <assert test='count(cda:author/cda:assignedAuthor/cda:assignedPerson/name) &gt;= 0'>                 
     205       Error: CONF-QRDA1-49: A QRDA Category I report MAY contain at least one legal name ClinicalDocument/author/assignedAuthor/assignedPerson/name.
     206  </assert>
     207  <assert test='count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:given) &gt;= 0'>                 
     208       Error: CONF-QRDA1-50: A QRDA Category I report MAY contain at least one ClinicalDocument/author/assignedAuthor/assignedPerson/name/given.
     209  </assert>
     210  <assert test='count(cda:author/cda:assignedAuthor/cda:assignedPerson/cda:name/cda:family) &gt;= 0'>                 
     211       Error: CONF-QRDA1-51: A QRDA Category I report MAY contain at least one ClinicalDocument/author/assignedAuthor/assignedPerson/name/family.
     212  </assert>
     213  <assert test='count(cda:author/cda:assignedAuthor/cda:representedOrganization) &lt;= 1'>                 
     214       Error: CONF-QRDA1-52: A QRDA Category I report MAY contain one ClinicalDocument/author/assignedAuthor/representedOrganization.
     215  </assert>
     216  <assert test='count(cda:author/cda:assignedAuthor/cda:representeOrganization/cda:id[@root="*"]) &gt;= 0'>                 
     217       Error: CONF-QRDA1-53: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/representedOrganization/id element with @root containing the OID of the authoring organization.
     218  </assert>
     219  <assert test='count(cda:author/cda:assignedAuthor/cda:representeOrganization/name) &gt;= 0'>                 
     220       Error: CONF-QRDA1-54: A QRDA Category I report MAY contain a ClinicalDocument/author/assignedAuthor/representedOrganization/name element.
     221  </assert>
     222  <assert test='count(cda:informant) = 1'>
    46223       Error: CONF-QRDA-I-10: A QRDA Category I report SHALL contain exactly one
    47224       ClinicalDocument/informant, which represents the reporting facility.
     
    87264       ClinicalDocument/component/structuredBody.
    88265    </assert>
     266   
    89267<!--
    90268
Note: See TracChangeset for help on using the changeset viewer.