<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Name: Speciality-Section
Description: 
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000">
   <title>Speciality-Section</title>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]
Item: (SpecialitySection)
-->

   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']"
         id="tmp-r-4d815920-2e35-4821-a82a-62afb057bb0a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="string(@classCode)=('DOCSECT')">(SpecialitySection): Der Wert von @classCode MUSS 'DOCSECT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1'])&gt;=1 ">(SpecialitySection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1'])&lt;=1">(SpecialitySection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(SpecialitySection): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(SpecialitySection): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(SpecialitySection): Element hl7:title ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:title)&lt;=1">(SpecialitySection): Element hl7:title kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(SpecialitySection): Element hl7:text ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:text)&lt;=1">(SpecialitySection): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1'])&gt;=1 ">(SpecialitySection): Element hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1'] ist required [min 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1']
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.2.1']"
         id="tmp-r-6090afe7-a607-47c2-b64d-e355c02643c4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.3.2.1')">(SpecialitySection): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.3.2.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:id
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:id"
         id="tmp-r-8e8e3e92-17a5-4db8-8756-75f072542094">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]"
         id="tmp-r-e0adb7c6-4c93-4305-bf69-7716076cebbb">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(SpecialitySection): Der Elementinhalt MUSS einer von 'ELGA_Laborstruktur (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception[@code = $theNullFlavor][@codeSystem = '2.16.840.1.113883.5.1008'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(SpecialitySection): Der fehlende Wert '<value-of select="@nullFlavor"/>' für @code MUSS gewählt werden aus dem Set gültiger null flavors für dieses Attribut oder denen assoziiert mit Value Set ELGA_Laborstruktur (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:title
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:title"
         id="tmp-r-93c08074-0f52-445f-8282-d115aa986797">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ST' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:ST" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="ST"/>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:text
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:text"
         id="tmp-r-f49134af-1052-4e06-b37a-cee9af2f895a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:ED" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="ED"/>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']"
         id="tmp-r-ffd4ae3d-7298-4bca-9cda-9d1e3a55b265">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="string(@typeCode)=('DRIV') or not(@typeCode)">(SpecialitySection): Der Wert von @typeCode MUSS 'DRIV' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1'])&gt;=1 ">(SpecialitySection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1'])&lt;=1">(SpecialitySection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&gt;=1 and not(hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/@nullFlavor)">(SpecialitySection): Element hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="count(hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&lt;=1">(SpecialitySection): Element hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]] kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.3.6.1.4.1.19376.1.3.3.2.1
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1']
Item: (SpecialitySection)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1']"
         id="tmp-r-5f47017c-ec61-49d5-a90c-a797eacf7a54">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecialitySection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.3.6.1.4.1.19376.1.3.3.2.1-2013-11-07T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1')">(SpecialitySection): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]
Item: (SpezimenActEntryAllgemein)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]"
         id="tmp-r-d1ebcd81-f958-4b73-bc99-9bd6f7f45666">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@classCode)=('ACT')">(SpezimenActEntryAllgemein): Der Wert von @classCode MUSS 'ACT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@moodCode)=('EVN')">(SpezimenActEntryAllgemein): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(SpezimenActEntryAllgemein): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(SpezimenActEntryAllgemein): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="count(hl7:statusCode[@code='completed'])&gt;=1 and not(hl7:statusCode[@code='completed']/@nullFlavor)">(SpezimenActEntryAllgemein): Element hl7:statusCode[@code='completed'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="count(hl7:statusCode[@code='completed'])&lt;=1">(SpezimenActEntryAllgemein): Element hl7:statusCode[@code='completed'] kommt zu häufig vor [max 1x].</assert>
      <let name="elmcount"
           value="count(hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]|hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]|hl7:entryRelationship[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]|hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]|hl7:entryRelationship[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.1']]|hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="$elmcount&gt;=1">(SpezimenActEntryAllgemein): Auswahl (hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']] oder hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']] oder hl7:entryRelationship[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']] oder hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']] oder hl7:entryRelationship[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.1']] oder hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']]) enthält nicht genügend Elemente [min 1x]</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (SpezimenActEntryAllgemein)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]"
         id="tmp-r-77ff0236-59db-4067-9c85-d4f0dae4cf47">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpezimenActEntryAllgemein): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(SpezimenActEntryAllgemein): Der Elementinhalt MUSS einer von 'ELGA_Laborstruktur (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception[@code = $theNullFlavor][@codeSystem = '2.16.840.1.113883.5.1008'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(SpezimenActEntryAllgemein): Der fehlende Wert '<value-of select="@nullFlavor"/>' für @code MUSS gewählt werden aus dem Set gültiger null flavors für dieses Attribut oder denen assoziiert mit Value Set ELGA_Laborstruktur (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:statusCode[@code='completed']
