<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 1.2.40.0.34.11.5
Name: Befund Bildgebende Diagnostik
Description: Template Spezieller Implementierungsleitfaden ELGA Befund Bildgebende Diagnostik
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-1.2.40.0.34.11.5-2013-10-16T000000">
   <title>Befund Bildgebende Diagnostik</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']"
         id="tmp-r-332fb890-cbf3-4890-8958-7427b972a62b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.5'])&gt;=1 ">(BefundBildgebendeDiagnostik): Element hl7:templateId[@root='1.2.40.0.34.11.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.5-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.5'])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:templateId[@root='1.2.40.0.34.11.5'] kommt zu häufig vor [max 1x].</assert>
      <let name="elmcount"
           value="count(hl7:templateId[@root='1.2.40.0.34.11.5.0.1']|hl7:templateId[@root='1.2.40.0.34.11.5.0.3'])"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="$elmcount&lt;=1">(BefundBildgebendeDiagnostik): Auswahl (hl7:templateId[@root='1.2.40.0.34.11.5.0.1'] oder hl7:templateId[@root='1.2.40.0.34.11.5.0.3']) enthält zu viele Elemente [max 1x]</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="count(hl7:id)&lt;=1">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-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.5-2013-10-16T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-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.5-2013-10-16T000000.html"
              test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:title ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:title)&lt;=1">(BefundBildgebendeDiagnostik): 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.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:effectiveTime)&gt;=1 and not(hl7:effectiveTime/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:effectiveTime ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="count(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')])&gt;=1 and not(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')] 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.5-2013-10-16T000000.html"
              test="count(hl7:languageCode[@code='de-AT'])&gt;=1 and not(hl7:languageCode[@code='de-AT']/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:languageCode[@code='de-AT'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:languageCode[@code='de-AT'])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:languageCode[@code='de-AT'] 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.5-2013-10-16T000000.html"
              test="count(hl7:setId)&gt;=1 and not(hl7:setId/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:setId ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:setId)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:setId 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.5-2013-10-16T000000.html"
              test="count(hl7:versionNumber)&gt;=1 and not(hl7:versionNumber/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:versionNumber ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:versionNumber)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:versionNumber 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.5-2013-10-16T000000.html"
              test="count(hl7:recordTarget)&gt;=1 and not(hl7:recordTarget/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:recordTarget ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:recordTarget)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:recordTarget 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.5-2013-10-16T000000.html"
              test="count(hl7:author)&gt;=1 and not(hl7:author/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:author ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:dataEnterer)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:dataEnterer 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.5-2013-10-16T000000.html"
              test="count(hl7:custodian)&gt;=1 and not(hl7:custodian/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:custodian ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:custodian)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:custodian 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.5-2013-10-16T000000.html"
              test="count(hl7:legalAuthenticator)&gt;=1 and not(hl7:legalAuthenticator/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:legalAuthenticator ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:legalAuthenticator)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:legalAuthenticator 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.5-2013-10-16T000000.html"
              test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']])&gt;=1 and not(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.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.5-2013-10-16T000000.html"
              test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.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.5-2013-10-16T000000.html"
              test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.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.5-2013-10-16T000000.html"
              test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']] 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.5-2013-10-16T000000.html"
              test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']] 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.5-2013-10-16T000000.html"
              test="count(hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]])&gt;=1 and not(hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]] 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.5-2013-10-16T000000.html"
              test="count(hl7:relatedDocument)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:relatedDocument 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.5-2013-10-16T000000.html"
              test="count(hl7:authorization)=0">(BefundBildgebendeDiagnostik): Element hl7:authorization DARF NICHT vorkommen.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-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.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5']"
         id="tmp-r-5dc49055-8968-4c23-ab77-493c41d30d8d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.5')">(BefundBildgebendeDiagnostik): Der Wert von @root MUSS '1.2.40.0.34.11.5' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5.0.1']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5.0.1']"
         id="tmp-r-b47bea6f-20b1-4c29-bd06-e6891747db8b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.5.0.1')">(BefundBildgebendeDiagnostik): Der Wert von @root MUSS '1.2.40.0.34.11.5.0.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5.0.3']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:templateId[@root='1.2.40.0.34.11.5.0.3']"
         id="tmp-r-1b3d42c8-6d25-44d9-b5f7-fb8f3e5eb7d8">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.5.0.3')">(BefundBildgebendeDiagnostik): Der Wert von @root MUSS '1.2.40.0.34.11.5.0.3' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:id
Item: (BefundBildgebendeDiagnostik)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]"
         id="tmp-r-2b6d616b-f286-4a63-a39d-f3860413dd2e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(BefundBildgebendeDiagnostik): Der Elementinhalt MUSS einer von 'ELGA_Dokumentenklassen (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.39-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.5-2013-10-16T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(BefundBildgebendeDiagnostik): 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_Dokumentenklassen (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:title
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:title"
         id="tmp-r-ffc9c3e7-5e8d-4cef-a0e6-9fad5ee3ff4a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.90008
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:effectiveTime
Item: (CDeffectiveTime)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:effectiveTime"
         id="tmp-r-c0517edc-d1b2-45aa-8dc4-36d04cfdaaf9">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90008-2013-11-07T000000.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)">(CDeffectiveTime): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90009
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')]
Item: (CDconfidentialityCode)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')]"
         id="tmp-r-0db26c79-0bde-43e9-b196-ae5080ff8ba7">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90009-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)">(CDconfidentialityCode): 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.90009-2013-11-07T000000.html"
              test="@nullFlavor or (@code='N' and @codeSystem='2.16.840.1.113883.5.25' and @displayName='normal')">(CDconfidentialityCode): Der Elementinhalt MUSS einer von 'code 'N' codeSystem '2.16.840.1.113883.5.25' displayName='normal'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90010
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:languageCode[@code='de-AT']
Item: (CDlanguageCode)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:languageCode[@code='de-AT']"
         id="tmp-r-0bdadcc5-9ed1-424d-bda8-abe329fb70ae">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90010-2013-11-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)">(CDlanguageCode): 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.LANG"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90010-2013-11-07T000000.html"
              test="@nullFlavor or (@code='de-AT')">(CDlanguageCode): Der Elementinhalt MUSS einer von 'code 'de-AT'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:setId
Item: (CDsetIdversionNumber)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:setId"
         id="tmp-r-143b2ce0-c0e4-45d5-9a39-9689f7ed3ae9">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90007-2015-05-29T000000.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)">(CDsetIdversionNumber): 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.90007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:versionNumber
