<?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-2014-11-20T000000">
   <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-8db0744b-b0f4-48be-a185-d16af43ae26c">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-3dc7ab5c-0753-421d-9db4-26e8fac5a6df">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-b524086f-4ba1-4090-a823-be7200991024">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-7448c0c0-c5fe-4381-8db0-1e1cd055fca9">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-befc3ed3-0c85-4841-8121-ad931697092d">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-230e5d07-7657-4bd4-8a5a-6b21cd97bd4e">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-68226163-c8d3-46d8-af41-2c18c3974daf">
      <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-1ec5f372-bd90-4630-ab7e-08cbc9c02577">
      <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-6d94aeb2-7661-4071-b86b-afa998ddeadb">
      <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-6e55ec95-3987-4157-a67c-db9afc04373f">
      <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-ccb136de-386a-4b69-93eb-ce57e1baed3d">
      <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-6bcecfb0-335c-4b22-a54e-9199158fd097">
      <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-3c1e1904-4e97-4607-bb80-c105a3b6383e">
      <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-57dc26db-6082-4947-b515-395846ea379c">
      <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-edb5d571-148f-4342-9595-a02c93f7d9b8">
      <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-441df1c8-96ab-4b19-8d1c-3e9c313e884e">
      <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-2c5c5807-9a7e-4558-8427-59e0c2dcedba">
      <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-1f277e47-a413-44a7-b6d9-59683fd1dec5">
      <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-efe09e2c-c266-4890-96e7-7f25676d4ad2">
      <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-e5294308-2ef6-44b6-a2fd-b43d46670f70">
      <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-c1073141-fb6e-4075-948d-53635f678433">
      <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-13e9eea6-3854-4d29-bd0b-9e146b68ed3f">
      <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-2090120e-3cc5-475a-bd95-9f35c6c6840b">
      <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-cef1327f-7e10-4d2f-84a0-ccc01a7a8b6d">
      <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-c545fc8b-7939-47a9-9be9-3029470b6709">
      <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-703dfc3c-cea5-47cf-b991-c6277c6e0ca2">
      <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-ca270719-339d-41f1-8f65-7cd20a42d1b2">
      <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-3fef0c2c-e558-49fd-b0cf-02eab08e5313">
      <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-c26eb551-471c-4e44-b2c0-175bc4e5398a">
      <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-8315b934-a8c0-459c-ac0c-4a7222c524f3">
      <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-5143a79c-57a1-4ce5-aeb6-0c89b9fff640">
      <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-b70becbf-bbe1-44f9-bd7c-9af6ea6e6547">
      <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-10387301-2c61-4da8-b9ee-73b5d933737f">
      <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-3cf1c2b5-36df-4313-a2e4-a642e3b4c336">
      <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-1d84c77e-0979-4ad6-96d1-0e14a8ce3bcf">
      <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-ce4cf01b-b531-47f8-b324-a9872335f5b9">
      <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-f09cf5d6-7b95-41d1-b710-c8dd24d1f7dd">
      <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-8ef7030e-3df5-4f8c-8777-fb4e1681dd0c">
      <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-cc592452-76a6-4cbf-a9d8-b180fc189053">
      <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-97308a61-a2ef-4e1d-9b11-929bfb59fce2">
      <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-8a9d6401-0a7c-48b8-b027-f5d14b9aa36f">
      <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-08b11737-bad2-4a4d-bfcf-515c262ab135">
      <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-352c3277-004a-48df-9a77-42922ea00ecb">
      <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-91e0a594-d066-4217-a58d-c11e285daeaf">
      <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-dd6d91ee-f384-49b5-ad91-66a9bc2281c1">
      <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-b27bec77-8c0d-4fb3-b4ae-e3979b1f6c41">
      <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-1a9d254d-89c6-4794-94a1-1ce5db8a064b">
      <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-78e7816c-d8ca-48ba-ab43-c5ee3718695b">
      <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-a9f46801-5753-4fa7-a451-090b510f2dcd">
      <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-465c597c-243b-44ec-b44e-fff7e2490ff3">
      <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-64f86f25-e746-4044-be1e-863e87178de1">
      <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-f5dd7333-bfb9-43ce-aa52-210bbd6d9031">
      <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-3af97dd5-b25e-4d89-a564-7c31f03b23f4">
      <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-029ebca0-3055-4972-957a-3006e9e06a4c">
      <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-3fa2bbd3-f903-4195-8aac-ec8b92e9f93e">
      <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-bfaeed31-54d2-4529-90cb-868f42b3f347">
      <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-ff621012-dc13-495f-a7d3-deedb268e378">
      <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-e4ba5229-e498-4bdd-8a76-e4245c0242a3">
      <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-ac98eaa2-0f3e-4e75-911c-eaf490019eab">
      <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-d470237b-c44d-4ac3-81bc-eca4ea3d1770">
      <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-e7a713e0-f03f-4e40-8a62-22cd61b9fc93">
      <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-b42b91cf-593f-4c5a-bf6f-3e20bdd9d158">
      <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-86f29756-ea65-41ff-b275-fada66e2b1b8">
      <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-7ed35972-4243-4002-ac8d-beeae300ce5b">
      <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-fcca56de-61ef-4390-a2ce-e689172cf701">
      <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-39d0a4b8-4196-42f1-8b9e-38ca21ed412e">
      <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-622d7b76-aa6d-4444-8421-5ae645455452">
      <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-73ffc009-a290-4521-81ad-753c60a1a6ae">
      <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-89cf04aa-51bb-45aa-ab75-c1ae24dabb24">
      <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-14a4f3ec-a5d8-447b-a39e-6112dbb9776c">
      <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-95718609-3586-4d2b-807f-afd4a72a4147">
      <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-fb3d3450-f6ad-4bcd-b8b7-b4551f151a83">
      <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-570769c2-76ea-4d26-b7e3-c6a3c9500e3d">
      <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-c8c27d78-e5ce-4b51-ab79-02b7d9f4aecf">
      <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-51bd7e9e-713e-40bc-80aa-3cde4b798109">
      <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-0ab6abfe-b9e8-479a-b48e-d0a4b6f701c7">
      <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-16668fb8-a9fb-4af6-8b82-86ba55429f34">
      <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-47819816-de8a-40e2-b8e0-643ad0d531cb">
      <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-70dbbac0-64f3-46a3-a4b4-f08954ce560c">
      <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-f542e95b-c0be-46d4-be6b-0cc15d8fc43b">
      <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-e68bb621-4e8c-4f05-8838-755e436b3a1c">
      <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-e9a6f7dc-6752-4459-93b0-b65b12db62e9">
      <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-f98d90bd-dc9d-4824-93e4-694bc650c1d8">
      <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-efdef3a2-c543-4563-aafd-a04d22fdc2da">
      <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-36203e51-958e-4c50-9478-d035d63de47b">
      <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-e6846044-798f-4682-827a-360241af2676">
      <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-c8e33a39-d870-4269-9f81-e7ba6680f135">
      <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-52605652-970b-427c-9b07-b0e720b8bdf6">
      <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-f7ce9567-194c-4211-9e8a-99d69bc4c231">
      <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-d983bb88-495f-42b3-a2e8-06f869aa2fb3">
      <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-a93aa0a5-ea95-49bb-ae2e-cc0606732883">
      <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-da925190-adb8-400a-8854-1f3ae8c6f774">
      <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-edf755e3-5dac-4a10-8636-6e2b43b31a77">
      <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-ef4abafb-bc21-4de3-9c93-6d03577b8a44">
      <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-fe3471b4-68b9-45c6-9639-41d03154e379">
      <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-12b2b8db-c348-44d0-b042-1852fcdad2ea">
      <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-fb904930-d0e0-499b-8b79-e030d13b8032">
      <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-5a091d0c-25e4-49d9-90d4-309a2231c084">
      <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-f66a122d-a53e-45ed-8320-f569a801774e">
      <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-06925d5f-8715-4734-8ee2-278ddf1f7a0f">
      <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-41728ea0-6e30-4d0a-880e-922e092a12d1">
      <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-ff0758e0-03a8-469c-87dc-7ce50ee31803">
      <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-f3803627-2237-4405-aa0c-af8a5aff8b05">
      <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-fb1a9d16-a156-4016-a24a-8d6f07172ef9">
      <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-3b37407d-38af-4218-ad56-897d9e3a0b9c">
      <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-c7edaa25-81bb-4bd5-b4a8-2cc34067e0b9">
      <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-5421712b-e469-4fab-a2bb-305d48a2f030">
      <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-f1c686fe-8717-4ef7-936e-e4f3b60a5a05">
      <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-3155ffbb-a67f-4011-96a6-481a351323ba">
      <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-9b578a31-3e6f-41c9-86f1-e532db3b0503">
      <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-2d7cb030-8498-4b6c-b4d7-2d8d269d7469">
      <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-7af733a9-fe2b-4db9-a48f-c078aaaf8153">
      <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-33f0103f-b551-4371-a1e6-d3d3b2b463da">
      <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-06162acc-4c67-46cc-873c-1f5205ffde86">
      <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-1ca7ebc0-0188-42b5-b94e-e021c90aaddf">
      <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-64bc3224-c3d7-45df-9e8c-3ebed834146e">
      <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-0b153070-b2b9-4aa4-8213-21562ca91775">
      <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-4e0f7e28-44f6-477a-85e2-985783ff1497">
      <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-3dd41e60-dee6-4255-accc-a48eabbf2db0">
      <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-807f9965-0b09-427f-941b-5efcb6f767d8">
      <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-927077aa-976f-469c-a0e6-bb4fcdde80dd">
      <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-1038bbba-e736-4ec6-8c88-2a84d369c026">
      <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-bd664555-0b9c-48e4-9fc1-126e58f99423">
      <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-cefc3949-883d-4fa3-815f-45f78eab2752">
      <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-0075f033-6cc9-4eba-b8ec-04f6e6b52f2b">
      <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-5cd7feb0-319e-42f5-b051-7da9199dbd36">
      <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-d6c12e77-49d8-41ed-a162-85be544f2d5e">
      <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-5efe4556-de7f-43a0-9e10-b3941708f10b">
      <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-8d75a55a-260e-44fc-9200-81e5713d2af6">
      <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-4fa62ce5-aba1-4ee5-9d03-f13e4bddb6d8">
      <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-923452ee-12ba-49b5-a3ff-bdf37f6b0104">
      <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-d8d4e58a-61f4-49ed-8bb1-569eab4c0547">
      <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-a1f79d19-c689-4a21-aa9a-9153e9796adf">
      <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-3cfd0961-2e3d-4932-8720-5bc910fb9ea4">
      <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-06a42dde-31e5-4dfe-aa17-5375d149ac5f">
      <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-d2c1850a-73c9-421a-aa0a-86fd2e317e5b">
      <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-2f7879de-e040-432b-8c87-cdd04d3c1c09">
      <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-9c2818ba-352c-4b13-a220-e7039720a100">
      <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-471b838c-1bd5-4f8f-83f3-76f1bbf8e992">
      <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-5d6e3ca5-143a-437b-b5e9-2635cc18e639">
      <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-4f6d3092-f07c-435c-b3be-e89c65a9cb26">
      <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-8c9e008f-ee0c-4cff-8d41-3922bd0d20c4">
      <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-ecf50584-02f2-4f79-a586-f0afe285876d">
      <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-d8d9f2e5-d085-4eb4-9446-3204cacdd6ab">
      <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-d623ea45-830e-4fc3-abdc-09ab831c2f47">
      <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-5beb3820-d2b5-441d-9fb0-1783534956b1">
      <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-85f25429-0ca3-46c6-9119-3b651a4aa113">
      <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-7395281a-0f57-43f3-99d2-78b8abd5c2bb">
      <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-a3474d96-f6de-4fb1-be1d-01c009312a7b">
      <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-9bf5e90f-3fa6-4d8b-865c-8abc0ccaec80">
      <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-5f11e312-8e76-4fb8-8cc9-79d2ea2bb187">
      <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-13da07cb-26fb-484c-a83d-bec386738115">
      <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-578c3b14-d4df-4e6e-8b8a-f8b15f642ae7">
      <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-7f5ec491-25e3-4a66-ace5-aab9c7717d30">
      <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-24f804f7-78bf-40c2-848b-b670c5dd60f0">
      <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-006d2981-64b1-4a9b-8dd1-5bf2d0297e72">
      <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-53534302-c29a-4bbf-89ea-709effbc4896">
      <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-5cf09cf0-6272-41d1-acd6-933e44e6ee07">
      <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-1da884af-552d-482c-ada6-da1c42c5fbc4">
      <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-c8879384-af98-4dd7-8b0e-7ba98854a0f9">
      <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-754cf9cd-2bf4-4325-a5ed-a1ee0535c03c">
      <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-7d31c7e5-4b49-487c-a33d-473e913bc210">
      <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-010a081b-842c-47e4-aa04-d1388ae73f19">
      <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-91dc6787-2f2c-42d2-817e-b40f876b7962">
      <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-c49e089b-82c4-433f-8ca6-a64b82c1cd4d">
      <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-e6684799-570c-424e-a830-ca0b727e118d">
      <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-6056d408-7e01-4bc8-93a7-cd10c543ea03">
      <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-30c27394-8679-4527-979f-be2f34bca3ac">
      <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-fe4a5728-e219-4d55-ae94-ba7de51ba9db">
      <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-77c17a97-a426-4c0a-ae94-3da3fbcb8353">
      <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-58f40e59-31c7-4b97-a878-eb75982705b6">
      <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-2d9dd86a-7350-472b-a733-ea652b68e997">
      <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-9bf06e6d-caad-485a-83e9-4e699e3a0408">
      <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-d300141d-36f3-4729-9ad5-223bcf7fd22a">
      <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-47637e88-dd84-4f61-a94f-890774841c4e">
      <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-e55a8a4a-2418-4908-8b87-e892a18716fb">
      <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-aaba779f-203b-40e6-9d5e-dcbd70b0e6f5">
      <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-8dba6aa1-3198-4fc3-b433-9b6d9f285a1f">
      <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-7e7e6180-4daf-4f5b-bc74-df753d71933d">
      <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-052e4c85-2928-4bfb-aad0-4495f725645c">
      <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-bfdc7353-8ee9-47fb-bc7c-cb27d35248cd">
      <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-9a6c35e2-725f-4df4-8ac6-490982514bee">
      <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-344cff9c-64b1-4ce7-ac8f-f40da503e303">
      <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-34c2ad79-ba90-4682-b41c-64ceda44dadb">
      <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-cce9ae7e-783e-4d95-9529-d5eaee23803f">
      <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-4120bdfb-7a51-499e-ba13-804e84d5afca">
      <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-a61d0787-0c25-413a-b48f-41551aecfc9e">
      <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-c5da9331-0591-4897-97a5-e3d24af571f4">
      <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-0ce00f72-ed2e-4e0f-a1a3-3aebe37b7530">
      <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-c2646e01-650d-4b23-a7f6-97706105fd5c">
      <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-4813f834-3577-4bdd-9f28-a22532ace2a9">
      <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-05f759da-bb30-4429-b46a-14f5e782d443">
      <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-9a319072-0990-43b6-b200-6f3c7925024b">
      <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-d06cad0e-252a-4deb-96fb-998d12290d1e">
      <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-07eddda0-c464-41c9-a56f-eba41b39d47b">
      <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-02881a6b-5f60-41ab-b822-55d95663ca73">
      <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-aff1e8c3-d4a6-4f9e-87eb-1afcbde9ab01">
      <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-79a8ab33-49b1-4249-9f98-9b3cb98e0d89">
      <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-a7d7871c-4a35-4b8e-8b91-232bc1ca80e5">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.html"
              test="count(hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']])&gt;=1 and not(hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]/@nullFlavor)">(BefundBildgebendeDiagnostik): Element 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-2014-11-20T000000.html"
              test="count(hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']])&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']] 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: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:code[@codeSystem='1.2.40.0.34.5.38']]"
         id="tmp-r-0b79c5da-3f02-4609-ba88-e726cfa162cb">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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:code[@codeSystem='1.2.40.0.34.5.38']]/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:code[@codeSystem='1.2.40.0.34.5.38']]/hl7:code[@codeSystem='1.2.40.0.34.5.38']"
         id="tmp-r-ff69a548-532b-434b-92c1-a47354b59c18">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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:code[@codeSystem='1.2.40.0.34.5.38']]/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:code[@codeSystem='1.2.40.0.34.5.38']]/hl7:effectiveTime"
         id="tmp-r-074dbf8f-a78e-404d-83bb-bc86ff800aae">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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:code[@codeSystem='1.2.40.0.34.5.38']]/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:code[@codeSystem='1.2.40.0.34.5.38']]/hl7:effectiveTime/hl7:low"
         id="tmp-r-a6cf4f2b-7f38-4d53-aeb0-6dc5d278624c">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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:code[@codeSystem='1.2.40.0.34.5.38']]/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:code[@codeSystem='1.2.40.0.34.5.38']]/hl7:effectiveTime/hl7:high"
         id="tmp-r-d82307cb-cdc6-47f6-b7e1-6e34da75bdeb">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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:code[@codeSystem='1.2.40.0.34.5.38']]/hl7:performer[hl7:templateId/@root='1.3.6.1.4.1.19376.1.3.3.1.7']