Item: (SpezimenActEntryAllgemein)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:statusCode[@code='completed']"
         id="tmp-r-0da369af-3d22-437f-b9a5-d7d1972db46a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpezimenActEntryAllgemein): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CS"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="@nullFlavor or (@code='completed')">(SpezimenActEntryAllgemein): Der Elementinhalt MUSS einer von 'code 'completed'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]">
      <extends rule="tmp-r-74c28d75-6e93-43d7-8af0-0cd6ee65ee24"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]
Item: (SpecimenCollection)
-->
   <rule id="tmp-r-74c28d75-6e93-43d7-8af0-0cd6ee65ee24" abstract="true">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2'])&gt;=1 and not(hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/@nullFlavor)">(SpecimenCollection): Element hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2'])&lt;=1">(SpecimenCollection): Element hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2'] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@classCode)=('PROC')">(SpecimenCollection): Der Wert von @classCode MUSS 'PROC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@moodCode)=('EVN')">(SpecimenCollection): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2'])&gt;=1 ">(SpecimenCollection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2'])&lt;=1">(SpecimenCollection): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(SpecimenCollection): Element hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(SpecimenCollection): Element hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:effectiveTime)&gt;=1 ">(SpecimenCollection): Element hl7:effectiveTime ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(SpecimenCollection): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:targetSiteCode)&lt;=1">(SpecimenCollection): Element hl7:targetSiteCode kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:performer)&lt;=1">(SpecimenCollection): Element hl7:performer kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:participant)&gt;=1 and not(hl7:participant/@nullFlavor)">(SpecimenCollection): Element hl7:participant ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:participant)&lt;=1">(SpecimenCollection): Element hl7:participant kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2']
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.2']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1.2')">(SpecimenCollection): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1.2' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:code[(@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="@nullFlavor or (@code='33882-2' and @codeSystem='2.16.840.1.113883.6.1')">(SpecimenCollection): Der Elementinhalt MUSS einer von 'code '33882-2' codeSystem '2.16.840.1.113883.6.1'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:effectiveTime
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:effectiveTime">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TS"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:targetSiteCode
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:targetSiteCode">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.52-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(SpecimenCollection): Der Elementinhalt MUSS einer von 'ELGA_HumanActSite (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.52-DYNAMIC.xml')/*/valueSet/conceptList/exception[@code = $theNullFlavor][@codeSystem = '2.16.840.1.113883.5.1008'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(SpecimenCollection): Der fehlende Wert '<value-of select="@nullFlavor"/>' für @code MUSS gewählt werden aus dem Set gültiger null flavors für dieses Attribut oder denen assoziiert mit Value Set ELGA_HumanActSite (DYNAMIC).</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@typeCode)=('PRF')">(SpecimenCollection): Der Wert von @typeCode MUSS 'PRF' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:assignedEntity)&gt;=1 and not(hl7:assignedEntity/@nullFlavor)">(SpecimenCollection): Element hl7:assignedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:assignedEntity)&lt;=1">(SpecimenCollection): Element hl7:assignedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:id)&gt;=1 ">(SpecimenCollection): Element hl7:id ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:addr)&lt;=1">(SpecimenCollection): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(SpecimenCollection): Element hl7:assignedPerson ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(SpecimenCollection): Element hl7:assignedPerson kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(SpecimenCollection): Element hl7:representedOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90003
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:id">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(AssignedEntityElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90003
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:addr">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='AD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(AssignedEntityElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:AD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="AD"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90003
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:telecom">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='TEL' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(AssignedEntityElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TEL" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TEL.AT"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90003
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:assignedPerson">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(AssignedEntityElements): Der Wert von @classCode MUSS 'PSN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(AssignedEntityElements): Der Wert von @determinerCode MUSS 'INSTANCE' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(AssignedEntityElements): Element hl7:name ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="count(hl7:name)&lt;=1">(AssignedEntityElements): Element hl7:name kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90001
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:assignedPerson/hl7:name">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90001-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='PN' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(PersonElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:PN" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="PN"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90003
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(AssignedEntityElements): Der Wert von @classCode MUSS 'ORG' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(AssignedEntityElements): Der Wert von @determinerCode MUSS 'INSTANCE' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(AssignedEntityElements): Element hl7:name ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="count(hl7:name)&lt;=1">(AssignedEntityElements): Element hl7:name kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90003-2011-12-19T000000.html"
              test="count(hl7:addr)&lt;=1">(AssignedEntityElements): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90002
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:id">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90002-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(OrganizationElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90002
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:name">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90002-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ON' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(OrganizationElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:ON" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="ON"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90002
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90002-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='TEL' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(OrganizationElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TEL" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TEL.AT"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.90002
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:addr">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90002-2011-12-19T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='AD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(OrganizationElements): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:AD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="AD"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@typeCode)=('PRD')">(SpecimenCollection): Der Wert von @typeCode MUSS 'PRD' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]])&gt;=1 and not(hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/@nullFlavor)">(SpecimenCollection): Element hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]])&lt;=1">(SpecimenCollection): Element hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@classCode)=('SPEC')">(SpecimenCollection): Der Wert von @classCode MUSS 'SPEC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(SpecimenCollection): Element hl7:id ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:id)&lt;=1">(SpecimenCollection): Element hl7:id kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&gt;=1 and not(hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/@nullFlavor)">(SpecimenCollection): Element hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&lt;=1">(SpecimenCollection): Element hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:id
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:id">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(SpecimenCollection): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(SpecimenCollection): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:participant/hl7:participantRole[hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:playingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenCollection): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(SpecimenCollection): Der Elementinhalt MUSS einer von 'ELGA_SpecimenType (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.46-DYNAMIC.xml')/*/valueSet/conceptList/exception[@code = $theNullFlavor][@codeSystem = '2.16.840.1.113883.5.1008'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(SpecimenCollection): Der fehlende Wert '<value-of select="@nullFlavor"/>' für @code MUSS gewählt werden aus dem Set gültiger null flavors für dieses Attribut oder denen assoziiert mit Value Set ELGA_SpecimenType (DYNAMIC).</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30021
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]
Item: (SpecimenCollection)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30021-2014-03-04T000000.html"
              test="string(@typeCode)=('COMP')">(SpecimenCollection): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]