Item: (CDsetIdversionNumber)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:versionNumber"
         id="tmp-r-9074e083-0497-44ba-a375-42c9f8042bdc">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90007-2015-05-29T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='INT' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(CDsetIdversionNumber): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:INT" 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="INT.POS"/>
      <let name="digitok" value="matches(string(@value), '^-?[1-9]\d*$|^+?\d*$')"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90007-2015-05-29T000000.html"
              test="$digitok or @nullFlavor">(CDsetIdversionNumber): @value ist keine gültige INT Zahl <value-of select="@value"/>
      </assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget"
         id="tmp-r-0c740cea-e928-4455-ae57-c3ea60602313">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="string(@typeCode)=('RCT') or not(@typeCode)">(HeaderRecordTarget): Der Wert von @typeCode MUSS 'RCT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="string(@contextControlCode)=('OP') or not(@contextControlCode)">(HeaderRecordTarget): Der Wert von @contextControlCode MUSS 'OP' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:patientRole)&gt;=1 ">(HeaderRecordTarget): Element hl7:patientRole ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:patientRole)&lt;=1">(HeaderRecordTarget): Element hl7:patientRole kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole"
         id="tmp-r-5bdc570a-9a1d-423d-8c84-b62005f8d5cf">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="string(@classCode)=('PAT') or not(@classCode)">(HeaderRecordTarget): Der Wert von @classCode MUSS 'PAT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="string-length(hl7:id[1]/@root)&gt;0">(HeaderRecordTarget):  patientRole id[1] MUSS als lokale Patienten ID vom System vorhanden sein</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="hl7:id[2]/@root = '1.2.40.0.10.1.4.3.1' or hl7:id[2]/@nullFlavor='NI' or hl7:id[2]/@nullFlavor='UNK'">(HeaderRecordTarget):  patientRole id[2] MUSS Sozialversicherungsnummer des Patienten sein (1.2.40.0.10.1.4.3.1) oder @nullFlavor 'NI' oder 'UNK' ist angegeben</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:id)&gt;=2 ">(HeaderRecordTarget): Element hl7:id ist required [min 2x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:patient)&lt;=1">(HeaderRecordTarget): Element hl7:patient kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:id
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:id"
         id="tmp-r-189c27fa-a2f2-468f-b864-2762c6068f25">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr"
         id="tmp-r-2767779f-c54f-4405-9034-748cc7e8f73d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="hl7:streetAddressLine or (hl7:streetName and hl7:houseNumber)">(HeaderRecordTarget): Granularitätsstufen Adresse beachten: streetAddressLine oder streetName+houseNumber</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:streetAddressLine)&lt;=1">(HeaderRecordTarget): Element hl7:streetAddressLine 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.20001-2013-10-08T000000.html"
              test="count(hl7:streetName)&lt;=1">(HeaderRecordTarget): Element hl7:streetName 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.20001-2013-10-08T000000.html"
              test="count(hl7:houseNumber)&lt;=1">(HeaderRecordTarget): Element hl7:houseNumber 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.20001-2013-10-08T000000.html"
              test="count(hl7:postalCode)&gt;=1 and not(hl7:postalCode/@nullFlavor)">(HeaderRecordTarget): Element hl7:postalCode ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:postalCode)&lt;=1">(HeaderRecordTarget): Element hl7:postalCode 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.20001-2013-10-08T000000.html"
              test="count(hl7:city)&gt;=1 and not(hl7:city/@nullFlavor)">(HeaderRecordTarget): Element hl7:city ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:city)&lt;=1">(HeaderRecordTarget): Element hl7:city 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.20001-2013-10-08T000000.html"
              test="count(hl7:state)&gt;=1 ">(HeaderRecordTarget): Element hl7:state ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:state)&lt;=1">(HeaderRecordTarget): Element hl7:state 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.20001-2013-10-08T000000.html"
              test="count(hl7:country)&gt;=1 and not(hl7:country/@nullFlavor)">(HeaderRecordTarget): Element hl7:country ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:country)&lt;=1">(HeaderRecordTarget): Element hl7:country 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.20001-2013-10-08T000000.html"
              test="count(hl7:additionalLocator)&lt;=1">(HeaderRecordTarget): Element hl7:additionalLocator kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:streetAddressLine
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:streetName
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:houseNumber
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:postalCode
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:city
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:state
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:country
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:addr/hl7:additionalLocator
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:telecom
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:telecom"
         id="tmp-r-c728a8d3-f843-4b9a-a8d3-758a753cf42a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient"
         id="tmp-r-160d3c9d-6414-4cda-b76b-0297ba262ee9">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor])&gt;=1 ">(HeaderRecordTarget): Element hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-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.20001-2013-10-08T000000.html"
              test="count(hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor])&lt;=1">(HeaderRecordTarget): Element hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor] 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.20001-2013-10-08T000000.html"
              test="count(hl7:birthTime)&gt;=1 ">(HeaderRecordTarget): Element hl7:birthTime ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:birthTime)&lt;=1">(HeaderRecordTarget): Element hl7:birthTime 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.20001-2013-10-08T000000.html"
              test="count(hl7:maritalStatusCode)&lt;=1">(HeaderRecordTarget): Element hl7:maritalStatusCode 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.20001-2013-10-08T000000.html"
              test="count(hl7:religiousAffiliationCode)&lt;=1">(HeaderRecordTarget): Element hl7:religiousAffiliationCode 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.20001-2013-10-08T000000.html"
              test="count(hl7:raceCode)=0">(HeaderRecordTarget): Element hl7:raceCode DARF NICHT vorkommen.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:ethnicGroupCode)=0">(HeaderRecordTarget): Element hl7:ethnicGroupCode DARF NICHT vorkommen.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:birthplace)&lt;=1">(HeaderRecordTarget): Element hl7:birthplace kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name"
         id="tmp-r-e90bb076-dd23-495c-acae-626dc4e4b550">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:given)&gt;=1 and not(hl7:given/@nullFlavor)">(HeaderRecordTarget): Element hl7:given ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:family)&gt;=1 and not(hl7:family/@nullFlavor)">(HeaderRecordTarget): Element hl7:family ist mandatory [min 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name/hl7:prefix
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name/hl7:given
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name/hl7:family
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name/hl7:suffix
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:administrativeGenderCode[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code) or @nullFlavor]"
         id="tmp-r-71e306d9-2837-44d0-980b-36c3ad0743ef">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.4-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderRecordTarget): Der Elementinhalt MUSS einer von 'ELGA_AdministrativeGender (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.4-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.20001-2013-10-08T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderRecordTarget): 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_AdministrativeGender (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthTime
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthTime"
         id="tmp-r-ddd058a1-c8a5-4d7c-b578-d98aba2560bb">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:maritalStatusCode
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:maritalStatusCode"
         id="tmp-r-f2d41ba8-84de-484a-a2b7-5ad08de8a1a4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.11-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderRecordTarget): Der Elementinhalt MUSS einer von 'ELGA_MaritalStatus (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.11-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.20001-2013-10-08T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderRecordTarget): 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_MaritalStatus (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:religiousAffiliationCode
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:religiousAffiliationCode"
         id="tmp-r-428e35a7-e0e2-4200-bda3-9c377524a5a4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.18-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderRecordTarget): Der Elementinhalt MUSS einer von 'ELGA_ReligiousAffiliation (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.18-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.20001-2013-10-08T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderRecordTarget): 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_ReligiousAffiliation (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:raceCode
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:ethnicGroupCode
Item: (HeaderRecordTarget)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian"
         id="tmp-r-550cca19-6592-4c4b-8ced-c6f4b132c82c">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderRecordTarget): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
      <let name="elmcount"
           value="count(hl7:guardianPerson|hl7:guardianOrganization)"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="$elmcount&gt;=1">(HeaderRecordTarget): Auswahl (hl7:guardianPerson oder hl7:guardianOrganization) enthält nicht genügend Elemente [min 1x]</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="$elmcount&lt;=1">(HeaderRecordTarget): Auswahl (hl7:guardianPerson oder hl7:guardianOrganization) enthält zu viele Elemente [max 1x]</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:guardianPerson)&lt;=1">(HeaderRecordTarget): Element hl7:guardianPerson 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.20001-2013-10-08T000000.html"
              test="count(hl7:guardianOrganization)&lt;=1">(HeaderRecordTarget): Element hl7:guardianOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:addr
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:addr"
         id="tmp-r-28626628-88a2-4b5b-a659-fb851aa71c97">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:telecom
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:telecom"
         id="tmp-r-e2ffaba3-87b0-4950-9abb-5120b4444ffd">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianPerson
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianPerson"
         id="tmp-r-341d2b41-cc2c-4d67-a525-b80e06550b0b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderRecordTarget): Element hl7:name kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianPerson/hl7:name
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianPerson/hl7:name"
         id="tmp-r-f9594751-3dca-49b6-9f31-4537acf9a1f9">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianOrganization
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianOrganization"
         id="tmp-r-5120ba7e-ee3b-47f2-b446-cf60d579de98">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderRecordTarget): 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.20001-2013-10-08T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderRecordTarget): Element hl7:name kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianOrganization/hl7:name
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:guardian/hl7:guardianOrganization/hl7:name"
         id="tmp-r-fdabd42d-1c85-4909-b8bb-dba151969209">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace"
         id="tmp-r-07589d04-5813-4d53-b27b-69ec90f4ee31">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:place)&gt;=1 and not(hl7:place/@nullFlavor)">(HeaderRecordTarget): Element hl7:place ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:place)&lt;=1">(HeaderRecordTarget): Element hl7:place kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace/hl7:place
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace/hl7:place"
         id="tmp-r-7662f98b-2de4-46ca-961a-69066f778b2d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:addr)&gt;=1 and not(hl7:addr/@nullFlavor)">(HeaderRecordTarget): Element hl7:addr ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderRecordTarget): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20001
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace/hl7:place/hl7:addr
Item: (HeaderRecordTarget)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthplace/hl7:place/hl7:addr"
         id="tmp-r-b7db3f04-a8f1-4678-8c82-6ce7121161f6">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20001-2013-10-08T000000.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)">(HeaderRecordTarget): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author"
         id="tmp-r-d67ab9a8-bdc3-4641-9c43-fc41b8631806">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@typeCode)=('AUT') or not(@typeCode)">(HeaderAuthor): Der Wert von @typeCode MUSS 'AUT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@contextControlCode)=('OP') or not(@contextControlCode)">(HeaderAuthor): Der Wert von @contextControlCode MUSS 'OP' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:functionCode)&lt;=1">(HeaderAuthor): Element hl7:functionCode 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.20002-2015-05-09T000000.html"
              test="count(hl7:time)&gt;=1 ">(HeaderAuthor): Element hl7:time ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderAuthor): Element hl7:time 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.20002-2015-05-09T000000.html"
              test="count(hl7:assignedAuthor)&gt;=1 ">(HeaderAuthor): Element hl7:assignedAuthor ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:assignedAuthor)&lt;=1">(HeaderAuthor): Element hl7:assignedAuthor kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:functionCode
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:functionCode"
         id="tmp-r-695bd8a0-008b-4353-b266-99579c5f12ae">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:time
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:time"
         id="tmp-r-eafde098-3d5c-483d-ab80-b63b76f8f84b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor"
         id="tmp-r-8d451e73-c10e-4f09-82d3-10483c73a502">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@classCode)=('ASSIGNED') or not(@classCode)">(HeaderAuthor): Der Wert von @classCode MUSS 'ASSIGNED' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:code)&lt;=1">(HeaderAuthor): Element hl7:code kommt zu häufig vor [max 1x].</assert>
      <let name="elmcount"
           value="count(hl7:assignedPerson|hl7:assignedAuthoringDevice)"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="$elmcount&gt;=1">(HeaderAuthor): Auswahl (hl7:assignedPerson oder hl7:assignedAuthoringDevice) enthält nicht genügend Elemente [min 1x]</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="$elmcount&lt;=1">(HeaderAuthor): Auswahl (hl7:assignedPerson oder hl7:assignedAuthoringDevice) enthält zu viele Elemente [max 1x]</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:assignedAuthoringDevice)&lt;=1">(HeaderAuthor): Element hl7:assignedAuthoringDevice 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.20002-2015-05-09T000000.html"
              test="count(hl7:representedOrganization)&gt;=1 and not(hl7:representedOrganization/@nullFlavor)">(HeaderAuthor): Element hl7:representedOrganization ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(HeaderAuthor): Element hl7:representedOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:id
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:id"
         id="tmp-r-8b0f5105-4440-4819-a8fb-91e01ef7eba6">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:code
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:code"
         id="tmp-r-dc074dd1-5dc0-4772-8688-f760f0345712">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.6-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderAuthor): Der Elementinhalt MUSS einer von 'ELGA_AuthorSpeciality (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.6-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.20002-2015-05-09T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderAuthor): 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_AuthorSpeciality (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:telecom
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:telecom"
         id="tmp-r-dbf1fc88-9542-4519-a847-6c9286377b8a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedPerson
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedPerson"
         id="tmp-r-a8b9e9d1-ca7e-43b8-9e23-2fb9cbeb3432">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderAuthor): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedPerson/hl7:name"
         id="tmp-r-58c26d59-3d59-4c58-b75d-eff8422e1dbe">
      <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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice"
         id="tmp-r-e9a00bc2-f98e-41f7-9fa1-b61812192358">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@classCode)=('DEV') or not(@classCode)">(HeaderAuthor): Der Wert von @classCode MUSS 'DEV' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:manufacturerModelName)&gt;=1 ">(HeaderAuthor): Element hl7:manufacturerModelName ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:manufacturerModelName)&lt;=1">(HeaderAuthor): Element hl7:manufacturerModelName 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.20002-2015-05-09T000000.html"
              test="count(hl7:softwareName)&gt;=1 ">(HeaderAuthor): Element hl7:softwareName ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:softwareName)&lt;=1">(HeaderAuthor): Element hl7:softwareName kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice/hl7:manufacturerModelName
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice/hl7:manufacturerModelName"
         id="tmp-r-4fd19f73-780e-4b95-bcca-6cf42ca21f56">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='SC' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(HeaderAuthor): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:SC" 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="SC"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice/hl7:softwareName
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:assignedAuthoringDevice/hl7:softwareName"
         id="tmp-r-a42b5ea3-aa20-4755-9f47-24478fce200d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='SC' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(HeaderAuthor): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:SC" 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="SC"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization"
         id="tmp-r-f6d95b03-5a85-4f02-baae-c817cca4ee34">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.html"
              test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderAuthor): 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.20002-2015-05-09T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderAuthor): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:id
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:id"
         id="tmp-r-70fbac93-36b6-4cb0-8015-39c705758062">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:name
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:name"
         id="tmp-r-21a60dd6-3495-451e-b6c6-abe0f4e42143">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:telecom
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:telecom"
         id="tmp-r-3e61b529-60d0-4151-9315-dde8076fceca">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20002
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr
Item: (HeaderAuthor)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr"
         id="tmp-r-5a4be1f6-184e-41f7-a7b5-60b4f7be5d35">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20002-2015-05-09T000000.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)">(HeaderAuthor): 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.20003
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer
Item: (HeaderDataEnterer)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer"
         id="tmp-r-6c8661a1-b232-48a2-91e9-1afb3ac3a71f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20003-2013-02-10T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderDataEnterer): Element hl7:time 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.20003-2013-02-10T000000.html"
              test="count(hl7:assignedEntity)&gt;=1 ">(HeaderDataEnterer): Element hl7:assignedEntity ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20003-2013-02-10T000000.html"
              test="count(hl7:assignedEntity)&lt;=1">(HeaderDataEnterer): Element hl7:assignedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20003
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:time
Item: (HeaderDataEnterer)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:time"
         id="tmp-r-fc8cb005-ae2c-41a1-82fd-468436c5f3d7">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20003-2013-02-10T000000.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)">(HeaderDataEnterer): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20003
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity
Item: (HeaderDataEnterer)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity"
         id="tmp-r-cb4de27a-767e-4ec0-add5-dda325e95b68">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20003-2013-02-10T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderDataEnterer): 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.20003-2013-02-10T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderDataEnterer): 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.20003-2013-02-10T000000.html"
              test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(HeaderDataEnterer): 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.20003-2013-02-10T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(HeaderDataEnterer): 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.20003-2013-02-10T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(HeaderDataEnterer): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:id"
         id="tmp-r-f72d8836-c37b-47bd-9a3f-f3ae97196a29">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:addr"
         id="tmp-r-0200d05b-e12f-49f1-8002-0ad0d903bdea">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:telecom"
         id="tmp-r-7c7786a7-48b0-4104-9e92-c801288984ba">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:assignedPerson"
         id="tmp-r-61cc0e29-c06d-4537-a5c9-7b828343bb8d">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:assignedPerson/hl7:name"
         id="tmp-r-f680b67d-c66c-4b9c-b50c-1954b7d7ed3f">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization"
         id="tmp-r-27d34c68-9116-4a67-81e2-7d226c816eb7">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:id"
         id="tmp-r-9fabc1b6-8f18-4f95-bcc7-9dca5c9c8ee4">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:name"
         id="tmp-r-4605a690-af53-44d5-925a-a09d92478871">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom"
         id="tmp-r-5a2fddd3-3926-46cf-83e4-386a3a78b820">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:dataEnterer/hl7:assignedEntity/hl7:representedOrganization/hl7:addr"
         id="tmp-r-0a5f34dd-1907-4a25-9b28-195c874bc4dc">
      <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.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian"
         id="tmp-r-28a75b49-82d6-4ac8-bfe7-f0f96b45062d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="string(@typeCode)=('CST') or not(@typeCode)">(HeaderCustodian): Der Wert von @typeCode MUSS 'CST' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="count(hl7:assignedCustodian)&gt;=1 and not(hl7:assignedCustodian/@nullFlavor)">(HeaderCustodian): Element hl7:assignedCustodian ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="count(hl7:assignedCustodian)&lt;=1">(HeaderCustodian): Element hl7:assignedCustodian kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian"
         id="tmp-r-ffdf83b2-d3da-4d2b-b7ec-4d71202edf29">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="string(@classCode)=('ASSIGNED') or not(@classCode)">(HeaderCustodian): Der Wert von @classCode MUSS 'ASSIGNED' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="count(hl7:representedCustodianOrganization)&gt;=1 and not(hl7:representedCustodianOrganization/@nullFlavor)">(HeaderCustodian): Element hl7:representedCustodianOrganization ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="count(hl7:representedCustodianOrganization)&lt;=1">(HeaderCustodian): Element hl7:representedCustodianOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization"
         id="tmp-r-b8cc9fc6-cc90-4209-af6a-d36413fb4d3f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="count(hl7:id)&lt;=1">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderCustodian): 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.20004-2015-05-28T000000.html"
              test="count(hl7:telecom)&lt;=1">(HeaderCustodian): Element hl7:telecom 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.20004-2015-05-28T000000.html"
              test="count(hl7:addr)&gt;=1 and not(hl7:addr/@nullFlavor)">(HeaderCustodian): Element hl7:addr ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderCustodian): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:id
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:id"
         id="tmp-r-626894a7-6aab-49ea-8026-e2a1d52c4dc6">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.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)">(HeaderCustodian): 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.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:name