Item: (BefundBildgebendeDiagnostik)
-->
   <!--
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-4399d1ed-ae62-4313-8238-5ef62d535f9c">
      <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-9a82559d-d6b9-4ca8-bf50-c644ec32ea12">
      <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-a545edd9-e879-42dd-8878-6eecea96e37a">
      <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-24b0c570-50ad-48e9-979f-5d7026687034">
      <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-1566710b-ed76-4d8d-bad4-ecb63a72b061">
      <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-9e7b0dc9-07e6-44f6-996a-0ecb10b792a2">
      <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-24804c2e-4274-4f11-8dbf-1bd14e6774c6">
      <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-acafa3de-2bf0-4dcf-951b-319d93f2fd89">
      <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-85d67e4c-a382-41f8-af8f-999f2b593336">
      <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-5c334c02-e0fc-4e48-9f82-8a0886031f1e">
      <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-6c926eb2-d593-46ac-902a-b3b94e79dd89">
      <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-004038e8-ada3-4fe0-ab00-bdbc36275630">
      <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-7877f1e0-9f48-45c3-abb7-bcc3a2ac9e3d">
      <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-27aa3933-9667-4113-82d6-860bcbaaec05">
      <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-4d84f3bd-983f-4016-8cf2-1f3d46fd3db8">
      <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-7e5d38fa-4576-4dbe-83a3-2be7d743c8d4">
      <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-57d0b918-110f-4b36-ab5a-dac3c20f4d5f">
      <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-a975e8ab-b7cf-4f34-a45a-4b9a6f345aa6">
      <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-dbb7d20a-b996-4e7c-b5c7-4bfde1265a48">
      <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-b74ad952-7cc5-4e1b-9940-95111e059145">
      <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-bcf05640-bf96-47c3-aa8e-6f189e65bdc4">
      <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-32f51456-73dc-448d-ac57-e26da39288bc">
      <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-4a289286-ce99-4099-8178-f7df693d0499">
      <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-8007a2d1-f088-47e6-a802-43d74818384d">
      <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-d423bb2d-c347-4d00-bd85-27a8a457ba9a">
      <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-e57a4150-78d5-41a0-8a85-15cbade867ed">
      <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-b61356cf-854a-4828-bdeb-7293f994005e">
      <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-d12df2f8-d7a2-42da-91d1-e86bbfa577f7">
      <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-ee9c3c80-3f71-4611-b34a-65659ae57fee">
      <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-5c6248bb-349c-47ac-bd26-86af23751954">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-9374b81b-34a1-4443-87ba-e632afcd163a">
      <assert role="error"
              see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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-2014-11-20T000000.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>