Item: (SpecimenReceived)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']
Item: (SpecimenReceived)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="string(@classCode)=('ACT')">(SpecimenReceived): Der Wert von @classCode MUSS 'ACT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="string(@moodCode)=('EVN')">(SpecimenReceived): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3'])&gt;=1 ">(SpecimenReceived): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3'])&lt;=1">(SpecimenReceived): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')])&gt;=1 and not(hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')]/@nullFlavor)">(SpecimenReceived): Element hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')])&lt;=1">(SpecimenReceived): Element hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:effectiveTime)&gt;=1 ">(SpecimenReceived): Element hl7:effectiveTime ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(SpecimenReceived): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3']
Item: (SpecimenReceived)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.3']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenReceived): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1.3')">(SpecimenReceived): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1.3' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')]
Item: (SpecimenReceived)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:code[(@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenReceived): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="@nullFlavor or (@code='SPRECEIVE' and @codeSystem='1.3.5.1.4.1.19376.1.5.3.2')">(SpecimenReceived): Der Elementinhalt MUSS einer von 'code 'SPRECEIVE' codeSystem '1.3.5.1.4.1.19376.1.5.3.2'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:effectiveTime
Item: (SpecimenReceived)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:effectiveTime">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SpecimenReceived): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TS"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30022
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']]
Item: (SpecimenReceived)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']]/hl7:procedure[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.2']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']]/hl7:act[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.3']/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30022-2014-03-04T000000.html"
              test="string(@typeCode)=('COMP')">(SpecimenReceived): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]