Item: (HeaderCustodian)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:telecom
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:telecom"
         id="tmp-r-89453c91-d476-49f8-a734-f597968c4277">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.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)">(HeaderCustodian): 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.20004
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:addr
Item: (HeaderCustodian)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:custodian/hl7:assignedCustodian/hl7:representedCustodianOrganization/hl7:addr"
         id="tmp-r-4413c51d-2e33-4829-b948-e149f3946c8d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20004-2015-05-28T000000.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)">(HeaderCustodian): 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.20005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient
Item: (HeaderInformationRecipient)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient"
         id="tmp-r-c6d3d0fc-037b-4ec2-b30a-e60fb43d9471">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="@typeCode">(HeaderInformationRecipient): Attribut @typeCode MUSS vorkommen.</assert>
      <let name="theAttValue"
           value="distinct-values(tokenize(normalize-space(@typeCode),' '))"/>
      <let name="theAttCheck"
           value="distinct-values(for $code in tokenize(@typeCode,' ') return if ($code=('PRCP','TRC')) then ($code) else ())"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="not(@typeCode) or count($theAttValue) = count($theAttCheck)">(HeaderInformationRecipient): Der Wert von typeCode MUSS 'Code PRCP oder Code TRC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="count(hl7:intendedRecipient)&gt;=1 and not(hl7:intendedRecipient/@nullFlavor)">(HeaderInformationRecipient): Element hl7:intendedRecipient ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="count(hl7:intendedRecipient)&lt;=1">(HeaderInformationRecipient): Element hl7:intendedRecipient kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient
Item: (HeaderInformationRecipient)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient"
         id="tmp-r-9b3dae0a-380e-4ec1-ae81-956c330bba58">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:informationRecipient)&gt;=1 and not(hl7:informationRecipient/@nullFlavor)">(HeaderInformationRecipient): Element hl7:informationRecipient ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="count(hl7:informationRecipient)&lt;=1">(HeaderInformationRecipient): Element hl7:informationRecipient 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.20005-2011-12-19T000000.html"
              test="count(hl7:receivedOrganization)&lt;=1">(HeaderInformationRecipient): Element hl7:receivedOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:id
Item: (HeaderInformationRecipient)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:id"
         id="tmp-r-995ffc67-2416-436f-a0d6-d9a0d683852f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-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)">(HeaderInformationRecipient): 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.20005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:informationRecipient
Item: (HeaderInformationRecipient)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:informationRecipient"
         id="tmp-r-2c6f141e-7ed1-4a94-9ce6-3425b13bd441">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderInformationRecipient): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:informationRecipient/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:informationRecipient/hl7:name"
         id="tmp-r-d809d569-9db5-4387-bd02-f9d25d7a4494">
      <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.20005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization
Item: (HeaderInformationRecipient)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization"
         id="tmp-r-a29d06d1-ef57-48cf-97e9-a1444306fe34">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20005-2011-12-19T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderInformationRecipient): 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.20005-2011-12-19T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderInformationRecipient): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:id"
         id="tmp-r-b6c1d8b8-4332-43a3-97c4-36c061034046">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:name"
         id="tmp-r-81df5c9c-ae86-4a2e-a8f8-549f0961f3c3">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:telecom"
         id="tmp-r-296a7756-92da-417b-940a-0727a1ca6428">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:informationRecipient/hl7:intendedRecipient/hl7:receivedOrganization/hl7:addr"
         id="tmp-r-16b25d03-c8f0-493e-856a-09ad52ea44fe">
      <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.20006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator
Item: (HeaderLegalAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator"
         id="tmp-r-6cafdaad-4ea3-468f-a858-5cf73359e29e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.html"
              test="string(@typeCode)=('LA') or not(@typeCode)">(HeaderLegalAuthenticator): Der Wert von @typeCode MUSS 'LA' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.html"
              test="count(hl7:time)&gt;=1 ">(HeaderLegalAuthenticator): Element hl7:time ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderLegalAuthenticator): Element hl7:time 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.20006-2011-12-19T000000.html"
              test="count(hl7:signatureCode[@code='S'])&gt;=1 and not(hl7:signatureCode[@code='S']/@nullFlavor)">(HeaderLegalAuthenticator): Element hl7:signatureCode[@code='S'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.html"
              test="count(hl7:signatureCode[@code='S'])&lt;=1">(HeaderLegalAuthenticator): Element hl7:signatureCode[@code='S'] 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.20006-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&gt;=1 and not(hl7:assignedEntity/@nullFlavor)">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&lt;=1">(HeaderLegalAuthenticator): Element hl7:assignedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:time
Item: (HeaderLegalAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:time"
         id="tmp-r-4f4d4be7-b5e4-4d57-ab0a-753ae9bb2bd1">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.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)">(HeaderLegalAuthenticator): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:signatureCode[@code='S']
Item: (HeaderLegalAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:signatureCode[@code='S']"
         id="tmp-r-dec99416-505d-454c-ac1d-3e3b15eb180c">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.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)">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="@nullFlavor or (@code='S')">(HeaderLegalAuthenticator): Der Elementinhalt MUSS einer von 'code 'S'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity
Item: (HeaderLegalAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity"
         id="tmp-r-d35719a8-fbd7-4c37-8684-c933cc43cc92">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20006-2011-12-19T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(HeaderLegalAuthenticator): 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.20006-2011-12-19T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(HeaderLegalAuthenticator): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:id"
         id="tmp-r-8c38c9f4-098e-4b02-b546-1d2e5802c70e">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:addr"
         id="tmp-r-848a19e9-6e73-44e1-a630-22aacc3571fb">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:telecom"
         id="tmp-r-6fe07037-cb51-46ce-ad6f-494d3fc397e3">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:assignedPerson"
         id="tmp-r-f63014d5-377e-4237-92c6-38ada89a5690">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:assignedPerson/hl7:name"
         id="tmp-r-e48d9a3f-870c-46a8-afe3-9ea5cc55baae">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization"
         id="tmp-r-5de84c41-8d2e-4ba2-afaa-4730c14ebffd">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:id"
         id="tmp-r-9e4d8ce0-3a6c-45eb-aeb5-789bc7336a39">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:name"
         id="tmp-r-5931d5d0-3904-4224-98ee-cb28ffa8104c">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom"
         id="tmp-r-d6560f34-90f3-41b8-8c58-d1199ae1e408">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:legalAuthenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:addr"
         id="tmp-r-7c0aa158-a0ec-40be-a628-befed203930b">
      <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.20007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator
Item: (HeaderAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator"
         id="tmp-r-aeecac4a-2e6b-4c78-94da-0fb22889b552">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.html"
              test="string(@typeCode)=('AUTHEN') or not(@typeCode)">(HeaderAuthenticator): Der Wert von @typeCode MUSS 'AUTHEN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.html"
              test="count(hl7:time)&gt;=1 ">(HeaderAuthenticator): Element hl7:time ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderAuthenticator): Element hl7:time 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.20007-2011-12-19T000000.html"
              test="count(hl7:signatureCode[@code='S'])&gt;=1 and not(hl7:signatureCode[@code='S']/@nullFlavor)">(HeaderAuthenticator): Element hl7:signatureCode[@code='S'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.html"
              test="count(hl7:signatureCode[@code='S'])&lt;=1">(HeaderAuthenticator): Element hl7:signatureCode[@code='S'] 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.20007-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&gt;=1 and not(hl7:assignedEntity/@nullFlavor)">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&lt;=1">(HeaderAuthenticator): Element hl7:assignedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:time
Item: (HeaderAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:time"
         id="tmp-r-3a762298-15af-4605-8c36-a3aa504a2261">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.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)">(HeaderAuthenticator): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:signatureCode[@code='S']
Item: (HeaderAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:signatureCode[@code='S']"
         id="tmp-r-4b85ac21-7917-4b35-ad78-b395c542cd17">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.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)">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="@nullFlavor or (@code='S')">(HeaderAuthenticator): Der Elementinhalt MUSS einer von 'code 'S'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20007
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity
Item: (HeaderAuthenticator)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity"
         id="tmp-r-40afba55-ed1d-40c6-b823-3b518aaa9e93">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20007-2011-12-19T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(HeaderAuthenticator): 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.20007-2011-12-19T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(HeaderAuthenticator): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:id"
         id="tmp-r-1c231ed0-bbea-4832-a6e7-a6c2511b06d2">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:addr"
         id="tmp-r-fc704d62-932d-4747-8412-6a6bac473638">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:telecom"
         id="tmp-r-7372be01-efa1-4944-b517-f523c164b01e">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:assignedPerson"
         id="tmp-r-f5de4fe7-eb33-42c1-bec1-909bb87829f6">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:assignedPerson/hl7:name"
         id="tmp-r-fe37e498-89e3-4d2e-90c5-53f6322281e7">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization"
         id="tmp-r-43242c7e-bacb-4e54-9708-e723d4ef77fd">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:id"
         id="tmp-r-483b600e-36b0-4ae3-944c-ee46a0d0efdb">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:name"
         id="tmp-r-8f776549-bc61-4d05-997c-42c861f4920c">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom"
         id="tmp-r-2ce61619-f1d9-421c-8479-c9128c5051d5">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authenticator/hl7:assignedEntity/hl7:representedOrganization/hl7:addr"
         id="tmp-r-8001d704-3723-46af-b439-6cbf6025379d">
      <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.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]"
         id="tmp-r-ff7eca06-856c-48dc-b41c-ccae946b2962">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="string(@typeCode)=('CALLBCK')">(HeaderParticipantAnsprechpartner): Der Wert von @typeCode MUSS 'CALLBCK' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.1'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.1']/@nullFlavor)">(HeaderParticipantAnsprechpartner): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantAnsprechpartner): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantAnsprechpartner): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.1']
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.1']"
         id="tmp-r-ccc91ae5-8d61-40b0-89f4-411733fe9eb2">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.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)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.1')">(HeaderParticipantAnsprechpartner): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity"
         id="tmp-r-709dc57d-15f8-4f5f-9a2c-975e2e7c3c9f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="string(@classCode)=('PROV')">(HeaderParticipantAnsprechpartner): Der Wert von @classCode MUSS 'PROV' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:telecom)&gt;=1 and not(hl7:telecom/@nullFlavor)">(HeaderParticipantAnsprechpartner): Element hl7:telecom ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="count(hl7:associatedPerson)&gt;=1 and not(hl7:associatedPerson/@nullFlavor)">(HeaderParticipantAnsprechpartner): Element hl7:associatedPerson ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantAnsprechpartner): Element hl7:associatedPerson 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantAnsprechpartner): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-bc68fee9-ac89-4a6c-b603-d2b89986f597">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.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)">(HeaderParticipantAnsprechpartner): 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.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-065ba72c-69a4-4f95-82bf-421cf1858a14">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.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)">(HeaderParticipantAnsprechpartner): 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.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-ee9b1d53-27bd-4ebb-8fd2-206c04a4744d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantAnsprechpartner): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-ae3f7a5b-bb4c-4e9a-8bb6-d40e4518f558">
      <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.1.1.1
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantAnsprechpartner)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-55b85031-de8c-4945-a052-db7086cf13bd">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.1-2014-03-25T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantAnsprechpartner): 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.1.1.1-2014-03-25T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantAnsprechpartner): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-d38797bd-bcba-45a3-8ba6-9b3be9052787">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-fb1b6cc8-a535-4542-b32c-f5b07ca47e26">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-81633e23-cb2c-461a-bc29-3bf42ece5339">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-18010d0a-5713-460e-91bf-b5370b19fde2">
      <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.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]"
         id="tmp-r-cc6579f0-ed1e-4d49-9eb5-10a557eddc3f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="string(@typeCode)=('REF')">(HeaderParticipantRefArzt): Der Wert von @typeCode MUSS 'REF' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.2'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.2']/@nullFlavor)">(HeaderParticipantRefArzt): Element hl7:templateId[@root='1.2.40.0.34.11.1.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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantRefArzt): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantRefArzt): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.2']
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.2']"
         id="tmp-r-4d80401f-5cbe-443e-bc1d-4c3f320acc77">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.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)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.2')">(HeaderParticipantRefArzt): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.2' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity"
         id="tmp-r-fb0780a6-6a24-4b88-a77b-91728c345fc4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="string(@classCode)=('PROV')">(HeaderParticipantRefArzt): Der Wert von @classCode MUSS 'PROV' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:associatedPerson)&gt;=1 ">(HeaderParticipantRefArzt): Element hl7:associatedPerson ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantRefArzt): Element hl7:associatedPerson 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantRefArzt): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:id
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:id"
         id="tmp-r-eaa0c288-0575-40d6-b7f3-1ef5e69e53f0">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.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)">(HeaderParticipantRefArzt): 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.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-c89fb6fc-823f-4b81-96e2-6f9e3faf5a3d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.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)">(HeaderParticipantRefArzt): 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.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-e997c298-f513-42e0-8436-9bf630aceabd">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.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)">(HeaderParticipantRefArzt): 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.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-b09364b3-36e7-4e50-806f-3c9a2bb49710">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantRefArzt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-659cfb62-0427-46e2-9670-00cf1d9d4ab6">
      <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.1.1.2
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantRefArzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-78fb0cdc-8349-4f87-aca1-71a8c2b5f5d3">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.2-2013-10-16T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantRefArzt): 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.1.1.2-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantRefArzt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-ba80eda8-233f-41d9-98da-144a5ab27828">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-dc9c1b45-c242-4bac-9d65-3cca6c5cd218">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-480ae1cb-0ab5-4e47-9375-fec944eff743">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-db63af15-e444-4dee-ab73-3f45afeb6436">
      <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.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]"
         id="tmp-r-a12f5e2d-0cc7-4e37-9fd2-b2be0a64817b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="string(@typeCode)=('IND')">(HeaderParticipantHausarzt): Der Wert von @typeCode MUSS 'IND' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.3'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.3']/@nullFlavor)">(HeaderParticipantHausarzt): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.3'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:functionCode[(@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')])&gt;=1 and not(hl7:functionCode[(@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')]/@nullFlavor)">(HeaderParticipantHausarzt): Element hl7:functionCode[(@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantHausarzt): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantHausarzt): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.3']
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.3']"
         id="tmp-r-3150d3e1-f03c-4752-89d0-cc27e603e1fd">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.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)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.3')">(HeaderParticipantHausarzt): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.3' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:functionCode[(@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')]
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:functionCode[(@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')]"
         id="tmp-r-64fd12ec-92f7-407c-9825-8c6fbdf5e006">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.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)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="@nullFlavor or (@code='PCP' and @codeSystem='2.16.840.1.113883.5.88')">(HeaderParticipantHausarzt): Der Elementinhalt MUSS einer von 'code 'PCP' codeSystem '2.16.840.1.113883.5.88'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity"
         id="tmp-r-c8b83178-b464-4664-a1f5-0bf94282937b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="string(@classCode)=('PROV')">(HeaderParticipantHausarzt): Der Wert von @classCode MUSS 'PROV' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:associatedPerson)&gt;=1 and not(hl7:associatedPerson/@nullFlavor)">(HeaderParticipantHausarzt): Element hl7:associatedPerson ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantHausarzt): Element hl7:associatedPerson 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantHausarzt): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:id
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:id"
         id="tmp-r-04755e17-07f7-4b8c-b325-eb33181f5f7e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.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)">(HeaderParticipantHausarzt): 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.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-25e8cc2f-e554-4bd5-89ea-8b4542c6a8d0">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.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)">(HeaderParticipantHausarzt): 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.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-02289722-b196-409e-8398-82a72936bc49">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.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)">(HeaderParticipantHausarzt): 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.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-61adfedf-acfb-43a9-82a7-4d1100b80125">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantHausarzt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-f9ef8ba5-adf8-4ca3-af25-17e6bbed95ed">
      <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.1.1.3
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantHausarzt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-ccded756-3967-45d2-b766-6f2a97e35a11">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.3-2013-10-16T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantHausarzt): 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.1.1.3-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantHausarzt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-41095ad5-14a8-4be1-9e82-11b6f7cae62a">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-5661d21d-57d3-4309-9b08-700d7dccae0c">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-c25adace-d3bb-44cd-84b6-db8765776a3c">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-a832b324-445c-4f7e-b72a-83b28ea1f4d7">
      <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.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]"
         id="tmp-r-3d8cfe75-131d-4880-a291-6f7493d03eda">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="string(@typeCode)=('IND')">(HeaderParticipantNotfallkontakt): Der Wert von @typeCode MUSS 'IND' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.4'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.4']/@nullFlavor)">(HeaderParticipantNotfallkontakt): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.4'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderParticipantNotfallkontakt): Element hl7:time 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantNotfallkontakt): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantNotfallkontakt): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.4']
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.4']"
         id="tmp-r-9ba40465-bcb1-41c5-a473-3306467acf6b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.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)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.4')">(HeaderParticipantNotfallkontakt): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.4' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:time
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:time"
         id="tmp-r-bfabf1c6-0ad7-4af9-89f0-bb0b1ef48038">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.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)">(HeaderParticipantNotfallkontakt): 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.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity"
         id="tmp-r-5a564e2a-2242-40f5-9f74-3ecfb84df5aa">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="string(@classCode)=('ECON')">(HeaderParticipantNotfallkontakt): Der Wert von @classCode MUSS 'ECON' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="count(hl7:code)&lt;=1">(HeaderParticipantNotfallkontakt): Element hl7: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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:associatedPerson)&gt;=1 and not(hl7:associatedPerson/@nullFlavor)">(HeaderParticipantNotfallkontakt): Element hl7:associatedPerson ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantNotfallkontakt): Element hl7:associatedPerson 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantNotfallkontakt): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:code
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:code"
         id="tmp-r-0353c5d2-1212-4ac2-a392-e137061a44e6">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.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)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.17-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderParticipantNotfallkontakt): Der Elementinhalt MUSS einer von 'ELGA_PersonalRelationship (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.17-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.1.1.4-2013-11-13T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderParticipantNotfallkontakt): 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_PersonalRelationship (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-16cc7e17-6b2d-4a1c-ba8c-206de0dd2e54">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.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)">(HeaderParticipantNotfallkontakt): 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.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-1c446087-ff10-414b-8a58-16bd0d059038">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.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)">(HeaderParticipantNotfallkontakt): 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.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-7cdaf137-bc19-4c86-9500-3bda27676d05">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantNotfallkontakt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-2b42128b-41cf-470e-8c8c-36ea4c85b15e">
      <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.1.1.4
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantNotfallkontakt)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-91020359-c454-4d47-a4bb-7f3528f675d4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.4-2013-11-13T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantNotfallkontakt): 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.1.1.4-2013-11-13T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantNotfallkontakt): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-44332368-83be-4240-a7aa-d423f7018791">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-503d5dd8-82e9-4b1c-8011-48eed8d9607b">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-f9e43f31-f472-4aac-bf21-46a68b0edd43">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-c621c2f3-dd1f-4aae-a493-1c927396e7cd">
      <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.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]"
         id="tmp-r-3ac9940d-f863-46c0-90d6-5239c58c6d13">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="string(@typeCode)=('IND')">(HeaderParticipantAngehoerige): Der Wert von @typeCode MUSS 'IND' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.5'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.5']/@nullFlavor)">(HeaderParticipantAngehoerige): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.5'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantAngehoerige): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantAngehoerige): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.5']
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.5']"
         id="tmp-r-31998f65-acda-4fb3-9472-e0341748ef00">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.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)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.5')">(HeaderParticipantAngehoerige): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.5' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity"
         id="tmp-r-767fb020-aaec-46f5-88b4-6fb304fbf762">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="string(@classCode)=('PRS')">(HeaderParticipantAngehoerige): Der Wert von @classCode MUSS 'PRS' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="count(hl7:code)&lt;=1">(HeaderParticipantAngehoerige): Element hl7: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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:associatedPerson)&gt;=1 and not(hl7:associatedPerson/@nullFlavor)">(HeaderParticipantAngehoerige): Element hl7:associatedPerson ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantAngehoerige): Element hl7:associatedPerson 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantAngehoerige): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:code
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:code"
         id="tmp-r-25404e03-2918-4c0b-95f2-7e22c54ff3f8">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.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)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.17-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderParticipantAngehoerige): Der Elementinhalt MUSS einer von 'ELGA_PersonalRelationship (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.17-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.1.1.5-2013-11-13T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderParticipantAngehoerige): 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_PersonalRelationship (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-7fda2066-4d00-4cd0-b406-67845321ea97">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.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)">(HeaderParticipantAngehoerige): 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.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-1a2b93e9-e829-4505-9bda-5c379475bf80">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.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)">(HeaderParticipantAngehoerige): 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.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-d4f97de2-aa4b-4f8b-bc90-ffb2c5b48c1e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantAngehoerige): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-7769d2e3-4596-497f-85cb-1d53c6b1eeb9">
      <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.1.1.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantAngehoerige)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-27ca1ab6-188e-48d6-a54c-19aa70831cd4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.5-2013-11-13T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantAngehoerige): 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.1.1.5-2013-11-13T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantAngehoerige): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-e3be50de-6649-444d-86eb-a90a3dcd389d">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-81741412-7cb6-4500-85f7-8f9b97688461">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-dafda23e-9ce7-4ec3-a6a6-ed78e09ae511">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-abee3cab-c760-4a53-992a-9eafc6f72d48">
      <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.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]"
         id="tmp-r-21f8b09f-bce8-4293-b6ac-2e023d892308">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="string(@typeCode)=('HLD')">(HeaderParticipantVersicherung): Der Wert von @typeCode MUSS 'HLD' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.6'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.6']/@nullFlavor)">(HeaderParticipantVersicherung): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.6'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="count(hl7:time)&lt;=1">(HeaderParticipantVersicherung): Element hl7:time 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantVersicherung): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantVersicherung): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.6']
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.6']"
         id="tmp-r-0cfcd5ad-ac09-4f9e-be7d-3203fae20f8d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.6')">(HeaderParticipantVersicherung): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.6' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:time
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:time"
         id="tmp-r-abb7e36c-7694-4d3c-a183-445e79c7d6b6">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity"
         id="tmp-r-d2565c5a-059e-477e-a3e9-10f32a966169">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="string(@classCode)=('POLHOLD')">(HeaderParticipantVersicherung): Der Wert von @classCode MUSS 'POLHOLD' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="hl7:code/@code!='FAMDEP' or count(hl7:associatedPerson)=1">(HeaderParticipantVersicherung): Wenn das Versicherungsverhältnis "familienversichert" ist, dann muss eine associatedPerson angegeben sein</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="count(hl7:code)&lt;=1">(HeaderParticipantVersicherung): Element hl7: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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:associatedPerson)&lt;=1">(HeaderParticipantVersicherung): Element hl7:associatedPerson 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&gt;=1 ">(HeaderParticipantVersicherung): Element hl7:scopingOrganization ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantVersicherung): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:id[@root='1.2.40.0.10.1.4.3.1']
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:id[@root='1.2.40.0.10.1.4.3.1']"
         id="tmp-r-341e5504-58a2-462c-a8ec-6799e0988b8e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.10.1.4.3.1')">(HeaderParticipantVersicherung): Der Wert von @root MUSS '1.2.40.0.10.1.4.3.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:code
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:code"
         id="tmp-r-b8b8f582-dcff-4af0-bdea-f333b075980d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.9-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderParticipantVersicherung): Der Elementinhalt MUSS einer von 'ELGA_InsuredAssocEntity (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.9-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.1.1.6-2013-10-16T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderParticipantVersicherung): 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_InsuredAssocEntity (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:addr
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:addr"
         id="tmp-r-dee0608c-2d23-4081-b45a-00c3d8a8ae09">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:telecom
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:telecom"
         id="tmp-r-57916c82-582f-46da-823d-39492984f5b3">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.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)">(HeaderParticipantVersicherung): 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.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:associatedPerson
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:associatedPerson"
         id="tmp-r-d24414b2-99eb-441a-b5ee-7803b7e793e1">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="string(@classCode)=('PSN') or not(@classCode)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantVersicherung): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:associatedPerson/hl7:name"
         id="tmp-r-bb0472e8-b2ca-49bd-ab40-e8f350dbeb01">
      <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.1.1.6
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantVersicherung)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-72edf5cd-07f5-4784-be4a-eda7a2f8ad28">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.6-2013-10-16T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantVersicherung): 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.1.1.6-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantVersicherung): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-3549425b-7349-452b-8d88-b68590043f96">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-45f8ed98-324b-45f8-b6e0-ee738b52aaaf">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-1b7d38bb-e5c6-401d-899c-ffe6c81e2b7e">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-4f6610bb-5a3a-47c5-8778-6e2b31a43372">
      <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.1.1.7
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]
Item: (HeaderParticipantBetreuorg)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]"
         id="tmp-r-21b6f09a-2bbd-4c64-8eb0-2c6071656a69">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="string(@typeCode)=('IND')">(HeaderParticipantBetreuorg): Der Wert von @typeCode MUSS 'IND' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.2.40.0.34.11.1.1.7'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1.1.7']/@nullFlavor)">(HeaderParticipantBetreuorg): Element hl7:templateId[@root='1.2.40.0.34.11.1.1.7'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&gt;=1 and not(hl7:associatedEntity/@nullFlavor)">(HeaderParticipantBetreuorg): Element hl7:associatedEntity ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="count(hl7:associatedEntity)&lt;=1">(HeaderParticipantBetreuorg): Element hl7:associatedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.7
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.7']
Item: (HeaderParticipantBetreuorg)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:templateId[@root='1.2.40.0.34.11.1.1.7']"
         id="tmp-r-ca6a7898-c67f-4fc1-9913-5eef26a83c8b">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.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)">(HeaderParticipantBetreuorg): 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.1.1.7-2013-10-16T000000.html"
              test="string(@root)=('1.2.40.0.34.11.1.1.7')">(HeaderParticipantBetreuorg): Der Wert von @root MUSS '1.2.40.0.34.11.1.1.7' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.7
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity
Item: (HeaderParticipantBetreuorg)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity"
         id="tmp-r-313cd9db-a500-4ad7-9116-58a82403ca5e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="string(@classCode)=('CAREGIVER')">(HeaderParticipantBetreuorg): Der Wert von @classCode MUSS 'CAREGIVER' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&gt;=1 and not(hl7:scopingOrganization/@nullFlavor)">(HeaderParticipantBetreuorg): Element hl7:scopingOrganization ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="count(hl7:scopingOrganization)&lt;=1">(HeaderParticipantBetreuorg): Element hl7:scopingOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.1.7
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization
Item: (HeaderParticipantBetreuorg)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization"
         id="tmp-r-4ebd2f76-7535-421f-96ad-0f8cbe42edd3">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.1.7-2013-10-16T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(HeaderParticipantBetreuorg): 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.1.1.7-2013-10-16T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(HeaderParticipantBetreuorg): 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.1.1.7-2013-10-16T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(HeaderParticipantBetreuorg): 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.1.1.7-2013-10-16T000000.html"
              test="count(hl7:name)&lt;=1">(HeaderParticipantBetreuorg): 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.1.1.7-2013-10-16T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderParticipantBetreuorg): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:id"
         id="tmp-r-71e46df5-709e-43e2-8d20-9f4852c8aaf0">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:name"
         id="tmp-r-d715a160-35e7-454c-b5a2-d5f2538ae683">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:telecom"
         id="tmp-r-a971be39-2970-4c2f-b67d-555e58066b78">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]/hl7:associatedEntity/hl7:scopingOrganization/hl7:addr"
         id="tmp-r-15126510-0fe8-4385-a46c-c8b3fc8e2942">
      <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.20009
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf
Item: (HeaderInFulfillmentOf)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf"
         id="tmp-r-6f4f1897-70e6-4bf0-9355-959d665b071a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-2011-12-19T000000.html"
              test="string(@typeCode)=('FLFS')">(HeaderInFulfillmentOf): Der Wert von @typeCode MUSS 'FLFS' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-2011-12-19T000000.html"
              test="count(hl7:order)&gt;=1 and not(hl7:order/@nullFlavor)">(HeaderInFulfillmentOf): Element hl7:order ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-2011-12-19T000000.html"
              test="count(hl7:order)&lt;=1">(HeaderInFulfillmentOf): Element hl7:order kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20009
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf/hl7:order
Item: (HeaderInFulfillmentOf)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf/hl7:order"
         id="tmp-r-f3d9e181-f55d-474b-8327-26f0fe881dd4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-2011-12-19T000000.html"
              test="string(@classCode)=('ACT')">(HeaderInFulfillmentOf): 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.20009-2011-12-19T000000.html"
              test="string(@moodCode)=('RQO')">(HeaderInFulfillmentOf): Der Wert von @moodCode MUSS 'RQO' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-2011-12-19T000000.html"
              test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(HeaderInFulfillmentOf): 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.20009-2011-12-19T000000.html"
              test="count(hl7:id)&lt;=1">(HeaderInFulfillmentOf): Element hl7:id kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20009
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf/hl7:order/hl7:id
Item: (HeaderInFulfillmentOf)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:inFulfillmentOf/hl7:order/hl7:id"
         id="tmp-r-0f95a7be-c4ef-47d1-8fea-2b6c19776ea8">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20009-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)">(HeaderInFulfillmentOf): 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.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]"
         id="tmp-r-61d9c9c0-856a-4638-ab8d-33c197fce30e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']])&gt;=1 and not(hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']] kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]"
         id="tmp-r-b87589f6-8ee3-4b94-9e93-b9495f282e2a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:code[@codeSystem='1.2.40.0.34.5.38'])&gt;=1 and not(hl7:code[@codeSystem='1.2.40.0.34.5.38']/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:code[@codeSystem='1.2.40.0.34.5.38'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:code[@codeSystem='1.2.40.0.34.5.38'])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:code[@codeSystem='1.2.40.0.34.5.38'] 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.5-2013-10-16T000000.html"
              test="count(hl7:effectiveTime)&gt;=1 and not(hl7:effectiveTime/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:effectiveTime ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:code[@codeSystem='1.2.40.0.34.5.38']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:code[@codeSystem='1.2.40.0.34.5.38']"
         id="tmp-r-b2b63471-b68d-4515-b2c2-eeec8c002a24">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="@nullFlavor or (@codeSystem='1.2.40.0.34.5.38')">(BefundBildgebendeDiagnostik): Der Elementinhalt MUSS einer von 'codeSystem '1.2.40.0.34.5.38'' sein.</assert>
      <let name="appc1" value="tokenize(@code, '\.')[1]"/>
      <let name="appc2" value="tokenize(@code, '\.')[2]"/>
      <let name="appc3" value="tokenize(@code, '\.')[3]"/>
      <let name="appc4" value="tokenize(@code, '\.')[4]"/>
      <let name="appc1ok"
           value="concat(exists(document('include/voc-1.2.40.0.34.10.62-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $appc1][@codeSystem = '1.2.40.0.34.5.38.1']]), '')"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="@nullFlavor or contains($appc1ok,'true')">(BefundBildgebendeDiagnostik): Code Achse 1: APPC Modalitaet muss aus dem Value Set APPCModalitaet 1.2.40.0.34.10.62 stammen.</assert>
      <let name="appc2ok"
           value="concat(exists(document('include/voc-1.2.40.0.34.10.63-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $appc2][@codeSystem = '1.2.40.0.34.5.38.2']]), '')"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="@nullFlavor or contains($appc2ok,'true')">(BefundBildgebendeDiagnostik): Code Achse 2: APPC Lateralitaet muss aus dem Value Set APPCLateralitaet 1.2.40.0.34.10.63 stammen.</assert>
      <let name="appc3ok"
           value="concat(exists(document('include/voc-1.2.40.0.34.10.64-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $appc3][@codeSystem = '1.2.40.0.34.5.38.3']]), '')"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="@nullFlavor or contains($appc3ok,'true')">(BefundBildgebendeDiagnostik): Code Achse 3: APPC Prozeduren muss aus dem Value Set APPCProzeduren 1.2.40.0.34.10.64 stammen.</assert>
      <let name="appc4ok"
           value="concat(exists(document('include/voc-1.2.40.0.34.10.65-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $appc4][@codeSystem = '1.2.40.0.34.5.38.4']]), '')"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="@nullFlavor or contains($appc4ok,'true')">(BefundBildgebendeDiagnostik): Code Achse 4: APPC Anatomie muss aus dem Value Set APPCAnatomie 1.2.40.0.34.10.65 stammen.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime"
         id="tmp-r-4380743a-4a8c-4075-8e58-5ca996e3ea79">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:low)&gt;=1 and not(hl7:low/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:low ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:low)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:low 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.5-2013-10-16T000000.html"
              test="count(hl7:high)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:high kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime/hl7:low
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime/hl7:low"
         id="tmp-r-0a4f5ba7-4fbb-411f-a00e-440f82e09a87">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime/hl7:high
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:effectiveTime/hl7:high"
         id="tmp-r-515daaf2-d401-4e6a-bf87-2dc2ee89d4e8">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.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)">(BefundBildgebendeDiagnostik): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']"
         id="tmp-r-763cdeef-2367-4f01-a592-8533591f1cdf">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7'])&gt;=1 and not(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7']/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7'] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7'])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7'] kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7']
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/hl7:serviceEvent[hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']]/hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']/hl7:templateId[@root='1.3.6.1.4.1.19376.1.3.3.1.7']"
         id="tmp-r-aaeab413-09be-43ad-b219-86ae662e7287">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@root)=('1.3.6.1.4.1.19376.1.3.3.1.7')">(BefundBildgebendeDiagnostik): Der Wert von @root MUSS '1.3.6.1.4.1.19376.1.3.3.1.7' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20011
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument
Item: (HeaderRelatedDocument)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument"
         id="tmp-r-1e35b5e4-de67-4694-8ba7-dfbb34fceae7">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.html"
              test="string(@typeCode)=('RPLC')">(HeaderRelatedDocument): Der Wert von @typeCode MUSS 'RPLC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.html"
              test="count(hl7:parentDocument)&gt;=1 and not(hl7:parentDocument/@nullFlavor)">(HeaderRelatedDocument): Element hl7:parentDocument ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.html"
              test="count(hl7:parentDocument)&lt;=1">(HeaderRelatedDocument): Element hl7:parentDocument kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20011
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument/hl7:parentDocument
Item: (HeaderRelatedDocument)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument/hl7:parentDocument"
         id="tmp-r-480e88bd-baa5-41d7-95ab-0c799d74f33f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.html"
              test="string(@classCode)=('DOCCLIN') or not(@classCode)">(HeaderRelatedDocument): Der Wert von @classCode MUSS 'DOCCLIN' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.html"
              test="string(@moodCode)=('EVN') or not(@moodCode)">(HeaderRelatedDocument): 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.20011-2014-12-06T000000.html"
              test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(HeaderRelatedDocument): 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.20011-2014-12-06T000000.html"
              test="count(hl7:id)&lt;=1">(HeaderRelatedDocument): Element hl7:id kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20011
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument/hl7:parentDocument/hl7:id
Item: (HeaderRelatedDocument)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:relatedDocument/hl7:parentDocument/hl7:id"
         id="tmp-r-db647757-75db-4562-91f8-e71d01125ea1">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20011-2014-12-06T000000.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)">(HeaderRelatedDocument): 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.20012
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:authorization
Item: (HeaderAuthorization)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]"
         id="tmp-r-1c55c433-0ceb-414b-b676-74b6fb06c063">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&gt;=1 ">(HeaderEncompassingEncounter): Element hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@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.20013-2011-12-19T000000.html"
              test="count(hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]])&lt;=1">(HeaderEncompassingEncounter): Element hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-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.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]"
         id="tmp-r-78c13570-e495-44b3-8149-2d39d750920e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="string(@classCode)=('ENC') or not(@classCode)">(HeaderEncompassingEncounter): Der Wert von @classCode MUSS 'ENC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="string(@moodCode)=('EVN') or not(@moodCode)">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:id)&lt;=1">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(HeaderEncompassingEncounter): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-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.20013-2011-12-19T000000.html"
              test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(HeaderEncompassingEncounter): Element hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-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.20013-2011-12-19T000000.html"
              test="count(hl7:effectiveTime)&gt;=1 and not(hl7:effectiveTime/@nullFlavor)">(HeaderEncompassingEncounter): Element hl7:effectiveTime ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:effectiveTime)&lt;=1">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:responsibleParty)&lt;=1">(HeaderEncompassingEncounter): Element hl7:responsibleParty 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.20013-2011-12-19T000000.html"
              test="count(hl7:location)&gt;=1 and not(hl7:location/@nullFlavor)">(HeaderEncompassingEncounter): Element hl7:location ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:location)&lt;=1">(HeaderEncompassingEncounter): Element hl7:location kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:id
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:id"
         id="tmp-r-5a083d6f-a806-4518-a161-1172c8dc4219">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-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)">(HeaderEncompassingEncounter): 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.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]"
         id="tmp-r-9ab6ac67-385a-47cf-a4b0-bcb3d6de6143">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.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)">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(HeaderEncompassingEncounter): Der Elementinhalt MUSS einer von 'ELGA_ActEncounterCode (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound"
           value="exists(doc('include/voc-1.2.40.0.34.10.5-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.20013-2011-12-19T000000.html"
              test="not(@nullFlavor) or $validNullFlavorsFound">(HeaderEncompassingEncounter): 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_ActEncounterCode (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime"
         id="tmp-r-475a39cb-7868-49e6-b29e-676bf77e3bb4">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.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)">(HeaderEncompassingEncounter): 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"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:low)&gt;=1 ">(HeaderEncompassingEncounter): Element hl7:low ist required [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:low)&lt;=1">(HeaderEncompassingEncounter): Element hl7:low 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.20013-2011-12-19T000000.html"
              test="count(hl7:high)&lt;=1">(HeaderEncompassingEncounter): Element hl7:high kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime/hl7:low
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime/hl7:low"
         id="tmp-r-3542849a-5d07-4ac2-87d3-b1835dc29d7e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.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)">(HeaderEncompassingEncounter): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime/hl7:high
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:effectiveTime/hl7:high"
         id="tmp-r-81360425-60df-4b93-9c5e-df92c8bd3416">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.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)">(HeaderEncompassingEncounter): 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.DATE.MIN"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty"
         id="tmp-r-c848d2a8-01b1-48b5-bec9-d3ac8d0c7ade">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&gt;=1 and not(hl7:assignedEntity/@nullFlavor)">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:assignedEntity)&lt;=1">(HeaderEncompassingEncounter): Element hl7:assignedEntity kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.20013
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity
Item: (HeaderEncompassingEncounter)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity"
         id="tmp-r-646e149f-aec1-45da-9f15-70161e765e5f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.20013-2011-12-19T000000.html"
              test="count(hl7:id)&gt;=1 ">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:addr)&lt;=1">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:assignedPerson)&lt;=1">(HeaderEncompassingEncounter): 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.20013-2011-12-19T000000.html"
              test="count(hl7:representedOrganization)&lt;=1">(HeaderEncompassingEncounter): 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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:id"
         id="tmp-r-0695f149-792f-493a-b395-f44703bd9a11">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:addr"
         id="tmp-r-2f9f1aa5-4a40-4a37-9068-184a66de4705">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:telecom"
         id="tmp-r-72c59a4b-1156-4aee-a773-255324529d52">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:assignedPerson"
         id="tmp-r-e85efd0b-ed01-4e5c-aaa6-1c37899d1789">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:assignedPerson/hl7:name"
         id="tmp-r-39ce8322-1835-48b3-8825-720b107dd133">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization"
         id="tmp-r-feff11d9-0f0b-4918-b348-c45b11207d6d">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:id"
         id="tmp-r-ab34c405-46da-4c66-9655-5d372861b587">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:name"
         id="tmp-r-7220a086-a11f-4dd0-969c-ae14daffe000">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom"
         id="tmp-r-08679312-c4f6-4723-a49f-70a1d49e53fe">
      <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:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:responsibleParty/hl7:assignedEntity/hl7:representedOrganization/hl7:addr"
         id="tmp-r-16a31819-3f69-4557-b26d-4c838647b5a7">
      <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.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location"
         id="tmp-r-4dedfed1-ab51-4964-a411-18d218669780">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="string(@typeCode)=('LOC') or not(@typeCode)">(EncounterLocation): Der Wert von @typeCode MUSS 'LOC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:healthCareFacility)&gt;=1 and not(hl7:healthCareFacility/@nullFlavor)">(EncounterLocation): Element hl7:healthCareFacility ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:healthCareFacility)&lt;=1">(EncounterLocation): Element hl7:healthCareFacility kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility"
         id="tmp-r-9a581266-d7ac-47f4-90d8-e9fdbdb61340">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="string(@classCode)=('SDLOC') or not(@classCode)">(EncounterLocation): Der Wert von @classCode MUSS 'SDLOC' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:serviceProviderOrganization)&gt;=1 and not(hl7:serviceProviderOrganization/@nullFlavor)">(EncounterLocation): Element hl7:serviceProviderOrganization ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:serviceProviderOrganization)&lt;=1">(EncounterLocation): Element hl7:serviceProviderOrganization kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization"
         id="tmp-r-81f3c796-cb3e-4344-8584-3d8ac159456a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="string(@classCode)=('ORG') or not(@classCode)">(EncounterLocation): 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.90006-2014-01-05T000000.html"
              test="string(@determinerCode)=('INSTANCE') or not(@determinerCode)">(EncounterLocation): 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.90006-2014-01-05T000000.html"
              test="count(hl7:id)&gt;=1 ">(EncounterLocation): 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.90006-2014-01-05T000000.html"
              test="count(hl7:name)&gt;=1 and not(hl7:name/@nullFlavor)">(EncounterLocation): 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.90006-2014-01-05T000000.html"
              test="count(hl7:name)&lt;=1">(EncounterLocation): 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.90006-2014-01-05T000000.html"
              test="count(hl7:telecom)&gt;=1 and not(hl7:telecom/@nullFlavor)">(EncounterLocation): Element hl7:telecom ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:addr)&gt;=1 and not(hl7:addr/@nullFlavor)">(EncounterLocation): Element hl7:addr ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.html"
              test="count(hl7:addr)&lt;=1">(EncounterLocation): Element hl7:addr kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:id
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:id"
         id="tmp-r-b6c2b2d2-3b11-4dd9-9fb1-ba2e1c034d2c">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.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)">(EncounterLocation): 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.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:name
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:name"
         id="tmp-r-24961ddd-162e-4a80-ae67-1d4fdb14504f">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.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)">(EncounterLocation): 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.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:telecom
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:telecom"
         id="tmp-r-cd27aec5-29ce-43fa-8eb7-53dced383037">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.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)">(EncounterLocation): 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.90006
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:addr
Item: (EncounterLocation)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]]/hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]/hl7:location/hl7:healthCareFacility/hl7:serviceProviderOrganization/hl7:addr"
         id="tmp-r-53f289a6-a877-4591-990c-d033a4378f82">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.90006-2014-01-05T000000.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)">(EncounterLocation): 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.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component"
         id="tmp-r-ca6da8c8-c85f-4f02-84de-1fc062d0daaa">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody
Item: (BefundBildgebendeDiagnostik)
-->

   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody"
         id="tmp-r-683dd26f-6545-4727-b308-262018c8b156">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@classCode)=('DOCBODY') or not(@classCode)">(BefundBildgebendeDiagnostik): Der Wert von @classCode MUSS 'DOCBODY' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@moodCode)=('EVN') or not(@moodCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']])&gt;=1 and not(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']])&gt;=1 and not(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']])&gt;=1 and not(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']] ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']] 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.5-2013-10-16T000000.html"
              test="count(hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:component[hl7:section[hl7:code[(@code='55113-5' 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.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]
Item: (BefundBildgebendeDiagnostik)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' 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.5-2013-10-16T000000.html"
              test="string(@typeCode)=('COMP') or not(@typeCode)">(BefundBildgebendeDiagnostik): 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.5-2013-10-16T000000.html"
              test="string(@contextConductionInd)=('true') or not(@contextConductionInd)">(BefundBildgebendeDiagnostik): Der Wert von @contextConductionInd MUSS 'true' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.90005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]
Item: (Schluesselbilder)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.90005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]
Item: (Schluesselbilder)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' 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.5.2.90005-2013-10-16T000000.html"
              test="string(@classCode)=('DOCSECT') or not(@classCode)">(Schluesselbilder): Der Wert von @classCode MUSS 'DOCSECT' sein.</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Schluesselbilder): Element hl7:code[(@code='55113-5' 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.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Schluesselbilder): Element hl7:code[(@code='55113-5' 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.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Schluesselbilder): Element hl7:title ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:title)&lt;=1">(Schluesselbilder): 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.2.40.0.34.11.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Schluesselbilder): Element hl7:text ist mandatory [min 1x].</assert>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.html"
              test="count(hl7:text)&lt;=1">(Schluesselbilder): Element hl7:text kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.90005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Schluesselbilder)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:code[(@code='55113-5' 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.5.2.90005-2013-10-16T000000.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)">(Schluesselbilder): 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.5.2.90005-2013-10-16T000000.html"
              test="@nullFlavor or (@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')">(Schluesselbilder): Der Elementinhalt MUSS einer von 'code '55113-5' codeSystem '2.16.840.1.113883.6.1'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.90005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:title
Item: (Schluesselbilder)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:title">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.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)">(Schluesselbilder): 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"/>
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.html"
              test="text()='Schlüsselbilder'">(Schluesselbilder): Der Elementinhalt von 'hl7:title' MUSS ''Schlüsselbilder'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.90005
Context: *[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:text
Item: (Schluesselbilder)
-->
   <rule context="*[hl7:templateId/@root='1.2.40.0.34.11.5']/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]/hl7:text">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.90005-2013-10-16T000000.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)">(Schluesselbilder): 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>
</pattern>