Item: (KulturellerKeimnachweis)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@classCode)=('CLUSTER')">(KulturellerKeimnachweis): Der Wert von @classCode MUSS 'CLUSTER' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@moodCode)=('EVN')">(KulturellerKeimnachweis): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'])&gt;=1 ">(KulturellerKeimnachweis): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'])&lt;=1">(KulturellerKeimnachweis): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:statusCode[@code='completed'])&gt;=1 and not(hl7:statusCode[@code='completed']/@nullFlavor)">(KulturellerKeimnachweis): Element hl7:statusCode[@code='completed'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:statusCode[@code='completed'])&lt;=1">(KulturellerKeimnachweis): Element hl7:statusCode[@code='completed'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(KulturellerKeimnachweis): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimen)&gt;=1 and not(hl7:specimen/@nullFlavor)">(KulturellerKeimnachweis): Element hl7:specimen ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimen)&lt;=1">(KulturellerKeimnachweis): Element hl7:specimen kommt zu häufig vor [max 1x].</assert>
      <let name="elmcount"
           value="count(hl7:component[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]|hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="$elmcount&gt;=1">(KulturellerKeimnachweis): Auswahl (hl7:component[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']] oder hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]) enthält nicht genügend Elemente [min 1x]</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5']
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KulturellerKeimnachweis): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1.5')">(KulturellerKeimnachweis): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1.5' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:statusCode[@code='completed']
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:statusCode[@code='completed']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KulturellerKeimnachweis): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CS"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="@nullFlavor or (@code='completed')">(KulturellerKeimnachweis): Der Elementinhalt MUSS einer von 'code 'completed'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:effectiveTime
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:effectiveTime">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KulturellerKeimnachweis): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:IVL_TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="IVL_TS"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@typeCode)=('SPC')">(KulturellerKeimnachweis): Der Wert von @typeCode MUSS 'SPC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimenRole)&gt;=1 and not(hl7:specimenRole/@nullFlavor)">(KulturellerKeimnachweis): Element hl7:specimenRole ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimenRole)&lt;=1">(KulturellerKeimnachweis): Element hl7:specimenRole kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@typeCode)=('SPEC')">(KulturellerKeimnachweis): Der Wert von @typeCode MUSS 'SPEC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimenPlayingEntity)&gt;=1 and not(hl7:specimenPlayingEntity/@nullFlavor)">(KulturellerKeimnachweis): Element hl7:specimenPlayingEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:specimenPlayingEntity)&lt;=1">(KulturellerKeimnachweis): Element hl7:specimenPlayingEntity kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@typeCode)=('MIC')">(KulturellerKeimnachweis): Der Wert von @typeCode MUSS 'MIC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:code)&gt;=1 ">(KulturellerKeimnachweis): Element hl7:code ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:code)&lt;=1">(KulturellerKeimnachweis): Element hl7:code kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity/hl7:code
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity/hl7:code">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KulturellerKeimnachweis): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@nullFlavor)=('NA')">(KulturellerKeimnachweis): Der Wert von @nullFlavor MUSS 'NA' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:originalText)&gt;=1 and not(hl7:originalText/@nullFlavor)">(KulturellerKeimnachweis): Element hl7:originalText ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="count(hl7:originalText)&lt;=1">(KulturellerKeimnachweis): Element hl7:originalText kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity/hl7:code/hl7:originalText
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole/hl7:specimenPlayingEntity/hl7:code/hl7:originalText">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ST' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KulturellerKeimnachweis): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:ST" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="ST"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:observation[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.6']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@typeCode)=('COMP')">(KulturellerKeimnachweis): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30025
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]
Item: (KulturellerKeimnachweis)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30025-2012-01-07T000000.html"
              test="string(@typeCode)=('COMP')">(KulturellerKeimnachweis): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]
Item: (Antibiogram)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@classCode)=('CLUSTER')">(Antibiogram): Der Wert von @classCode MUSS 'CLUSTER' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@moodCode)=('EVN')">(Antibiogram): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'])&gt;=1 ">(Antibiogram): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'])&lt;=1">(Antibiogram): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:statusCode[@code='completed'])&gt;=1 and not(hl7:statusCode[@code='completed']/@nullFlavor)">(Antibiogram): Element hl7:statusCode[@code='completed'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:statusCode[@code='completed'])&lt;=1">(Antibiogram): Element hl7:statusCode[@code='completed'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(Antibiogram): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimen)&gt;=1 and not(hl7:specimen/@nullFlavor)">(Antibiogram): Element hl7:specimen ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimen)&lt;=1">(Antibiogram): Element hl7:specimen kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5']
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.5']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1.5')">(Antibiogram): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1.5' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:statusCode[@code='completed']
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:statusCode[@code='completed']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CS"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="@nullFlavor or (@code='completed')">(Antibiogram): Der Elementinhalt MUSS einer von 'code 'completed'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:effectiveTime
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:effectiveTime">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:IVL_TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="IVL_TS"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@typeCode)=('SPC')">(Antibiogram): Der Wert von @typeCode MUSS 'SPC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]])&gt;=1 and not(hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/@nullFlavor)">(Antibiogram): Element hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]])&lt;=1">(Antibiogram): Element hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@typeCode)=('SPEC')">(Antibiogram): Der Wert von @typeCode MUSS 'SPEC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:id)&gt;=1 ">(Antibiogram): Element hl7:id ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:id)&lt;=1">(Antibiogram): Element hl7:id kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]])&gt;=1 and not(hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]/@nullFlavor)">(Antibiogram): Element hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]])&lt;=1">(Antibiogram): Element hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:id
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:id">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@typeCode)=('MIC')">(Antibiogram): Der Wert von @typeCode MUSS 'MIC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="not(hl7:code/@nullFlavor) or string-length(hl7:code/hl7:originalText)&gt;0">(Antibiogram):  specimenPlayingEntity: if code/@nullFlavor is set originalText SHALL contain text. </assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor])&gt;=1 ">(Antibiogram): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor])&lt;=1">(Antibiogram): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(Antibiogram): Der Elementinhalt MUSS einer von 'ELGA_SignificantPathogens (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception[@code = $theNullFlavor][@codeSystem = '2.16.840.1.113883.5.1008'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(Antibiogram): Der fehlende Wert '<value-of select="@nullFlavor"/>' für @code MUSS gewählt werden aus dem Set gültiger null flavors für dieses Attribut oder denen assoziiert mit Value Set ELGA_SignificantPathogens (DYNAMIC).</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:originalText)&lt;=1">(Antibiogram): Element hl7:originalText kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]/hl7:originalText
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:specimen/hl7:specimenRole[hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]]/hl7:specimenPlayingEntity[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.58-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]/hl7:originalText">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ST' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:ST" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="ST"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@typeCode)=('COMP')">(Antibiogram): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4'])&gt;=1 ">(Antibiogram): Element hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4'])&lt;=1">(Antibiogram): Element hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4'] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4'])&gt;=1 ">(Antibiogram): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4'] ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4'])&lt;=1">(Antibiogram): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Antibiogram): Element hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="count(hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Antibiogram): Element hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4']
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.1.4']">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:II" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="II"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.1.4')">(Antibiogram): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.1.4' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30026
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']/hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Antibiogram)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.5']/hl7:component[hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']]/hl7:organizer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1.4']/hl7:code[(@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1')]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Antibiogram): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CE" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CE"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30026-2014-04-15T000000.html"
              test="@nullFlavor or (@code='29576-6' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Antibiogramm' and @codeSystemName='LOINC')">(Antibiogram): Der Elementinhalt MUSS einer von 'code '29576-6' codeSystem '2.16.840.1.113883.6.1' displayName='Antibiogramm' codeSystemName='LOINC'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.1']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.1']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30020
Context: *[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']]
Item: (SpezimenActEntryAllgemein)
-->
   <rule context="*[hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']]/hl7:section[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.2.1']/hl7:entry[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.1']/hl7:act[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.47-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:entryRelationship[hl7:act[hl7:templateId/@root='1.2.40.0.34.11.4.3.2' and hl7:templateId/@root='2.16.840.1.113883.10.20.1.40' and hl7:templateId/@root='1.3.6.1.4.1.19376.1.5.3.1.4.2']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30020-2015-04-30T000000.html"
              test="string(@typeCode)=('COMP')">(SpezimenActEntryAllgemein): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>
</pattern>
