<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <title> Schematron file for POCD_MT000040DE - ELGA CDA Dokument Befund Bildgebende Diagnostik </title>
   <ns uri="urn:hl7-org:v3" prefix="hl7"/>
   <ns uri="urn:hl7-org:v3" prefix="cda"/>
   <ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/>
   <!-- Add extra namespaces -->
   <ns uri="urn:ihe:pharm:medication" prefix="pharm"/>
   <ns uri="http://www.w3.org/XML/1998/namespace" prefix="xml"/>
   <!-- Include realm specific schematron -->
   <!-- Include datatype abstract schematrons -->
   <pattern>
      <?DSDL_INCLUDE_START include/DTr1_ANY.sch?><rule abstract="true" id="ANY">
    <assert role="error" test="not(descendant-or-self::hl7:*[@nullFlavor]) or           descendant-or-self::hl7:*[           (@nullFlavor and count(@* except (@xsi:type|@xsi:nil|@classCode|@typeCode|@determinerCode|@moodCode|@nullFlavor))=0 and count(*)=0 and not(text()[string-length(normalize-space())&gt;0])) or            ((@nullFlavor='OTH' or @nullFlavor='NA') and (@codeSystem or hl7:originalText or hl7:translation) and count(@* except (@xsi:type|@xsi:nil|@codeSystem|@nullFlavor))=0) or            (@nullFlavor='UNC' and (@extension) and count(@* except (@xsi:type|@xsi:nill|@extension|@nullFlavor))=0)]">dtr1-1-ANY: if there is a nullFlavor, there shall be no text or other attribute or element, unless it's nullFlavor='OTH' or 'NA' (@codeSystem, &lt;originalText&gt; or &lt;translation&gt; may have a value), or nullFlavor 'UNC' (@extension may have a value)</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_ANY.sch?>
      <?DSDL_INCLUDE_START include/DTr1_AD.sch?><rule abstract="true" id="AD">
    <extends rule="ANY"/>
    
    <!-- Test mixed content and empty address parts -->
    <assert role="error" test="@nullFlavor or (count(*)&gt;0 and not(text()[string-length(normalize-space())&gt;0])) or (count(*)=0 and text()[string-length(normalize-space())&gt;0])">dtr1-1-AD: address shall be null or text only or element only (no mixed content)</assert>
    <assert role="error" test="not(@nullFlavor) or (not(hl7:thumbnail) or hl7:useablePeriod/@nullFlavor)">dtr1-2-AD: no useablePeriod if null</assert>
    <assert role="error" test="count(*[self::hl7:useablePeriod][@updateMode])=0">dtr1-3-AD: updateMode shall not be used on address elements</assert>
    
    <assert role="error" test="not(hl7:useablePeriod/hl7:low/@value and hl7:useablePeriod/hl7:high/@value) or          string-length(hl7:useablePeriod/hl7:low/@value) = string-length(hl7:useablePeriod/hl7:high/@value)">dtr1-5-AD: useablePeriod/low/@value must have the same precision as useablePeriod/high/@value</assert>

    <assert role="error" test="not(hl7:useablePeriod/hl7:low/@value and hl7:useablePeriod/hl7:high/@value) or         number(substring(concat(hl7:useablePeriod/hl7:low/@value,'00000000000000'),1,14)) &lt; number(substring(concat(hl7:useablePeriod/hl7:high/@value,'00000000000000'),1,14))">dtr1-6-AD: useablePeriod/low/@value must be before useablePeriod/high/@value</assert>

    <!-- for width only us (microseconds),	ms (milliseconds),	s (seconds), min (minute), h (hours), d (day), wk (week), mo (month) and a (year) are allowed. -->
    <let name="tum" value="'^(us|ms|s|min|h|d|wk|mo|a|)$'"/>
    <assert role="error" test="matches(hl7:useablePeriod/hl7:width/@unit, $tum)">dtr1-7-AD: for useablePeriod/width only us (microseconds), ms (milliseconds), s (seconds), min (minute), h (hours), d (day), wk (week), mo (month) or a (year) are allowed</assert>
    
    <report role="warning" test="*[not(@nullFlavor or self::hl7:useablePeriod)][normalize-space(.)='']">dtr1-8-AD: empty address particles should not be present.</report>
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="value" value="string-join(.//text(),'')"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])">dtr1-9-AD: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    <assert role="error" test="not($set_other[string-join(.//text(),'')=$value])">dtr1-10-AD: [RIM-002] <value-of select="$name"/> (<value-of select="$value"/>) SHALL be distinct</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_AD.sch?>
      <?DSDL_INCLUDE_START include/DTr1_AD.NL.sch?><rule abstract="true" id="AD.NL">
    <extends rule="AD"/>

    <!-- Test formaat postcode -->
    <let name="postalCodeText" value="hl7:postalCode/text()"/>
    <let name="countryCode" value="hl7:country/@code"/>
    <let name="countryCodeSystem" value="hl7:country/@codeSystem"/>
    <let name="countryText" value="upper-case(normalize-space(hl7:country))"/>

    <assert role="error" test="if (@codeSystem='2.16.840.1.113883.2.4.4.15') then (            matches(@code,'^[0-9]{4}[A-Z]{2}$')            ) else ( 1=1 )">dtr1-1-AD.NL: postcodes onder codeSystem
        '2.16.840.1.113883.2.4.4.15' moeten voldoen aan '9999AA'</assert>

    <assert role="error" test="if (hl7:postalCode/text() and (not(hl7:country) or            ($countryCode='NL' and $countryCodeSystem=('2.16.1','1.3.6.1.4.1.1466.115.121.1.11','1.0.3166.1.2.2')) or            ($countryCode='NLD' and $countryCodeSystem='2.16.2') or            ($countryCode='528' and $countryCodeSystem='2.16.3') or            $countryText='NL' or            $countryText='NLD' or            $countryText='NEDERLAND'            ))             then ( matches($postalCodeText,'^[0-9]{4} [A-Z]{2}$'))            else ( 1=1 )">dtr1-2-AD.NL: Nederlandse postcodes in de text-nodes moeten voldoen aan '9999 AA'</assert>

    <let name="illegalAddressPart" value="*[not(self::hl7:delimiter|self::hl7:country|self::hl7:county|self::hl7:city|self::hl7:postalCode|self::hl7:houseNumber|self::hl7:buildingNumberSuffix|self::hl7:streetName|self::hl7:additionalLocator|self::hl7:useablePeriod)]/name()"/>
    <assert role="error" test="empty($illegalAddressPart)">dtr1-3-AD.NL: binnen Nederland mogen alleen delimiter, country, county, city, postalCode, houseNumber,
        buildingNumberSuffix, streetName, additionalLocator en useablePeriod worden gebruikt. Gevonden '<value-of select="$illegalAddressPart"/>'.</assert>

    <let name="illegalCodedAddressPart" value="*[not(self::hl7:postalCode|self::hl7:country|self::hl7:county)][@code]/name()"/>
    <assert role="error" test="empty($illegalCodedAddressPart)">dtr1-4-AD.NL: alleen postalCode, country en county kunnen gecodeerd worden. Gevonden '<value-of select="$illegalCodedAddressPart"/>'</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_AD.NL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_AD.DE.sch?><rule abstract="true" id="AD.DE">
    <extends rule="AD"/>

    <!-- Test formaat postcode -->
    <let name="postalCodeText" value="hl7:postalCode/text()"/>
    <let name="countryCode" value="hl7:country/@code"/>
    <let name="countryCodeSystem" value="hl7:country/@codeSystem"/>
    <let name="countryText" value="upper-case(normalize-space(hl7:country))"/>

    <assert role="error" test="@nullFlavor or matches($postalCodeText,'^[0-9]{5}$')">dtr1-1-AD.DE: Deutsche Postleitzahlen in den Textknoten müssen im Format '99999' sein</assert>

    <let name="illegalAddressPart" value="*[local-name(.)!='delimiter' and local-name(.)!='buildingNumberSuffix' and         local-name(.)!='country' and local-name(.)!='county' and         local-name(.)!='city' and local-name(.)!='postalCode' and         local-name(.)!='houseNumber' and local-name(.)!='streetName' and         local-name(.)!='additionalLocator' and         local-name(.)!='useablePeriod'][1]/name()"/>
    <assert role="error" test="count(*)=0 or string-length($illegalAddressPart)=0">dtr1-2-AD.DE: In Deutschland sind bei Adressen zugelassen: delimiter, country, county, city, postalCode, houseNumber, buildingNumberSuffix, streetName, additionalLocator und useablePeriod. Gefunden '<value-of select="$illegalAddressPart"/>'.</assert>

    <assert role="error" test="count(*)=0 or count(*[not(self::hl7:postalCode) and not(self::hl7:country) and not(self::hl7:county) and @code])=0">dtr1-3-AD.DE: Nur postalCode, country und county können codiert werden. Gefunden '<value-of select="*[not(self::hl7:postalCode) and not(self::hl7:country) and not(self::hl7:county) and @code][1]/name()"/>'</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_AD.DE.sch?>
      <?DSDL_INCLUDE_START include/DTr1_AD.EPSOS.sch?><rule abstract="true" id="AD.EPSOS">
    <extends rule="AD"/>
    
    <assert role="error" test="@nullFlavor or hl7:*">dtr1-1-AD.EPSOS: if addr is not null at least one sub element has to be provided</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_AD.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_BIN.sch?><rule abstract="true" id="BIN">
    <extends rule="ANY"/>

    <assert role="error" test="@nullFlavor or count(*)&gt;0  or text()[string-length(normalize-space())&gt;0]">dtr1-1-BIN: there must be a nullFlavor, or content must be non-empty</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_BIN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_ED.sch?><rule abstract="true" id="ED">
    <extends rule="BIN"/>

    <assert role="error" test="not(@integrityCheck) or @integrityCheckAlgorithm">dtr1-2-ED: integrityCheckAlgorithm required if integrityCheck</assert>
    <assert role="error" test="not(hl7:thumbnail) or hl7:thumbnail[not(@nullFlavor and hl7:reference)]">dtr1-3-ED: thumbnails not null and reference</assert>
    <assert role="error" test="not(hl7:thumbnail) or hl7:thumbnail[not(hl7:thumbnail)]">dtr1-4-ED: thumbnails do not have thumbnails</assert>
    <assert role="error" test="(@compression and (hl7:reference/@value or (@representation='B64' and text()))) or not(@compression)">dtr1-5-ED: compression only on binary</assert>

    <assert role="error" test="not(@value) or (@value and (not(@mediaType) or @mediaType='text/plain'))">dtr1-6-ED: value implies mediaType is text/plain</assert>
    <assert role="error" test="count(*[self::hl7:reference or self::hl7:thumbnail][@validTimeLow or @validTimeHigh or @updateMode])=0">dtr1-7-ED: no history or updateMode</assert>
    <assert role="error" test="not(@value or xml) or not(@charset)">dtr1-8-ED: no charset for value or xml</assert>
    <assert role="error" test="not(hl7:translation) or hl7:thumbnail[not(hl7:translation)]">dtr1-9-ED: no nested translations</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@mediaType))">dtr1-10-ED: no mediaType if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@charset))">dtr1-11-ED: no charset if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@language))">dtr1-12-ED: no language if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@compression))">dtr1-13-ED: no compression if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@integrityCheck))">dtr1-14-ED: no integrityCheck if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@integrityCheckAlgorithm))">dtr1-15-ED: no integrityCheckAlgorithm if null</assert>
    <assert role="error" test="not(@nullFlavor) or (not(hl7:thumbnail) or hl7:thumbnail/@nullFlavor)">dtr1-16-ED: no thumbnail if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(hl7:translation))">dtr1-17-ED: no translation if null</assert>
    
    <!-- http://www.ietf.org/rfc/rfc3066.txt
        Language-Tag = Primary-subtag *( "-" Subtag ) 
        Primary-subtag = 1*8ALPHA 
        Subtag = 1*8(ALPHA / DIGIT)
        
        Primary subtag: 
            - 2/3 letter codes are ISO-639, 
            - value 'i' reserved for IANA registrations, 
            - 'x' reserved for private use, 
            - other values not allowed
        Secondary subtag:
            - 2 letter codes are ISO-3166
            - 3-8 may be registered with IANA,
            - 1 letter not allowed
    -->
    <!--<assert role="error" test="not(@code) or @code castable as xs:language">dtr1-2-CS.LANG: @code SHALL conform to RFC 3066. This usually has format ss-CC with ss for language code (conform ISO-639-1) and optional CC for country code (conform ISO-3166 alpha-2)</assert>-->
    <let name="RFC3066" value="'^[a-z]{2,3}(-[a-z]{2})?|[ix](-[a-z\d]{2,8})+$'"/>
    <let name="RFC3066restricted" value="'^[a-z]{2,3}(-[a-z]{2})?$'"/>
    <assert role="error" test="not(@language) or matches(@language,$RFC3066,'i')">dtr1-18-ED: @language SHALL conform to RFC 3066. This usually has format sss?-CC with sss? for language code (ISO-639-1 / ISO-639-2) and optional CC for country code (conform ISO-3166 alpha-2)</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_ED.sch?>
      <?DSDL_INCLUDE_START include/DTr1_ST.sch?><rule xmlns:xs="http://www.w3.org/2001/XMLSchema" abstract="true" id="ST">
    <extends rule="ED"/>

    <!--<assert role="error" test="not(hl7:translation) or hl7:thumbnail[not(hl7:translation)]">dtr1-1-ST: no nested translations</assert>-->
    
    <!--<assert role="error" test="@nullFlavor or string-length(string-join(text(),''))>0">dtr1-1-ST: null or content</assert>-->
    <assert role="error" test="not(hl7:reference)">dtr1-3-ST: no reference</assert>
    <assert role="error" test="not(hl7:thumbnail)">dtr1-4-ST: no thumbnail</assert>
    
    <assert role="error" test="not(@representation) or @representation='TXT'">dtr1-5-ST: @representation SHALL be 'TXT' if present.</assert>
    <assert role="error" test="not(@mediaType) or @mediaType='text/plain'">dtr1-6-ST: @mediaType SHALL be 'text/plain' if present.</assert>
    <assert role="error" test="not(@compression)">dtr1-7-ST: @compression SHALL NOT be used on ST.</assert>
    <assert role="error" test="not(@integrityCheck)">dtr1-8-ST: @integrityCheck SHALL NOT be used on ST.</assert>
    <assert role="error" test="not(@integrityCheckAlgorithm)">dtr1-8-ST: @integrityCheckAlgorithm SHALL NOT be used on ST.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_ST.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SC.sch?><rule abstract="true" id="SC">
    <extends rule="ST"/>
    
    <!--assert role="error" test="@nullFlavor or @code or (hl7:originalText and not(hl7:originalText/@nullFlavor))">dtr1-1-SC: null or code and/or originalText</assert-->
    <assert role="error" test="@codeSystem or not(@code)">dtr1-2-SC: code requires codeSystem</assert>
    <assert role="error" test="@codeSystem or not(@codeSystemName)">dtr1-3-SC: codeSystemName only if codeSystem</assert>
    <assert role="error" test="@codeSystem or not(@codeSystemVersion)">dtr1-4-SC: codeSystemVersion only if codeSystem</assert>
    <assert role="error" test="@code or not(@displayName)">dtr1-5-SC: displayName only if code</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@code))">dtr1-6-SC: no code if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@displayName))">dtr1-7-SC: no displayName if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SC.sch?>
      <?DSDL_INCLUDE_START include/DTr1_ENXP.sch?><rule abstract="true" id="ENXP">
    <extends rule="ST"/>
</rule><?DSDL_INCLUDE_END include/DTr1_ENXP.sch?>
      <?DSDL_INCLUDE_START include/DTr1_ADXP.sch?><rule abstract="true" id="ADXP">
    <extends rule="ST"/>
    
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="value" value="."/>
    <let name="set_other" value="preceding-sibling::* | following-sibling::*"/>
    <assert role="error" test="not($set_other[.=$value])">dtr1-1-ADXP: [RIM-002] <name/> (<value-of select="$value"/>) SHALL be distinct</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_ADXP.sch?>
      <?DSDL_INCLUDE_START include/DTr1_thumbnail.sch?><rule abstract="true" id="thumbnail">
    <extends rule="ED"/>

    <assert role="error" test="not(@integrityCheck) or @integrityCheckAlgorithm">dtr1-2-thumbnail: integrityCheckAlgorithm required if integrityCheck</assert>
    <assert role="error" test="not(@nullFlavor and hl7:reference)">dtr1-3-thumbnail: no reference if null</assert>
    <assert role="error" test="not(hl7:thumbnail)">dtr1-4-thumbnail: thumbnails do not have thumbnails</assert>
    <assert role="error" test="(@compression and (hl7:reference/@value or (@representation='B64' and text()))) or not(@compression)">dtr1-5-thumbnail: compression only on binary</assert>

    <assert role="error" test="not(@value) or (@value and (not(@mediaType) or @mediaType='text/plain'))">dtr1-6-thumbnail: value implies mediaType is text/plain</assert>
    <assert role="error" test="not(hl7:reference[@validTimeLow or @validTimeHigh or @updateMode])">dtr1-7-thumbnail: no history or updateMode</assert>
    <assert role="error" test="not(@value or xml) or not(@charset)">dtr1-8-thumbnail: no charset for value or xml</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@mediaType))">dtr1-10-thumbnail: no mediaType if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@charset))">dtr1-11-thumbnail: no charset if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@language))">dtr1-12-thumbnail: no language if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@compression))">dtr1-13-thumbnail: no compression if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@integrityCheck))">dtr1-14-thumbnail: no integrityCheck if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@integrityCheckAlgorithm))">dtr1-15-thumbnail: no integrityCheckAlgorithm if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_thumbnail.sch?>
      <?DSDL_INCLUDE_START include/DTr1_BL.sch?><rule abstract="true" id="BL">
    <extends rule="ANY"/>
    <!--
    <assert test="@nullFlavor or (not(@nullFlavor) and @value)">Datatype BL: value or null</assert>
    -->
</rule><?DSDL_INCLUDE_END include/DTr1_BL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_BN.sch?><rule abstract="true" id="BN">
    <extends rule="ANY"/>
    <assert test="not(@nullFlavor)">dtr1-1-BN: cannot have null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_BN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CD.sch?><rule abstract="true" id="CD">
    <extends rule="ANY"/>
    <assert role="error" test="@nullFlavor or @code or (hl7:originalText and not(hl7:originalText/@nullFlavor))">dtr1-1-CD: null or code and/or originalText</assert>
    <assert role="error" test="@codeSystem or not(@code)">dtr1-2-CD: code requires codeSystem</assert>
    <assert role="error" test="@codeSystem or not(@codeSystemName)">dtr1-3-CD: codeSystemName only if codeSystem</assert>
    <assert role="error" test="@codeSystem or not(@codeSystemVersion)">dtr1-4-CD: codeSystemVersion only if codeSystem</assert>
    <assert role="error" test="@code or not(@displayName)">dtr1-5-CD: displayName only if code</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@code))">dtr1-6-CD: no code if null</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@displayName))">dtr1-7-CD: no displayName if null</assert>
    
    <!--<assert role="error" test="not(.//hl7:translation/hl7:originalText)">dtr1-8-CD: no originalText on translations</assert>-->
    <!-- According to DTr1 abstract:
        Each translation may, however, also contain translations. Thus, when a code is translated multiple times the information 
        about which code served as the input to which translation will be preserved.
    -->
    <!--<assert role="error" test="not(hl7:translation/hl7:translation)">dtr1-9-CD: no translation on translations</assert>-->
    <assert role="error" test="not(.//hl7:translation/@nullFlavor)">dtr1-10-CD: no null on translations (Exceptional values (NULL-values) can not be elements of a set.)</assert>

    <assert role="error" test="not(.//hl7:translation[@codeSystem][not(@code)])">dtr1-11-CD: translation code requires codeSystem</assert>
    <assert role="error" test="not(.//hl7:translation[@codeSystemName][not(@codeSystem)])">dtr1-12-CD: translation codeSystemName only if codeSystem</assert>
    <assert role="error" test="not(.//hl7:translation[@codeSystemVersion][not(@codeSystem)])">dtr1-13-CD: translation codeSystemVersion only if codeSystem</assert>
    <assert role="error" test="not(.//hl7:translation[@displayName][not(@code)])">dtr1-14-CD: translation displayName only if code</assert>

    <report role="warning" test="matches(@displayName,'[\r\n\t]')">dtr1-15-CD: it looks like there are formatting instructions in attribute @displayName. Please note that this may lead to
        interoperability problems.</report>
    
    <!-- Abstract datatypes 2.15.1
        The literal form for the UUID is defined according to the original specification of the UUID. However, because the HL7 UIDs are case sensitive, 
        for use with HL7, the hexadecimal digits A-F in UUIDs must be converted to upper case.
        
        This being said: if we were to hold current implementations to this idea, then a lot would be broken and not even the official 
        HL7 datatypes check this requirement. Hence we knowingly allow lower-case a-f.
    -->
    <!--<let name="UUIDpattern" value="'^[A-Fa-f\d]{8}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{12}$'"/>
    <assert role="error" test="not(@codeSystem) or not(matches(@codeSystem,$UUIDpattern) and matches(@codeSystem,'[a-z]'))"
        >dtr1-16-CD: When UUID is used, the hexadecimal digits A-F SHALL be in upper case</assert>-->
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])">dtr1-17-CD: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    
    <let name="code" value="@code"/>
    <let name="codeSystem" value="@codeSystem"/>
    <assert role="error" test="not($set_other[@code=$code][@codeSystem=$codeSystem])">dtr1-18-CD: [RIM-002] <value-of select="$name"/> (@code=<value-of select="$code"/> @codeSystem=<value-of select="$codeSystem"/>) SHALL be distinct</assert>
    
    <let name="translations" value=".//hl7:translation/concat(@code,@codeSystem)"/>
    <assert test="count($translations)=count(distinct-values($translations))">dtr1-19-CD: [RIM-002] translations SHALL be distinct</assert>
    
    <!-- http://www.ietf.org/rfc/rfc3066.txt
        Language-Tag = Primary-subtag *( "-" Subtag ) 
        Primary-subtag = 1*8ALPHA 
        Subtag = 1*8(ALPHA / DIGIT)
        
        Primary subtag: 
            - 2/3 letter codes are ISO-639, 
            - value 'i' reserved for IANA registrations, 
            - 'x' reserved for private use, 
            - other values not allowed
        Secondary subtag:
            - 2 letter codes are ISO-3166
            - 3-8 may be registered with IANA,
            - 1 letter not allowed
    -->
    <!--<assert role="error" test="not(@code) or @code castable as xs:language">dtr1-2-CS.LANG: @code SHALL conform to RFC 3066. This usually has format ss-CC with ss for language code (conform ISO-639-1) and optional CC for country code (conform ISO-3166 alpha-2)</assert>-->
    <let name="RFC3066" value="'^[a-z]{2,3}(-[a-z]{2})?|[ix](-[a-z\d]{2,8})+$'"/>
    <let name="RFC3066restricted" value="'^[a-z]{2,3}(-[a-z]{2})?$'"/>
    <assert role="error" test="not(.//hl7:originalText[@language and not(matches(@language,$RFC3066,'i'))])">dtr1-20-CD: originalText/@language SHALL conform to RFC 3066. This usually has format sss?-CC with sss? for language code (ISO-639-1 / ISO-639-2) and optional CC for country code (conform ISO-3166 alpha-2)</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_CD.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CE.sch?><rule abstract="true" id="CE">
    <extends rule="CD"/>
    <assert role="error" test="not(hl7:qualifier)">dtr1-1-CE: cannot have qualifier</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_CE.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CV.sch?><rule abstract="true" id="CV">
    <extends rule="CE"/>
    
    <assert role="error" test="not(hl7:translation)">dtr1-1-CV: cannot have translation</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_CV.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CO.sch?><rule abstract="true" id="CO">
    <extends rule="CV"/>

    <assert role="error" test="not(hl7:translation)">dtr1-1-CO: cannot have translation</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_CO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CO.EPSOS.sch?><rule abstract="true" id="CO.EPSOS">
    <extends rule="CO"/>
</rule><?DSDL_INCLUDE_END include/DTr1_CO.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_PQR.sch?><rule abstract="true" id="PQR">
    <extends rule="CV"/>
    <assert role="error" test="not(@nullFlavor and @value)">dtr1-1-PQR: not null and value</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_PQR.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CV.EPSOS.sch?><rule abstract="true" id="CV.EPSOS">
    <extends rule="CV"/>
</rule><?DSDL_INCLUDE_END include/DTr1_CV.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_EIVL.event.sch?><rule abstract="true" id="EIVL.event">
    <extends rule="CE"/>
</rule><?DSDL_INCLUDE_END include/DTr1_EIVL.event.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CE.EPSOS.sch?><rule abstract="true" id="CE.EPSOS">
    <extends rule="CE"/>
    <assert role="error" test="not(hl7:qualifier)">dtr1-1-CE.EPSOS: cannot have qualifier</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_CE.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CD.EPSOS.sch?><rule abstract="true" id="CD.EPSOS">
    <extends rule="CD"/>
    
    <assert role="error" test="not(.//hl7:translation) or .//hl7:translation[not(@code) or @displayName]">dtr1-1-CD.EPSOS: attribute @displayName is required on all codes and translations thereof</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_CD.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CR.sch?><rule abstract="true" id="CR">
    <extends rule="ANY"/>
    <assert test="(@nullFlavor or *) and not(@nullFlavor and *)">dtr1-1-CR: null or value</assert>
    
    <!-- Abstract datatypes 2.15.1
        The literal form for the UUID is defined according to the original specification of the UUID. However, because the HL7 UIDs are case sensitive, 
        for use with HL7, the hexadecimal digits A-F in UUIDs must be converted to upper case.
        
        This being said: if we were to hold current implementations to this idea, then a lot would be broken and not even the official 
        HL7 datatypes check this requirement. Hence we knowingly allow lower-case a-f.
    -->
    <!--<let name="UUIDpattern" value="'^[A-Fa-f\d]{8}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{12}$'"/>
    <assert role="error" test="not(@codeSystem) or not(matches(@codeSystem,$UUIDpattern) and matches(@codeSystem,'[a-z]'))"
        >dtr1-2-CR: When UUID is used, the hexadecimal digits A-F SHALL be in upper case</assert>-->
</rule><?DSDL_INCLUDE_END include/DTr1_CR.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CS.sch?><rule abstract="true" id="CS">
    <extends rule="ANY"/>
    <assert role="error" test="(@nullFlavor and not(@code or @typeCode)) or (not(@nullFlavor) and (@code or @typeCode))">dtr1-1-CS: @code/@typeCode and @nullFlavor are mutually exclusive</assert>

    <assert role="error" test="not(@codeSystem)">dtr1-2-CS: cannot have codeSystem</assert>
    <assert role="error" test="not(@codeSystemName)">dtr1-3-CS: cannot have codeSystemName</assert>
    <assert role="error" test="not(@codeSystemVersion)">dtr1-4-CS: cannot have codeSystemVersion</assert>
    <assert role="error" test="not(@displayName)">dtr1-5-CS: cannot have displayName</assert>
    <assert role="error" test="not(hl7:originalText)">dtr1-6-CS: cannot have originalText</assert>
    <assert role="error" test="not(hl7:qualifier)">dtr1-7-CS: cannot have qualifier</assert>
    <assert role="error" test="not(hl7:translation)">dtr1-8-CS: cannot have translation</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_CS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_CS.LANG.sch?><rule abstract="true" id="CS.LANG">
    <extends rule="CS"/>

    <!--<assert role="error" test="@nullFlavor or matches(@code, '^[a-z]{2}(-[A-Z]{2})?$')"
        >dtr1-1-CS.LANG: @code SHALL be of format ss-CC with ss for language code (conform ISO-639-1) and optional CC for country code (conform ISO-3166 alpha-2)</assert>-->
    
    <!-- http://www.ietf.org/rfc/rfc3066.txt
        Language-Tag = Primary-subtag *( "-" Subtag ) 
        Primary-subtag = 1*8ALPHA 
        Subtag = 1*8(ALPHA / DIGIT)
        
        Primary subtag: 
            - 2/3 letter codes are ISO-639, 
            - value 'i' reserved for IANA registrations, 
            - 'x' reserved for private use, 
            - other values not allowed
        Secondary subtag:
            - 2 letter codes are ISO-3166
            - 3-8 may be registered with IANA,
            - 1 letter not allowed
    -->
    <!--<assert role="error" test="not(@code) or @code castable as xs:language">dtr1-2-CS.LANG: @code SHALL conform to RFC 3066. This usually has format ss-CC with ss for language code (conform ISO-639-1) and optional CC for country code (conform ISO-3166 alpha-2)</assert>-->
    <let name="RFC3066" value="'^[a-z]{2,3}(-[a-z]{2})?|[ix](-[a-z\d]{2,8})+$'"/>
    <let name="RFC3066restricted" value="'^[a-z]{2,3}(-[a-z]{2})?$'"/>
    <assert role="error" test="not(@code) or matches(@code,$RFC3066,'i')">dtr1-2-CS.LANG: @code SHALL conform to RFC 3066. This usually has format sss?-CC with sss? for language code (ISO-639-1 / ISO-639-2) and optional CC for country code (conform ISO-3166 alpha-2)</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_CS.LANG.sch?>
      <?DSDL_INCLUDE_START include/DTr1_EN.sch?><rule abstract="true" id="EN">
    <extends rule="ANY"/>

    <assert role="error" test="@nullFlavor or (count(*)&gt;0 and string-length(normalize-space(string-join(text(),'')))=0) or (count(*)=0 and string-length(normalize-space(string-join(text(),'')))&gt;0)">dtr1-1-EN: entity name shall be null or text only or element only (no mixed content)</assert>

    <report role="warning" test="*[not(@nullFlavor)][normalize-space(.)='']">dtr1-3-EN: empty name particles should not be present.</report>
    <report role="warning" test="substring(normalize-space(.),1,1)='&#34;'">dtr1-4-EN: Use of quotes at the beginning of a name are probably not correct.</report>
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="value" value="string-join(.//text(),'')"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])">dtr1-5-EN: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    <assert role="error" test="not($set_other[string-join(.//text(),'')=$value])">dtr1-6-EN: [RIM-002] <value-of select="$name"/> (<value-of select="$value"/>) SHALL be distinct</assert>
    
    <assert role="error" test="not(hl7:*) or hl7:*[count(tokenize(@qualifier,'\s'))=count(distinct-values(tokenize(@qualifier,'\s')))]">dtr1-7-EN: enxp elements SHALL have distinct values in @qualifier</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_EN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_ON.sch?><rule abstract="true" id="ON">
    <extends rule="EN"/>

    <assert role="error" test="count(hl7:family)=0 and count(hl7:given)=0">dtr1-1-ON: no parts may be person name type particles</assert>
    <assert role="error" test="not(*)">dtr1-2-ON: organization names SHALL be element content</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_ON.sch?>
      <?DSDL_INCLUDE_START include/DTr1_PN.sch?><rule abstract="true" id="PN">
    <extends rule="EN"/>
    
    <assert role="error" test="not(*[tokenize(@qualifier,'\s')='LS'])">dtr1-1-PN: Person names SHALL NOT contain a name part qualified with 'LS' (Legal status for organizations)</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_PN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TN.sch?><rule abstract="true" id="TN">
    <extends rule="EN"/>

    <assert role="error" test="not(*)">dtr1-1-TN: trivial names SHALL consist of only one name part without any name part type or qualifier</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.sch?><rule abstract="true" id="II">
    <extends rule="ANY"/>
    
    <assert role="error" test="@nullFlavor or (not(@nullFlavor) and @root)">dtr1-1-II: @root is required if @nullFlavor is not present</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@root))">dtr1-2-II: @root may not be used if @nullFlavor is present</assert>
    <!--assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@extension))">dtr1-3-II: no @extension if null</assert-->
    
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@identifierName))">dtr1-4-II: @identifierName may not be used if @nullFlavor is present</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@displayable))">dtr1-5-II: @displayable may not be used if @nullFlavor is present</assert>
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@reliability))">dtr1-6-II: @reliability may not be used if @nullFlavor is present</assert>
    
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(@assigningAuthorityName))">dtr1-7-II: @assigningAuthorityName may not be used if @nullFlavor is present</assert>
    
     <!-- 
        Issue
        DICOM has a max of 64 chars in an OID
        Canada uses 200 chars for OIDs
    -->
    <report role="warning" test="not(string-length(@root) &lt;= 128)">dtr1-8-II: @root should not be longer than 128 characters. Please write a note to the authors of this rule if this is found to be not sufficient</report>
    <report role="warning" test="not(string-length(@extension) &lt;= 64)">dtr1-9-II: @extension should not be longer than 64 characters. Please write a note to the authors of this rule if this is found to be not sufficient</report>
    <!-- Abstract datatypes 2.15.1
        The literal form for the UUID is defined according to the original specification of the UUID. However, because the HL7 UIDs are case sensitive, 
        for use with HL7, the hexadecimal digits A-F in UUIDs must be converted to upper case.
        
        This being said: if we were to hold current implementations to this idea, then a lot would be broken and not even the official 
        HL7 datatypes check this requirement. Hence we knowingly allow lower-case a-f.
    -->
    <let name="OIDpattern" value="'^[0-2](\.(0|[1-9]\d*))*$'"/>
    <let name="RUIDpattern" value="'^[A-Za-z][A-Za-z\d\-]*$'"/>
    <let name="UUIDpattern" value="'^[A-Fa-f\d]{8}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{4}-[A-Fa-f\d]{12}$'"/>
    <assert role="error" test="not(@root) or matches(@root, $OIDpattern) or matches(@root, $UUIDpattern)">dtr1-10-II: @root SHALL be a syntactically correct OID, UUID.</assert>
    <assert role="error" test="not(matches(@root, $RUIDpattern) and not(matches(@root, $UUIDpattern)))">dtr1-10a-II: @root SHALL NOT be a RUID. Identifiers in this scheme are only defined by balloted HL7 specifications. Local communities or systems must never use such reserved identifiers based on bilateral negotiations.</assert>
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <!--
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])"
        >dtr1-11-II: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    -->
    
    <let name="root" value="@root"/>
    <let name="extension" value="@extension"/>
    <assert role="error" test="not($set_other[@root=$root][empty($extension)] or $set_other[@root=$root][@extension=$extension])">dtr1-12-II: [RIM-002] <value-of select="$name"/> SHALL be distinct</assert>
    
    <!-- Abstract datatypes 2.15.1
        The literal form for the UUID is defined according to the original specification of the UUID. However, because the HL7 UIDs are case sensitive, 
        for use with HL7, the hexadecimal digits A-F in UUIDs must be converted to upper case.
    -->
    <let name="UUIDpattern" value="'^[0-9a-fA-F]{8}-[0-9a-fA-f]{4}-[0-9a-fA-F]{4}-[0-9a-aA-F]{4}-[0-9a-fA-F]{12}$'"/>
    <assert role="error" test="not(@root) or not(matches(@root,$UUIDpattern) and matches(@root,'[a-z]'))">dtr1-13-II: When UUID is used, the hexadecimal digits A-F SHALL be in upper case</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_II.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.NL.BSN.sch?><rule abstract="true" id="II.NL.BSN">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root='2.16.840.1.113883.2.4.6.3'">dtr1-1-II.NL.BSN: Burgerservicenummer @root MOET 2.16.840.1.113883.2.4.6.3 zijn indien niet null</assert>
    <assert role="error" test="not(@root='2.16.840.1.113883.2.4.6.3') or matches(@extension,'^[0-9]{9}$')">dtr1-2-II.NL.BSN: Burgerservicenummer MOET 9 cijfers lang zijn</assert>
    <assert role="error" test="not(@root='2.16.840.1.113883.2.4.6.3') or (         (   number(substring(@extension,1,1))*9 )+         (   number(substring(@extension,2,1))*8 )+         (   number(substring(@extension,3,1))*7 )+         (   number(substring(@extension,4,1))*6 )+         (   number(substring(@extension,5,1))*5 )+         (   number(substring(@extension,6,1))*4 )+         (   number(substring(@extension,7,1))*3 )+         (   number(substring(@extension,8,1))*2 )+         (   number(substring(@extension,9,1))*-1) ) mod 11=0">dtr1-3-II.NL.BSN: Burgerservicenummer voldoet niet aan modulo 11 proef</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_II.NL.BSN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.NL.URA.sch?><rule abstract="true" id="II.NL.URA">
    <extends rule="II"/>

    <!-- 
        URA mag 1 zijn, indien het id van de entiteit waar de organisatie bij 
        hoort (bijvoorbeeld een AssignedDevice) het ZIM is.
    -->
    <assert role="error" test="@nullFlavor or @root='2.16.528.1.1007.3.3'">dtr1-1-II.NL.URA: UZI-registerabonneenummer @root MOET 2.16.528.1.1007.3.3 zijn indien niet null</assert>
    <assert role="error" test="not(@root='2.16.528.1.1007.3.3') or matches(@extension,'^[0-9]{8}$')">dtr1-2-II.NL.URA: UZI-registerabonneenummer MOET 8 cijfers lang zijn</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.NL.URA.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.NL.UZI.sch?><rule abstract="true" id="II.NL.UZI">
    <extends rule="II"/>
    
    <assert role="error" test="@nullFlavor or @root='2.16.528.1.1007.3.1' or @root='2.16.528.1.1007.3.2'">dtr1-1-II.NL.UZI: UZI-nummer @root MOET 2.16.528.1.1007.3.1 (Personen) of 2.16.528.1.1007.3.2 (Systemen) zijn indien niet null</assert>
    <assert role="error" test="not(@root='2.16.528.1.1007.3.1') or matches(@extension,'^[0-9]{9}$')">dtr1-2-II.NL.UZI: UZI-nummer persoon MOET 9 cijfers lang zijn</assert>
    <assert role="error" test="not(@root='2.16.528.1.1007.3.2') or matches(@extension,'^[0-9]{9}$')">dtr1-3-II.NL.UZI: UZI-nummer systeem MOET 9 cijfers lang zijn</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_II.NL.UZI.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.NL.AGB.sch?><rule abstract="true" id="II.NL.AGB">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root='2.16.840.1.113883.2.4.6.1'">dtr1-1-II.NL.AGB: AGB-code @root MOET 2.16.840.1.113883.2.4.6.1 zijn indien niet null</assert>
    <assert role="error" test="not(@root='2.16.840.1.113883.2.4.6.1') or matches(@extension,'^[0-9]{8}$')">dtr1-2-II.NL.AGB: AGB-code moet 8 cijfers lang zijn</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.NL.AGB.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.AT.DVR.sch?><rule abstract="true" id="II.AT.DVR">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root = '1.2.40.0.10.2.0.2.1'">dtr1-1-II.AT.DVR: @root SHALL be 1.2.40.0.10.2.0.2.1 if not null</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.AT.DVR.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.AT.ATU.sch?><rule abstract="true" id="II.AT.ATU">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root = '1.2.40.0.10.2.0.2.1'">dtr1-1-II.AT.ATU: @root SHALL be 1.2.40.0.10.2.0.2.1 if not null</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.AT.ATU.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.AT.BLZ.sch?><rule abstract="true" id="II.AT.BLZ">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root = '1.2.40.0.34.4.13'">dtr1-1-II.AT.BLZ: @root SHALL be 1.2.40.0.34.4.13 if not null</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.AT.BLZ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.AT.KTONR.sch?><rule abstract="true" id="II.AT.KTONR">
    <extends rule="II"/>

    <assert role="error" test="@nullFlavor or @root = '1.2.40.0.34.4.14'">dtr1-1-II.AT.KTONR: @root SHALL be 1.2.40.0.34.4.14 if not null</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_II.AT.KTONR.sch?>
      <?DSDL_INCLUDE_START include/DTr1_II.EPSOS.sch?><rule abstract="true" id="II.EPSOS">
    <extends rule="II"/>
    
    <assert role="error" test="not(@root) or string-length(@root) &lt;= 64">dtr1-1-II.EPSOS: @root should not be longer than 64 characters</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_II.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_QTY.sch?><rule abstract="true" id="QTY">
    <extends rule="ANY"/>
    
    <assert role="error" test="not(hl7:uncertainty/@expression) and not(hl7:uncertainty/@uncertainty) and not(hl7:uncertainty/@originalText)">dtr1-1-QTY: no uncertainty</assert>
    <assert role="error" test="count(*[self::hl7:originalText or self::hl7:uncertainty or self::hl7:expression][@validTimeLow or @validTimeHigh or @updateMode])=0">dtr1-2-QTY: no history or updateMode</assert>
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])">dtr1-3-QTY: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    
    <let name="value" value="@value"/>
    <let name="unit" value="@unit"/>
    <assert role="error" test="not($set_other[@value=$value][@unit=$unit])">dtr1-4-QTY: [RIM-002] <value-of select="$name"/> (@value=<value-of select="$value"/> @unit=<value-of select="$unit"/>) SHALL be distinct</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_QTY.sch?>
      <?DSDL_INCLUDE_START include/DTr1_INT.sch?><rule abstract="true" id="INT">
    <extends rule="QTY"/>
    
    <assert role="error" test="(@nullFlavor or @value or *) and not(@nullFlavor and @value)">dtr1-1-INT: null or value or child element in case of extension</assert>
    
    <assert role="error" test="not(hl7:uncertainty)">dtr1-2-INT: no uncertainty</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_INT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVXB_INT.sch?><rule abstract="true" id="IVXB_INT">
    <extends rule="INT"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-IVXB_INT: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVXB_INT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXCM_INT.sch?><rule abstract="true" id="SXCM_INT">
    <extends rule="INT"/>
    <assert role="error" test="not(@nullFlavor and @operator)">dtr1-1-SXCM_INT: not operator if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SXCM_INT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_INT.sch?><rule abstract="true" id="IVL_INT">
    <extends rule="SXCM_INT"/>
    
    <assert role="error" test="(@nullFlavor and not(@value|@unit|hl7:*)) or (not(@nullFlavor) and (@value|hl7:*))">dtr1-1-IVL_INT: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:*[@nullFlavor and (@value|@unit)])">dtr1-2-IVL_INT: null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    
    <assert role="error" test="not(@value and hl7:*)">dtr1-3-IVL_INT: co-occurence violation. Cannot have @value and other child elements</assert>
    <assert role="error" test="not(hl7:center and (hl7:low|hl7:high|hl7:width))">dtr1-4-IVL_INT: co-occurence violation. Cannot have center and other child elements</assert>
    <assert role="error" test="not(hl7:*[@updateMode])">dtr1-5-IVL_INT: no updateMode on IVL attributes</assert>
    
    <!--<assert role="error" test="not(hl7:low/@value = hl7:high/@value)"
        >dtr1-6-IVL_INT: low/@value must not be equal to high/@value</assert>-->
    
    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width[@unit][not(@value)])">dtr1-1-PQR: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-2-PQR: width element: no translation</assert>
    
    <assert role="error" test="not(hl7:low/@value and hl7:high/@value) or hl7:low/number(@value) &lt;= hl7:high/number(@value)">dtr1-7-IVL_INT: low/@value must be lower than or equal to high/@value</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_INT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_INT.NONNEG.sch?><rule abstract="true" id="INT.NONNEG">
    <extends rule="INT"/>
    
    <assert role="error" test="@nullFlavor or @value &gt;= 0">dtr1-2-INT.NONNEG: null or value &gt;= 0</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_INT.NONNEG.sch?>
      <?DSDL_INCLUDE_START include/DTr1_INT.POS.sch?><rule abstract="true" id="INT.POS">
    <extends rule="INT"/>
    
    <assert role="error" test="@nullFlavor or @value &gt; 0">dtr1-2-INT.POS: null or value &gt; 0</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_INT.POS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_MO.sch?><rule abstract="true" id="MO">
    <extends rule="QTY"/>
    
    <assert role="error" test="(@nullFlavor or (@value and @currency) or *) and not(@nullFlavor and @value)">dtr1-1-MO: null or value or child element in case of extension</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_MO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVXB_MO.sch?><rule abstract="true" id="IVXB_MO">
    <extends rule="MO"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-IVXB_MO: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVXB_MO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXCM_MO.sch?><rule abstract="true" id="SXCM_MO">
    <extends rule="MO"/>
    <assert role="error" test="not(@nullFlavor and @operator)">dtr1-1-SXCM_MO: not operator if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SXCM_MO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_MO.sch?><rule abstract="true" id="IVL_MO">
    <extends rule="SXCM_MO"/>

    <assert role="error" test="(@nullFlavor and not(@value|@unit|hl7:*)) or (not(@nullFlavor) and (@value|hl7:*))">dtr1-1-IVL_MO: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:*[@nullFlavor and (@value|@unit)])">dtr1-2-IVL_MO: null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    
    <assert role="error" test="not(@value and hl7:* except hl7:translation)">dtr1-3-IVL_MO: co-occurence violation. Cannot have @value and other child elements except translations</assert>
    <assert role="error" test="not(hl7:center and (hl7:low|hl7:high|hl7:width))">dtr1-4-IVL_MO: co-occurence violation. Cannot have center and other child elements</assert>
    <assert role="error" test="not(hl7:*[@updateMode])">dtr1-5-IVL_MO: no updateMode on IVL attributes</assert>
    
    <!--<assert role="error" test="not(hl7:low/@value = hl7:high/@value)"
        >dtr1-6-IVL_MO: low/@value must not be equal to high/@value</assert>-->
    
    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width[@unit][not(@value)])">dtr1-1-PQR: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-2-PQR: width element: no translation</assert>
    
    <assert role="error" test="not(hl7:low/@value and hl7:high/@value) or hl7:low/number(@value) &lt;= hl7:high/number(@value)">dtr1-7-IVL_MO: low/@value must be lower than or equal to high/@value</assert>
    
    <assert role="error" test="not(hl7:low/@currency and hl7:high/@currency) or hl7:low/@currency = hl7:high/@currency">dtr1-8-IVL_MO: currency in low and high must be equal</assert>
    
    <assert role="error" test="not(hl7:translation and hl7:* except hl7:translation)">dtr1-9-IVL_MO: co-occurence violation. Cannot have translation and other child elements except translation</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_MO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_PQ.sch?><rule abstract="true" id="PQ">
    <extends rule="QTY"/>
    
    <assert role="error" test="(@nullFlavor or @value or *) and not(@nullFlavor and @value)">dtr1-1-PQ: null or value or child element in case of extension</assert>
    <!--
    <assert role="error" test="not(@nullFlavor) or (@nullFlavor and not(hl7:translation))"
        >dtr1-2-PQ: no translation if null</assert>
    -->
    
    <let name="translations" value=".//hl7:translation/concat(@value,@code,@codeSystem)"/>
    <assert test="count($translations)=count(distinct-values($translations))">dtr1-3-PQ: [RIM-002] translations SHALL be distinct</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_PQ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVXB_PQ.sch?><rule abstract="true" id="IVXB_PQ">
    <extends rule="PQ"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-IVXB_PQ: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVXB_PQ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXCM_PQ.sch?><rule abstract="true" id="SXCM_PQ">
    <extends rule="PQ"/>
    <assert role="error" test="not(@nullFlavor and @operator)">dtr1-1-SXCM_PQ: not operator if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SXCM_PQ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_PQ.sch?><rule abstract="true" id="IVL_PQ">
    <extends rule="SXCM_PQ"/>

    <assert role="error" test="(@nullFlavor and not(@value|@unit|hl7:*)) or (not(@nullFlavor) and (@value|hl7:*))">dtr1-1-IVL_PQ: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:*[@nullFlavor and (@value|@unit)])">dtr1-2-IVL_PQ: null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    
    <assert role="error" test="not(@value and hl7:* except hl7:translation)">dtr1-3-IVL_PQ: co-occurence violation. Cannot have @value and other child elements except translation</assert>
    <assert role="error" test="not(hl7:center and (hl7:low|hl7:high|hl7:width))">dtr1-4-IVL_PQ: co-occurence violation. Cannot have center and other child elements</assert>
    <assert role="error" test="not(hl7:*[@updateMode])">dtr1-5-IVL_PQ: no updateMode on IVL attributes</assert>
    
    <!--<assert role="error" test="not(hl7:low/@value = hl7:high/@value)"
        >dtr1-6-IVL_PQ: low/@value must not be equal to high/@value</assert>-->
    
    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width[@unit][not(@value)])">dtr1-1-PQR: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-2-PQR: width element: no translation</assert>
    
    <assert role="error" test="not(hl7:low/@value and hl7:high/@value) or hl7:low/number(@value) &lt;= hl7:high/number(@value)">dtr1-7-IVL_PQ: low/@value must be lower than or equal to high/@value</assert>

    <assert role="warning" test="not(hl7:low/@unit and hl7:high/@unit) or hl7:low/@unit = hl7:high/@unit">dtr1-8-IVL_PQ: units in low and high should be equal or comparable</assert>
    
    <assert role="error" test="not(hl7:translation and hl7:* except hl7:translation)">dtr1-9-IVL_PQ: co-occurence violation. Cannot have translation and other child elements except translation</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_PQ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_REAL.sch?><rule abstract="true" id="REAL">
    <extends rule="QTY"/>
    
    <assert role="error" test="(@nullFlavor or @value or *) and not(@nullFlavor and @value)">dtr1-1-REAL: null or value or child element in case of extension</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_REAL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVXB_REAL.sch?><rule abstract="true" id="IVXB_REAL">
    <extends rule="REAL"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-IVXB_REAL: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVXB_REAL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXCM_REAL.sch?><rule abstract="true" id="SXCM_REAL">
    <extends rule="REAL"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-SXCM_REAL: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SXCM_REAL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_REAL.sch?><rule abstract="true" id="IVL_REAL">
    <extends rule="SXCM_REAL"/>
    
    <assert role="error" test="(@nullFlavor and not(@value|@unit|hl7:*)) or (not(@nullFlavor) and (@value|hl7:*))">dtr1-1-IVL_REAL: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:*[@nullFlavor and (@value|@unit)])">dtr1-2-IVL_REAL: null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    
    <assert role="error" test="not(@value and hl7:*)">dtr1-3-IVL_REAL: co-occurence violation. Cannot have @value and other child elements</assert>
    <assert role="error" test="not(hl7:center and (hl7:low|hl7:high|hl7:width))">dtr1-4-IVL_REAL: co-occurence violation. Cannot have center and other child elements</assert>
    <assert role="error" test="not(hl7:*[@updateMode])">dtr1-5-IVL_REAL: no updateMode on IVL attributes</assert>
    
    <!--<assert role="error" test="not(hl7:low/@value = hl7:high/@value)"
        >dtr1-6-IVL_REAL: low/@value must not be equal to high/@value</assert>-->
    
    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width[@unit][not(@value)])">dtr1-1-PQR: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-2-PQR: width element: no translation</assert>
    
    <assert role="error" test="not(hl7:low/@value and hl7:high/@value) or hl7:low/number(@value) &lt;= hl7:high/number(@value)">dtr1-7-IVL_REAL: low/@value must be lower than or equal to high/@value</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_REAL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_REAL.NONNEG.sch?><rule abstract="true" id="REAL.NONNEG">
    <extends rule="REAL"/>
    
    <assert role="error" test="@nullFlavor or @value &gt;= 0">dtr1-1-REAL.NONNEG: null or value &gt;= 0</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_REAL.NONNEG.sch?>
      <?DSDL_INCLUDE_START include/DTr1_REAL.POS.sch?><rule abstract="true" id="REAL.POS">
    <extends rule="REAL"/>
    
    <assert role="error" test="@nullFlavor or @value &gt; 0">dtr1-1-REAL.POS: null or value &gt; 0</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_REAL.POS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.sch?><rule xmlns:xs="http://www.w3.org/2001/XMLSchema" abstract="true" id="TS">
    <extends rule="QTY"/>
    
    <assert role="error" test="(@nullFlavor or @value or *) and not(@nullFlavor and @value)">dtr1-1-TS: null or value or child element in case of extension</assert>
    
    <let name="theTS" value="@value"/>
    <let name="theBC" value="if (starts-with($theTS,'-')) then '-' else ()"/>
    <let name="theTZ" value="replace($theTS,'-?[^+-]+([+-].*)?$','$1')"/>
    <let name="theTZh" value="if (string-length($theTZ)&gt;0) then substring($theTZ,1,3) else ()"/>
    <let name="theTZm" value="if (string-length($theTZ)&gt;3) then substring($theTZ,4) else ()"/>
    <let name="theBaseTS" value="replace($theTS,'^-?([^+-]+)([+-].*)?','$1')"/>
    <let name="theCentury" value="if (substring($theBaseTS,1,2) castable as xs:integer) then substring($theBaseTS,1,2) else ()"/>
    <let name="theYear" value="if (substring($theBaseTS,3,2) castable as xs:integer) then substring($theBaseTS,3,2) else ()"/>
    <let name="theMonth" value="if (substring($theBaseTS,5,2) castable as xs:integer) then substring($theBaseTS,5,2) else ()"/>
    <let name="theDay" value="if (substring($theBaseTS,7,2) castable as xs:integer) then substring($theBaseTS,7,2) else ()"/>
    <let name="theHour" value="if (substring($theBaseTS,9,2) castable as xs:integer) then substring($theBaseTS,9,2) else ()"/>
    <let name="theMinute" value="if (substring($theBaseTS,11,2) castable as xs:integer) then substring($theBaseTS,11,2) else ()"/>
    <let name="theSecond" value="if (substring($theBaseTS,13,2) castable as xs:integer) then substring($theBaseTS,13,2) else ()"/>
    <let name="theSubSecond" value="if (substring($theBaseTS,16) castable as xs:integer) then substring($theBaseTS,15) else ()"/>
    
    <let name="cCentury" value="if (empty($theCentury)) then '00' else $theCentury"/>
    <let name="cYear" value="if (empty($theYear)) then '00' else $theYear"/>
    <let name="cMonth" value="if (empty($theMonth)) then '01' else $theMonth"/>
    <let name="cDay" value="if (empty($theDay)) then '01' else $theDay"/>
    <let name="cHour" value="if (empty($theHour)) then '00' else $theHour"/>
    <let name="cMinute" value="if (empty($theMinute)) then '00' else $theMinute"/>
    <let name="cSecond" value="if (empty($theSecond)) then '00' else $theSecond"/>
    <let name="cTZ" value="string-join(($theTZh,$theTZm),':')"/>
    
    <let name="theTSString" value="string-join(($theBC,$theCentury,$theYear,$theMonth,$theDay,$theHour,$theMinute,$theSecond,$theSubSecond,$theTZ),'')"/>
    <let name="theDateTime" value="concat($theBC,$cCentury,$cYear,'-',$cMonth,'-',$cDay,'T',$cHour,':',$cMinute,':',$cSecond,$theSubSecond,$cTZ)"/>
    
    <assert test="empty($theTS) or ($theTS=$theTSString and $theDateTime castable as xs:dateTime)">dtr1-2-TS: <value-of select="local-name()"/> "<value-of select="$theTS"/>" is not a valid timestamp.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVXB_TS.sch?><rule abstract="true" id="IVXB_TS">
    <extends rule="TS"/>
    <assert role="error" test="not(@nullFlavor and @inclusive)">dtr1-1-IVXB_TS: not inclusive if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVXB_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXCM_TS.sch?><rule abstract="true" id="SXCM_TS">
    <extends rule="TS"/>
    <assert role="error" test="not(@nullFlavor and @operator)">dtr1-1-SXCM_TS: not operator if null</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_SXCM_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_TS.sch?><rule abstract="true" id="IVL_TS">
    <extends rule="SXCM_TS"/>

    <assert role="error" test="(@nullFlavor and not(@value|@unit|hl7:*)) or (not(@nullFlavor) and (@value|hl7:*))">dtr1-1-IVL_TS: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:*[@nullFlavor and (@value|@unit)])">dtr1-2-IVL_TS: null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    
    <assert role="error" test="not(@value and hl7:*)">dtr1-3-IVL_TS: co-occurence violation. Cannot have @value and other child elements</assert>
    <assert role="error" test="not(hl7:center and (hl7:low|hl7:high|hl7:width))">dtr1-4-IVL_TS: co-occurence violation. Cannot have center and other child elements</assert>
    <assert role="error" test="not(hl7:*[@updateMode])">dtr1-5-IVL_TS: no updateMode on IVL attributes</assert>
    
    <assert role="error" test="not(hl7:low/@value = hl7:high/@value)">dtr1-6-IVL_TS: low/@value must not be equal to high/@value</assert>
    
    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width[@unit][not(@value)])">dtr1-1-PQR: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-2-PQR: width element: no translation</assert>
    
    <assert role="error" test="not(hl7:low/@value and hl7:high/@value) or number(substring(concat(hl7:low/@value,'00000000000000'),1,14)) &lt; number(substring(concat(hl7:high/@value,'00000000000000'),1,14))">dtr1-7-IVL_TS: low/@value must be before high/@value</assert>
        
    <!-- for width only us (microseconds),	ms (milliseconds),	s (seconds), min (minute), h (hours), d (day), wk (week), mo (month) and a (year) are allowed.
    -->
    <let name="tum" value="'^(us|ms|s|min|h|d|wk|mo|a|)$'"/>
    <assert role="error" test="matches(hl7:width/@unit, $tum)">dtr1-8-IVL_TS: for width only us (microseconds), ms (milliseconds), s (seconds), min (minute), h (hours), d (day), wk (week), mo (month) or a (year) are allowed</assert>
    
    <let name="theTS" value="hl7:low/@value"/>
    <let name="theBC" value="if (starts-with($theTS,'-')) then '-' else ()"/>
    <let name="theTZ" value="replace($theTS,'-?[^+-]+([+-].*)?$','$1')"/>
    <let name="theTZh" value="if (string-length($theTZ)&gt;0) then substring($theTZ,1,3) else ()"/>
    <let name="theTZm" value="if (string-length($theTZ)&gt;3) then substring($theTZ,4) else ()"/>
    <let name="theBaseTS" value="replace($theTS,'^-?([^+-]+)([+-].*)?','$1')"/>
    <let name="theCentury" value="if (substring($theBaseTS,1,2) castable as xs:integer) then substring($theBaseTS,1,2) else ()"/>
    <let name="theYear" value="if (substring($theBaseTS,3,2) castable as xs:integer) then substring($theBaseTS,3,2) else ()"/>
    <let name="theMonth" value="if (substring($theBaseTS,5,2) castable as xs:integer) then substring($theBaseTS,5,2) else ()"/>
    <let name="theDay" value="if (substring($theBaseTS,7,2) castable as xs:integer) then substring($theBaseTS,7,2) else ()"/>
    <let name="theHour" value="if (substring($theBaseTS,9,2) castable as xs:integer) then substring($theBaseTS,9,2) else ()"/>
    <let name="theMinute" value="if (substring($theBaseTS,11,2) castable as xs:integer) then substring($theBaseTS,11,2) else ()"/>
    <let name="theSecond" value="if (substring($theBaseTS,13,2) castable as xs:integer) then substring($theBaseTS,13,2) else ()"/>
    <let name="theSubSecond" value="if (substring($theBaseTS,16) castable as xs:integer) then substring($theBaseTS,15) else ()"/>
    
    <let name="cCentury" value="if (empty($theCentury)) then '00' else $theCentury"/>
    <let name="cYear" value="if (empty($theYear)) then '00' else $theYear"/>
    <let name="cMonth" value="if (empty($theMonth)) then '01' else $theMonth"/>
    <let name="cDay" value="if (empty($theDay)) then '01' else $theDay"/>
    <let name="cHour" value="if (empty($theHour)) then '00' else $theHour"/>
    <let name="cMinute" value="if (empty($theMinute)) then '00' else $theMinute"/>
    <let name="cSecond" value="if (empty($theSecond)) then '00' else $theSecond"/>
    <let name="cTZ" value="string-join(($theTZh,$theTZm),':')"/>
    
    <let name="theTSString" value="string-join(($theBC,$theCentury,$theYear,$theMonth,$theDay,$theHour,$theMinute,$theSecond,$theSubSecond,$theTZ),'')"/>
    <let name="theDateTime" value="concat($theBC,$cCentury,$cYear,'-',$cMonth,'-',$cDay,'T',$cHour,':',$cMinute,':',$cSecond,$theSubSecond,$cTZ)"/>
    
    <assert test="empty($theTS) or ($theTS=$theTSString and $theDateTime castable as xs:dateTime)">dtr1-9-IVL_TS: <value-of select="local-name()"/>/low "<value-of select="$theTS"/>" is not a valid timestamp.</assert>
    
    <let name="theTS" value="hl7:center/@value"/>
    <let name="theBC" value="if (starts-with($theTS,'-')) then '-' else ()"/>
    <let name="theTZ" value="replace($theTS,'-?[^+-]+([+-].*)?$','$1')"/>
    <let name="theTZh" value="if (string-length($theTZ)&gt;0) then substring($theTZ,1,3) else ()"/>
    <let name="theTZm" value="if (string-length($theTZ)&gt;3) then substring($theTZ,4) else ()"/>
    <let name="theBaseTS" value="replace($theTS,'^-?([^+-]+)([+-].*)?','$1')"/>
    <let name="theCentury" value="if (substring($theBaseTS,1,2) castable as xs:integer) then substring($theBaseTS,1,2) else ()"/>
    <let name="theYear" value="if (substring($theBaseTS,3,2) castable as xs:integer) then substring($theBaseTS,3,2) else ()"/>
    <let name="theMonth" value="if (substring($theBaseTS,5,2) castable as xs:integer) then substring($theBaseTS,5,2) else ()"/>
    <let name="theDay" value="if (substring($theBaseTS,7,2) castable as xs:integer) then substring($theBaseTS,7,2) else ()"/>
    <let name="theHour" value="if (substring($theBaseTS,9,2) castable as xs:integer) then substring($theBaseTS,9,2) else ()"/>
    <let name="theMinute" value="if (substring($theBaseTS,11,2) castable as xs:integer) then substring($theBaseTS,11,2) else ()"/>
    <let name="theSecond" value="if (substring($theBaseTS,13,2) castable as xs:integer) then substring($theBaseTS,13,2) else ()"/>
    <let name="theSubSecond" value="if (substring($theBaseTS,16) castable as xs:integer) then substring($theBaseTS,15) else ()"/>
    
    <let name="cCentury" value="if (empty($theCentury)) then '00' else $theCentury"/>
    <let name="cYear" value="if (empty($theYear)) then '00' else $theYear"/>
    <let name="cMonth" value="if (empty($theMonth)) then '01' else $theMonth"/>
    <let name="cDay" value="if (empty($theDay)) then '01' else $theDay"/>
    <let name="cHour" value="if (empty($theHour)) then '00' else $theHour"/>
    <let name="cMinute" value="if (empty($theMinute)) then '00' else $theMinute"/>
    <let name="cSecond" value="if (empty($theSecond)) then '00' else $theSecond"/>
    <let name="cTZ" value="string-join(($theTZh,$theTZm),':')"/>
    
    <let name="theTSString" value="string-join(($theBC,$theCentury,$theYear,$theMonth,$theDay,$theHour,$theMinute,$theSecond,$theSubSecond,$theTZ),'')"/>
    <let name="theDateTime" value="concat($theBC,$cCentury,$cYear,'-',$cMonth,'-',$cDay,'T',$cHour,':',$cMinute,':',$cSecond,$theSubSecond,$cTZ)"/>
    
    <assert test="empty($theTS) or ($theTS=$theTSString and $theDateTime castable as xs:dateTime)">dtr1-9-IVL_TS: <value-of select="local-name()"/>/center "<value-of select="$theTS"/>" is not a valid timestamp.</assert>
    
    <let name="theTS" value="hl7:high/@value"/>
    <let name="theBC" value="if (starts-with($theTS,'-')) then '-' else ()"/>
    <let name="theTZ" value="replace($theTS,'-?[^+-]+([+-].*)?$','$1')"/>
    <let name="theTZh" value="if (string-length($theTZ)&gt;0) then substring($theTZ,1,3) else ()"/>
    <let name="theTZm" value="if (string-length($theTZ)&gt;3) then substring($theTZ,4) else ()"/>
    <let name="theBaseTS" value="replace($theTS,'^-?([^+-]+)([+-].*)?','$1')"/>
    <let name="theCentury" value="if (substring($theBaseTS,1,2) castable as xs:integer) then substring($theBaseTS,1,2) else ()"/>
    <let name="theYear" value="if (substring($theBaseTS,3,2) castable as xs:integer) then substring($theBaseTS,3,2) else ()"/>
    <let name="theMonth" value="if (substring($theBaseTS,5,2) castable as xs:integer) then substring($theBaseTS,5,2) else ()"/>
    <let name="theDay" value="if (substring($theBaseTS,7,2) castable as xs:integer) then substring($theBaseTS,7,2) else ()"/>
    <let name="theHour" value="if (substring($theBaseTS,9,2) castable as xs:integer) then substring($theBaseTS,9,2) else ()"/>
    <let name="theMinute" value="if (substring($theBaseTS,11,2) castable as xs:integer) then substring($theBaseTS,11,2) else ()"/>
    <let name="theSecond" value="if (substring($theBaseTS,13,2) castable as xs:integer) then substring($theBaseTS,13,2) else ()"/>
    <let name="theSubSecond" value="if (substring($theBaseTS,16) castable as xs:integer) then substring($theBaseTS,15) else ()"/>
    
    <let name="cCentury" value="if (empty($theCentury)) then '00' else $theCentury"/>
    <let name="cYear" value="if (empty($theYear)) then '00' else $theYear"/>
    <let name="cMonth" value="if (empty($theMonth)) then '01' else $theMonth"/>
    <let name="cDay" value="if (empty($theDay)) then '01' else $theDay"/>
    <let name="cHour" value="if (empty($theHour)) then '00' else $theHour"/>
    <let name="cMinute" value="if (empty($theMinute)) then '00' else $theMinute"/>
    <let name="cSecond" value="if (empty($theSecond)) then '00' else $theSecond"/>
    <let name="cTZ" value="string-join(($theTZh,$theTZm),':')"/>
    
    <let name="theTSString" value="string-join(($theBC,$theCentury,$theYear,$theMonth,$theDay,$theHour,$theMinute,$theSecond,$theSubSecond,$theTZ),'')"/>
    <let name="theDateTime" value="concat($theBC,$cCentury,$cYear,'-',$cMonth,'-',$cDay,'T',$cHour,':',$cMinute,':',$cSecond,$theSubSecond,$cTZ)"/>
    
    <assert test="empty($theTS) or ($theTS=$theTSString and $theDateTime castable as xs:dateTime)">dtr1-9-IVL_TS: <value-of select="local-name()"/>/high "<value-of select="$theTS"/>" is not a valid timestamp.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_TS.EPSOS.TZ.sch?><rule abstract="true" id="IVL_TS.EPSOS.TZ">
    <extends rule="IVL_TS"/>

    <assert role="error" test="not(@value) or matches(@value,'^[0-9]{8}')">dtr1-1-IVL_TS.EPSOS.TZ: time SHALL be precise to the day</assert>
    
    <assert role="warning" test="not(@value) or matches(@value,'^[0-9]{14}')">dtr1-2-IVL_TS.EPSOS.TZ: time SHOULD be precise to the second</assert>
    
    <assert role="error" test="not(matches(@value,'^[0-9]{8}')) or contains(@value,'+') or contains(@value,'-')">dtr1-3-IVL_TS.EPSOS.TZ: time SHALL include a time zone if more precise than to the day</assert>
    
    <assert role="error" test="not(hl7:low/@value) or hl7:low[matches(@value,'^[0-9]{8}')]">dtr1-4-IVL_TS.EPSOS.TZ: low boundary SHALL be precise to the day</assert>
    
    <assert role="warning" test="not(hl7:low/@value) or hl7:low[matches(@value,'^[0-9]{14}')]">dtr1-5-IVL_TS.EPSOS.TZ: low boundary SHOULD be precise to the second</assert>
    
    <assert role="error" test="not(hl7:low[matches(@value,'^[0-9]{8}')]) or hl7:low[contains(@value,'+') or contains(@value,'-')]">dtr1-6-IVL_TS.EPSOS.TZ: low boundary SHALL include a time zone if more precise than to the day</assert>
    
    <assert role="error" test="not(hl7:center/@value) or hl7:center[matches(@value,'^[0-9]{8}')]">dtr1-7-IVL_TS.EPSOS.TZ: center value SHALL be precise to the day</assert>
    
    <assert role="warning" test="not(hl7:center/@value) or hl7:center[matches(@value,'^[0-9]{14}')]">dtr1-8-IVL_TS.EPSOS.TZ: center value SHOULD be precise to the second</assert>
    
    <assert role="error" test="not(hl7:center[matches(@value,'^[0-9]{8}')]) or hl7:center[contains(@value,'+') or contains(@value,'-')]">dtr1-9-IVL_TS.EPSOS.TZ: center value SHALL include a time zone if more precise than to the day</assert>
    
    <assert role="error" test="not(hl7:high/@value) or hl7:high[matches(@value,'^[0-9]{8}')]">dtr1-10-IVL_TS.EPSOS.TZ: high boundary SHALL be precise to the day</assert>
    
    <assert role="warning" test="not(hl7:high/@value) or hl7:high[matches(@value,'^[0-9]{14}')]">dtr1-11-IVL_TS.EPSOS.TZ: high boundary SHOULD be precise to the second</assert>
    
    <assert role="error" test="not(hl7:high[matches(@value,'^[0-9]{8}')]) or hl7:high[contains(@value,'+') or contains(@value,'-')]">dtr1-12-IVL_TS.EPSOS.TZ: high boundary SHALL include a time zone if more precise than to the day</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_TS.EPSOS.TZ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_IVL_TS.EPSOS.TZ.OPT.sch?><rule abstract="true" id="IVL_TS.EPSOS.TZ.OPT">
    <extends rule="IVL_TS"/>

    <assert role="error" test="not(@value) or matches(@value,'^[0-9]{4}')">dtr1-1-IVL_TS.EPSOS.TZ.OPT.TZ: time SHALL be precise to at least the year</assert>
    
    <assert role="warning" test="not(@value) or matches(@value,'^[0-9]{8}')">dtr1-2-IVL_TS.EPSOS.TZ.OPT.TZ: time SHOULD be precise to the day</assert>
    
    <!--<assert role="error" test="not(matches(@value,'^[0-9]{8}')) or contains(@value,'+') or contains(@value,'-')"
        >dtr1-3-IVL_TS.EPSOS.TZ.OPT: time SHALL include a time zone if more precise than to the day</assert>-->
    
    <assert role="error" test="not(hl7:low/@value) or hl7:low[matches(@value,'^[0-9]{4}')]">dtr1-4-IVL_TS.EPSOS.TZ.OPT: low boundary SHALL be precise to at least the year</assert>
    
    <assert role="warning" test="not(hl7:low/@value) or hl7:low[matches(@value,'^[0-9]{8}')]">dtr1-5-IVL_TS.EPSOS.TZ.OPT: low boundary SHOULD be precise to the day</assert>
    
    <!--<assert role="error" test="not(hl7:low[matches(@value,'^[0-9]{8}')]) or hl7:low[contains(@value,'+') or contains(@value,'-')]"
        >dtr1-6-IVL_TS.EPSOS.TZ.OPT: low boundary SHALL include a time zone if more precise than to the day</assert>-->
    
    <assert role="error" test="not(hl7:center/@value) or hl7:center[matches(@value,'^[0-9]{4}')]">dtr1-7-IVL_TS.EPSOS.TZ.OPT: center value SHALL be precise to at least the year</assert>
    
    <assert role="warning" test="not(hl7:center/@value) or hl7:center[matches(@value,'^[0-9]{8}')]">dtr1-8-IVL_TS.EPSOS.TZ.OPT: center value SHOULD be precise to the day</assert>
    
    <!--<assert role="error" test="not(hl7:center[matches(@value,'^[0-9]{8}')]) or hl7:center[contains(@value,'+') or contains(@value,'-')]"
        >dtr1-9-IVL_TS.EPSOS.TZ.OPT: center value SHALL include a time zone if more precise than to the day</assert>-->
    
    <assert role="error" test="not(hl7:high/@value) or hl7:high[matches(@value,'^[0-9]{4}')]">dtr1-10-IVL_TS.EPSOS.TZ.OPT: high boundary SHALL be precise to at least the year</assert>
    
    <assert role="warning" test="not(hl7:high/@value) or hl7:high[matches(@value,'^[0-9]{8}')]">dtr1-11-IVL_TS.EPSOS.TZ.OPT: high boundary SHOULD be precise to the day</assert>
    
    <!--<assert role="error" test="not(hl7:high[matches(@value,'^[0-9]{8}')]) or hl7:high[contains(@value,'+') or contains(@value,'-')]"
        >dtr1-12-IVL_TS.EPSOS.TZ.OPT: high boundary SHALL include a time zone if more precise than to the day</assert>-->
    
</rule><?DSDL_INCLUDE_END include/DTr1_IVL_TS.EPSOS.TZ.OPT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_PIVL_TS.sch?><rule abstract="true" id="PIVL_TS">
    <extends rule="SXCM_TS"/>

    <assert role="error" test="count(hl7:*[self::hl7:phase or self::hl7:period][@updateMode])=0">dtr1-1-PIVL_TS: Datatype PIVL_TS: no updateMode on PIVL attributes</assert>

    <assert role="error" test="descendant-or-self::hl7:*[(@nullFlavor and not(@value|@unit|*)) or          (not(@nullFlavor) and (@value|@unit|*))]">dtr1-2-PIVL_TS: null violation. Cannot have @nullFlavor and @value or child elements, or the other way round</assert>

    <assert role="error" test="         not(*) or         self::hl7:*[@nullFlavor] or         self::hl7:*[not(@nullFlavor) and @value and not(*)] or         self::hl7:*[not(@nullFlavor) and not(@value)]/*[@nullFlavor] or         self::hl7:*[not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center and (hl7:low|hl7:high|hl7:width))] or         self::hl7:*[not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center) and not(hl7:width and (hl7:low|hl7:high))]">dtr1-3-PIVL_TS: co-occurence violation. Cannot have @value and other child elements, or missing @value and child elements with data, or center element with other elements, or width element
        with both low and high elements</assert>

    <!--<assert role="error" test="
        not(self::hl7:*[hl7:low/@value and hl7:high/@value]) or 
        self::hl7:*[string-length(hl7:low/@value) = string-length(hl7:high/@value)]"
        >dtr1-4-PIVL_TS: low/@value must have the same precision as high/@value</assert>-->

    <assert role="error" test="not(hl7:period[string-length(substring-after(@value,'.')) &gt; 4])">dtr1-5-PIVL_TS: period/@value must be rounded to 4 digits or less</assert>

    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(hl7:width) or         hl7:width[not(@unit)] or         hl7:width[@value and @unit]">dtr1-6-PIVL_TS: width element: no unit without value</assert>
    
    <assert role="error" test="not(hl7:width/hl7:translation)">dtr1-7-PIVL_TS: width element: no translation</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_PIVL_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_EIVL_TS.sch?><rule abstract="true" id="EIVL_TS">
    <extends rule="SXCM_TS"/>

    <assert role="error" test="@nullFlavor or (hl7:event)">dtr1-1-EIVL_TS: required attributes</assert>
    <assert role="error" test="count(*[self::hl7:offset][@updateMode])=0">dtr1-2-EIVL_TS: no updateMode on EIVL attributes</assert>

    <assert role="error" test="not(hl7:event) or not(hl7:event[@nullFlavor][@code]) or hl7:event[@nullFlavor or @code]">dtr1-3-EIVL_TS: null violation</assert>
    <assert role="error" test="not(hl7:event/@codeSystem)">dtr1-4-EIVL_TS: cannot have codeSystem</assert>
    <assert role="error" test="not(hl7:event/@codeSystemName)">dtr1-5-EIVL_TS: cannot have codeSystemName</assert>
    <assert role="error" test="not(hl7:event/@codeSystemVersion)">dtr1-6-EIVL_TS: cannot have codeSystemVersion</assert>
    <assert role="error" test="not(hl7:event/@displayName)">dtr1-7-EIVL_TS: cannot have displayName</assert>
    <assert role="error" test="not(hl7:event/hl7:originalText)">dtr1-8-EIVL_TS: cannot have originalText</assert>
    <assert role="error" test="not(hl7:event/hl7:qualifier)">dtr1-9-EIVL_TS: cannot have qualifier</assert>
    <assert role="error" test="not(hl7:event/hl7:translation)">dtr1-10-EIVL_TS: cannot have translation</assert>

    <assert role="error" test="(not(hl7:offset)) or (hl7:offset/@nullFlavor and not(hl7:offset/@value|hl7:offset/@unit|hl7:offset/*)) or          (not(hl7:offset/@nullFlavor) and (hl7:offset/@value|hl7:offset/@unit|hl7:offset/*))">dtr1-11-EIVL_TS: offset null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>
    <assert role="error" test="not(hl7:offset/*[@nullFlavor and (@value|@unit)])">dtr1-12-EIVL_TS: offset null violation. Cannot have @nullFlavor and @value on any child elements</assert>
    <assert role="error" test="(not(hl7:offset)) or          hl7:offset/@nullFlavor or         (not(hl7:offset/@nullFlavor) and hl7:offset/@value and not(hl7:offset/*)) or         (not(hl7:offset/@nullFlavor) and not(hl7:offset/@value) and (hl7:offset/hl7:low|hl7:offset/hl7:center|hl7:offset/hl7:high|hl7:offset/hl7:width)) or         (not(hl7:offset/@nullFlavor) and not(hl7:offset/@value) and (hl7:offset/hl7:*[not(@nullFlavor)])) or         (not(hl7:offset/@nullFlavor) and not(hl7:offset/@value) and hl7:center and not(hl7:low|hl7:high|hl7:width)) or         (not(hl7:offset/@nullFlavor) and not(hl7:offset/@value) and not(hl7:offset/hl7:center) and hl7:offset/hl7:width and not(hl7:offset/hl7:low and hl7:offset/hl7:high))">dtr1-13-EIVL_TS: offset co-occurence violation. Cannot have @value and other child elements, or missing @value and child elements with data, or center element with other elements, or width element
        with both low and high elements</assert>
    <assert role="error" test="count(hl7:offset/*[@updateMode])=0">dtr1-14-EIVL_TS: no updateMode on IVL attributes</assert>
    <assert role="error" test="not(hl7:offset/hl7:low/@value and hl7:offset/hl7:high/@value) or string-length(hl7:offset/hl7:low/@value) = string-length(hl7:offset/hl7:high/@value)">dtr1-15-EIVL_TS:
        value in offset/low/@value shall have same precision as offset/high/@value</assert>

    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <!-- check for the presence of xsi:type and if present check correct data type requested -->
    <assert role="error" test="not(hl7:offset[@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')]/hl7:width) or         hl7:offset[@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')]/hl7:width[not(@unit)] or         hl7:offset[@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')]/hl7:width[@value and @unit]">dtr1-16-EIVL_TS: width element: no unit without value</assert>
    <assert role="error" test="not(hl7:offset/hl7:width/hl7:translation)">dtr1-17-EIVL_TS: width element: no translation</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_EIVL_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SXPR_TS.sch?><rule abstract="true" id="SXPR_TS">
    <extends rule="SXCM_TS"/>

    <assert role="error" test="@nullFlavor or count(hl7:comp) &gt;= 2">dtr1-1-SXPR_TS: null or at least two components</assert>
    
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='SXPR_TS' or ends-with(@xsi:type,':SXPR_TS'))]) or          descendant::hl7:comp[(@xsi:type='SXPR_TS' or ends-with(@xsi:type,':SXPR_TS')) and @nullFlavor] or          descendant::hl7:comp[(@xsi:type='SXPR_TS' or ends-with(@xsi:type,':SXPR_TS')) and count(hl7:comp) &gt;= 2]">dtr1-2-SXPR_TS: null or at least two components</assert>

    <assert role="error" test="count(descendant::hl7:*[@updateMode])=0">dtr1-3-SXPR_TS: no updateMode on components or other subelements</assert>

    <!-- comp type IVL_TS -->
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]) or         (descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and @nullFlavor and not(@value|@unit|*)]) or          (descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and not(@nullFlavor) and (@value|@unit|*)])">dtr1-4-SXPR_TS: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>

    <assert role="error" test="         not(descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]/*) or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and @nullFlavor] or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and not(@nullFlavor) and @value and not(*)] or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and not(@nullFlavor) and not(@value)]/*[@nullFlavor] or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center and (hl7:low|hl7:high|hl7:width))] or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center) and not(hl7:width and (hl7:low|hl7:high))]">dtr1-5-SXPR_TS: co-occurence violation. Cannot have @value and other child elements, or missing @value and child elements with data, or center element with other elements, or width element
        with both low and high elements</assert>

    <assert role="error" test="         not(descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and hl7:low/@value and hl7:high/@value]) or          descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS')) and string-length(hl7:low/@value) = string-length(hl7:high/@value)]">dtr1-6-SXPR_TS: comp/low/@value must have the same precision as comp/high/@value</assert>

    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]/hl7:width) or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]/hl7:width[not(@unit)] or         descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]/hl7:width[@value and @unit]">dtr1-7-SXPR_TS: width element: no unit without value</assert>

    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='IVL_TS' or ends-with(@xsi:type,':IVL_TS'))]/hl7:width/hl7:translation)">dtr1-8-SXPR_TS: width element: no translation</assert>

    <!-- comp type PIVL_TS -->
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]) or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:period[@nullFlavor and not(@value)] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:period[not(@nullFlavor) and @value]">dtr1-9-SXPR_TS: null or value in period</assert>

    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]) or         not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:period[@nullFlavor]/hl7:translation) or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:period[not(@nullFlavor)]/hl7:translation">dtr1-10-SXPR_TS: no translation if null in period</assert>

    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]) or         (descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and @nullFlavor and not(@value|@unit|*)]) or          (descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and not(@nullFlavor) and (@value|@unit|*)])">dtr1-11-SXPR_TS: null violation. Cannot have @nullFlavor and @value or child elements, or the other way around</assert>

    <assert role="error" test="         not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/*) or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and @nullFlavor] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and not(@nullFlavor) and @value and not(*)] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and not(@nullFlavor) and not(@value)]/*[@nullFlavor] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center and (hl7:low|hl7:high|hl7:width))] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and not(@nullFlavor) and not(@value)]/*[not(@nullFlavor) and not(hl7:center) and not(hl7:width and (hl7:low|hl7:high))]">dtr1-12-SXPR_TS: co-occurence violation. Cannot have @value and other child elements, or missing @value and child elements with data, or center element with other elements, or width element
        with both low and high elements</assert>

    <assert role="error" test="         not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and hl7:low/@value and hl7:high/@value]) or          descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS')) and string-length(hl7:low/@value) = string-length(hl7:high/@value)]">dtr1-13-SXPR_TS: comp/low/@value must have the same precision as comp/high/@value</assert>

    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:period[string-length(substring-after(@value,'.')) &gt; 4])">dtr1-14-SXPR_TS: waarde in period/@value moet zijn afgerond
        op 4 decimalen of minder</assert>

    <!-- width has datatype PQR, which extends CV ((){1}(((0[1-9])|([12]\d)|(3[01]))?)?)? -->
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:width) or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:width[not(@unit)] or         descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:width[@value and @unit]">dtr1-15-SXPR_TS: width element: no unit without value</assert>

    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='PIVL_TS' or ends-with(@xsi:type,':PIVL_TS'))]/hl7:width/hl7:translation)">dtr1-16-SXPR_TS: width element: no translation</assert>

    <!-- EIVL_TS
    <assert role="error" test="not(descendant::hl7:comp[(@xsi:type='EIVL_TS' or ends-with(@xsi:type,':EIVL_TS'))])">Datatype SXPR_TS/EIVL_TS: dit datatype is in Nederland nog niet toegestaan</assert>
    -->

</rule><?DSDL_INCLUDE_END include/DTr1_SXPR_TS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.DATE.sch?><rule abstract="true" id="TS.DATE">
    <extends rule="TS"/>
        
    <assert role="error" test="@nullFlavor or matches(@value, '^[0-9]{4,8}$')">dtr1-1-TS.DATE: null or date precision of time stamp shall be YYYYMMDD.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.DATE.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.DATE.FULL.sch?><rule abstract="true" id="TS.DATE.FULL">
    <extends rule="TS"/>
        
    <assert role="error" test="@nullFlavor or matches(@value, '^[0-9]{8,8}$')">dtr1-1-TS.DATE.FULL: null or date precision of time stamp shall be YYYYMMDD.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.DATE.FULL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.DATE.MIN.sch?><rule abstract="true" id="TS.DATE.MIN">
    <extends rule="TS"/>
        
    <assert role="error" test="@nullFlavor or matches(@value, '^[0-9]{8,8}')">dtr1-1-TS.DATE.MIN: null or date precision of time stamp shall be at least YYYYMMDD.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.DATE.MIN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.DATETIME.MIN.sch?><rule abstract="true" id="TS.DATETIME.MIN">
    <extends rule="TS"/>
        
    <assert role="error" test="@nullFlavor or matches(@value, '^[0-9]{14,14}')">dtr1-1-TS.DATETIME.MIN: null or date precision of time stamp shall be at least YYYYMMDDhhmmss.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.DATETIME.MIN.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.EPSOS.TZ.sch?><rule abstract="true" id="TS.EPSOS.TZ">
    <extends rule="TS"/>

    <assert role="error" test="not(@value) or matches(@value,'^[0-9]{8}')">dtr1-1-TS.EPSOS.TZ: time SHALL be precise to the day</assert>
    
    <assert role="warning" test="not(@value) or matches(@value,'^[0-9]{14}')">dtr1-2-TS.EPSOS.TZ: time SHOULD be precise to the second</assert>
    
    <assert role="error" test="not(matches(@value,'^[0-9]{8}')) or contains(@value,'+') or contains(@value,'-')">dtr1-3-TS.EPSOS.TZ: time SHALL include a time zone if more precise than to the day</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TS.EPSOS.TZ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TS.EPSOS.TZ.OPT.sch?><rule abstract="true" id="TS.EPSOS.TZ.OPT">
    <extends rule="TS"/>

    <assert role="error" test="not(@value) or matches(@value,'^[0-9]{4}')">dtr1-1-TS.EPSOS.TZ.OPT: time SHALL be precise to at least the year</assert>
    
    <assert role="warning" test="not(@value) or matches(@value,'^[0-9]{8}')">dtr1-2-TS.EPSOS.TZ.OPT: time SHOULD be precise to the day</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_TS.EPSOS.TZ.OPT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_RTO_PQ_PQ.sch?><rule abstract="true" id="RTO_PQ_PQ">
    <extends rule="QTY"/>
    
    <assert role="error" test="@nullFlavor or (hl7:numerator[not(@nullFlavor)] and hl7:denominator[not(@nullFlavor)])">dtr1-1-RTO_PQ_PQ: numerator and denominator required</assert>
    
    <assert role="error" test="not(hl7:numerator[@updateMode] or hl7:denominator[@updateMode])">dtr1-2-RTO_PQ_PQ: no updateMode on numerator or denominator</assert>
    <assert role="error" test="not(hl7:uncertainty)">dtr1-3-RTO_PQ_PQ: no uncertainty</assert>
    
    <assert role="error" test="not(hl7:denominator/@value='0')">dtr1-4-RTO_PQ_PQ: The denominator must not be zero.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_RTO_PQ_PQ.sch?>
      <?DSDL_INCLUDE_START include/DTr1_RTO_QTY_QTY.sch?><rule abstract="true" id="RTO_QTY_QTY">
    <extends rule="QTY"/>
    
    <assert role="error" test="@nullFlavor or (hl7:numerator[not(@nullFlavor)] and hl7:denominator[not(@nullFlavor)])">dtr1-1-RTO_QTY_QTY: numerator and denominator required</assert>
    
    <assert role="error" test="not(hl7:numerator[@updateMode] or hl7:denominator[@updateMode])">dtr1-2-RTO_QTY_QTY: no updateMode on numerator or denominator</assert>
    <assert role="error" test="not(hl7:uncertainty)">dtr1-3-RTO_QTY_QTY: no uncertainty</assert>
    
    <assert role="error" test="not(hl7:denominator/@value='0')">dtr1-4-RTO_QTY_QTY: The denominator must not be zero.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_RTO_QTY_QTY.sch?>
      <?DSDL_INCLUDE_START include/DTr1_RTO.sch?><rule abstract="true" id="RTO">
    <extends rule="RTO_QTY_QTY"/>
</rule><?DSDL_INCLUDE_END include/DTr1_RTO.sch?>
      <?DSDL_INCLUDE_START include/DTr1_SD.TEXT.sch?><rule abstract="true" id="SD.TEXT">
    <!-- SD.TEXT (StrucDoc.Text) does not extend or restrict anything -->
    <extends rule="ANY"/>
</rule><?DSDL_INCLUDE_END include/DTr1_SD.TEXT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_URL.sch?><rule abstract="true" id="URL">
    <extends rule="ANY"/>

    <!--<let name="urlScheme" value="substring-before(@value,':')"/>
    <let name="urlStr" value="substring-after(@value,':')"/>-->
    
    <assert role="error" test="@nullFlavor or @value">dtr1-1-URL: elements of type URL SHALL have a @value attribute.</assert>
    <assert role="error" test="@nullFlavor or @value=iri-to-uri(@value)">dtr1-2-URL: @value must be a valid URI, e.g. '<value-of select="iri-to-uri(@value)"/>'.</assert>
    <!--
    <assert role="error" test="@nullFlavor or matches(@value,'^[a-z\d+\.-]+:')">dtr1-3-URL: @value must be a valid URI with a scheme.</assert>
    -->
    
    <!-- http://gazelle.ihe.net/cda/cda-basic-req.pdf -->
    <let name="name" value="local-name()"/>
    <let name="use" value="@use"/>
    <let name="value" value="@value"/>
    <let name="set_other" value="preceding-sibling::*[local-name()=$name] | following-sibling::*[local-name()=$name]"/>
    <assert role="error" test="not(@nullFlavor and $set_other[not(@nullFlavor)])">dtr1-4-URL: [RIM-001] <value-of select="$name"/> SHALL NOT have nullFlavor, if there are other <value-of select="$name"/> elements which are not null</assert>
    <assert role="error" test="not($set_other[@value=$value])">dtr1-5-URL: [RIM-002] <value-of select="$name"/> (<value-of select="$value"/>) SHALL be distinct</assert>
    <!-- Note: ignoring set_cs here... -->
    <!--<assert role="error" test="not($set_other[@use=$use])"
        >dtr1-6-URL: <value-of select="$name"/>/@use (<value-of select="$use"/>) SHALL be distinct</assert>-->
</rule><?DSDL_INCLUDE_END include/DTr1_URL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TEL.sch?><rule abstract="true" id="TEL">
    <extends rule="URL"/>

    <assert role="error" test="not(@nullFlavor and hl7:usablePeriod)">dtr1-1-TEL: not null and usablePeriod</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TEL.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TEL.AT.sch?><rule abstract="true" id="TEL.AT">
    <extends rule="TEL"/>
    
    <let name="urlScheme" value="substring-before(@value,':')"/>
    <assert role="error" test="not(@value) or $urlScheme = ('fax', 'file', 'ftp', 'mllp', 'http', 'mailto', 'me', 'modem', 'nfs', 'tel', 'telnet')">dtr1-1-TEL.AT: ungültiges URL-Schema <value-of select="$urlScheme"/>
   </assert>
    <assert role="error" test="not(@use) or translate(concat(' ', @use, ' '), '(H|HP|HV|WP|AS|EC|MC|PG) ', '') = ''">dtr1-2-TEL.AT: @use MUSS aus den Werten 'H', 'HP', 'HV', 'WP', 'AS', 'EC', 'MC', 'PG' gewählt werden.</assert>
    <assert role="error" test="not($urlScheme=('tel','fax')) or matches(@value,'[a-z\d+\.-]+:\+{0,1}[0-9\.\-\(\)]+$')">dtr1-3-TEL.AT: Nur Ziffernzeichen 0 bis 9, ggf. mit vorangehendem + sowie als visuelle Separatorzeichen Bindestrich -, Punkt . oder Klammern () sind erlaubt.</assert>
    
</rule><?DSDL_INCLUDE_END include/DTr1_TEL.AT.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TEL.EPSOS.sch?><rule abstract="true" id="TEL.EPSOS">
    <extends rule="TEL"/>

    <let name="urlScheme" value="substring-before(@value,':')"/>
    <let name="urlStr" value="substring-after(@value,':')"/>
    
    <assert test="not($urlScheme=('tel','fax')) or matches($urlStr,'^\+?[0-9()\.-]+$')">dtr1-TEL.EPSOS: Phone and fax numbers SHALL consist of an optional leading + for country code followed by digits 0-9. The only other allowable characters are parentheses (), hyphens - and/or dots. Pattern is '^\+?[0-9()\.-]+$'</assert>
    
    <assert test="not($urlScheme=('tel','fax')) or matches(replace($urlStr,'[^\d]',''),'[0-9]+')">dtr2-TEL.EPSOS: Phone and fax numbers SHALL have at least one dialing digit in the phone number after visual separators are removed.</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TEL.EPSOS.sch?>
      <?DSDL_INCLUDE_START include/DTr1_TEL.NL.EXTENDED.sch?><rule abstract="true" id="TEL.NL.EXTENDED">
    <extends rule="URL.NL.EXTENDED"/>

    <assert role="error" test="not(@nullFlavor and hl7:usablePeriod)">dtr1-1-TEL: not null and usablePeriod</assert>
</rule><?DSDL_INCLUDE_END include/DTr1_TEL.NL.EXTENDED.sch?>
      <?DSDL_INCLUDE_START include/DTr1_URL.NL.EXTENDED.sch?><rule abstract="true" id="URL.NL.EXTENDED">
    <extends rule="URL"/>

    <let name="urlScheme" value="substring-before(@value,':')"/>
    <let name="urlStr" value="substring-after(@value,':')"/>
    
    <!-- 
        Tested with: <telecom use="HP" value="tel:+31190531770"/>
        <telecom use="HP" value="tel:+31-(0)190531770%20;isub=1%2023"/>
        <telecom value="tel:41234567"/>
        <telecom value="tel:01041234567"/>
        <telecom value="mailto:afdsf.-.b@b.nl"/>
        <telecom value="mailto:afdsf-b@b.nl"/>
        <telecom value="mailto:afdsfb@b-b.nl"/>
        <telecom value="http://www.nictiz.nl:8080/directory"/>
        <telecom value="http://tools.ietf.org/html/rfc2616"/>
        <telecom value="http://abc.com:80/~smith/home.html"/>
        <telecom value="http://ABC.com/%7Esmith/home.html"/>
        <telecom value="http://ABC.com:/%7esmith/home.html"/>
        <telecom
        value="http://www.linkedin.com/memberInvite?acceptInvitation=&amp;invitationID=775190257&amp;sharedKey=DT2gs65T&amp;itemID=I1478332986_2&amp;goback=%2Emml_inbox_none_DATE_1"/>
        <telecom value="http://www.google.com/search?client=safari&amp;rls=en&amp;q=http&amp;ie=UTF-&amp;&amp;oe=UTF-8"/>
        <telecom
        value="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-6744919314769019&amp;format=fp_al_lp&amp;output=html&amp;h=15&amp;w=728&amp;ea=0&amp;flash=10.0.32&amp;url=http%3A%2F%2Fwww.asciitable.com%2F&amp;dt=1254481943190&amp;prev_fmts=728x15_0ads_al_s&amp;correlator=1254481943041&amp;frm=0&amp;ga_vid=144077625.1254481943&amp;ga_sid=1254481943&amp;ga_hid=1308288403&amp;ga_fc=0&amp;u_tz=120&amp;u_his=2&amp;u_java=1&amp;u_h=900&amp;u_w=1440&amp;u_ah=874&amp;u_aw=1440&amp;u_cd=24&amp;u_nplug=12&amp;u_nmime=126&amp;biw=1280&amp;bih=764&amp;fu=0&amp;ifi=2&amp;dtd=19&amp;kw_type=radlink&amp;rt=ChBKxeAdAAfWUgreC87p9BZcEhFFQkNESUMgQ29udmVyc2lvbhoI4oCu6eKAF3Qg-t7QxAIoAUj63tDEAlITCOSh6Lednp0CFRMv3godeiF75w&amp;hl=en&amp;kw0=Hex+Tool&amp;kw1=EBCDIC+Hex&amp;kw2=EBCDIC+ASCII&amp;kw3=EBCDIC+Conversion&amp;kw4=EBCDIC+Table&amp;okw=EBCDIC+Conversion"/>
        <telecom value="http://www.google.com/url?ct=abg&amp;pa="/>
        <telecom value="http://www.google.com/url?ct=abg&amp;q=https://www.google.com/adsense/support/bin/request.py#dsffsd*!"/>
        <telecom
        value="http://www.google.com/url?ct=abg&amp;q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.asciitable.com/%26hl%3Den%26client%3Dca-pub-6744919314769019%26adU%3Dwww.intodq.com%26adT%3DValue%2Byour%2Bdata%26adU%3Dwww.pervasivedatatools.com%26adT%3Dascii%2Bebcdic%2Btranscoding%26adU%3Dwww.softwaremining.com%26adT%3DCobol%2BTo%2BOO%2BJava/C%2523%26adU%3Dwww.dbload.com%26adT%3DData%2BExport%2B%2526amp%253B%2BImport%2BTool%26adU%3Dwww.metex.com%26adT%3DApplication%2BModernization%26adU%3Dwww.Import-Usa-Cars.nl/Vans%26adT%3DImport%2BUSA%2BCars%26adU%3Dwww.CobolProducts.com/datafile/%26adT%3DConvert%2BCobol%2BData%2BFiles%26adU%3Dwww.Transend.com/EmailConversion%26adT%3DEmail%2BConversion%2BSoftware%26adU%3Dwww.skills-1st.co.uk%26adT%3DTDI%2BExpert%26adU%3Dwww.TransTOOLs.com%26adT%3DGo%2Bto%2BJava,%2BGo%2BNow%26gl%3DNL&amp;usg=AFQjCNF7NyJM3uxA3m7VTHZLcNFjzVOdwA"/>
        <telecom value="http://user:pass@www.mysite.com/dir/?section=other&amp;auth=Jane+Smith+writing+as+J.+N.+Doe"/>
        <telecom value="tel:+1-201-555-0123"/>
        <telecom value="tel:+1-201-555-0123;ext=4324;parameter=moeder"/>
        <telecom value="tel:7042;phone-context=example.com"/>
        <telecom value="tel:863-1234;phone-context=+1-914-555"/>
        <telecom value="tel:863-1234;phone-context=+1-914-555;phone-context=example.com"/>
        <telecom value="mllp://1.10.1.1:mllp/"/>
        <telecom value="mllp://www.enovation.nl:8/"/>
        <telecom value="ftp://user:pass@10.10.10.10:21"/>
        <telecom value="ftp://10.10.10.10"/>
        <telecom value="ftp://10.10.10.10:21"/>
        <telecom value="ftp://10.10.10.10:21/"/>
        <telecom value="ftp://ftphost.org"/>
        <telecom value="ftp://ftphost.org/"/>
        <telecom value="ftp://ftphost.org:ftp/"/>
        <telecom value="ftp://ftphost.org:ftp/;type=i"/>
        <telecom value="ftp://ftphost.org:ftp/dir/di-r/na$$%a0&amp;me;type=i"/>
        <telecom value="file://c:/filename.txt"/>
        <telecom value="file://c:/filename/file%7c"/>
        <telecom value="file://host.org/filename.txt"/>
        <telecom value="nfs://host.org/filename.txt"/>
        <telecom value="nfs://host.org//filename.txt"/>
        <telecom value="telnet://10.10.10.10"/>
        <telecom value="telnet://10.10.10.10:21"/>
        <telecom value="telnet://10.10.10.10:21/"/>
        <telecom value="telnet://ftphost.org"/>
        <telecom value="telnet://ftphost.org/"/>
        <telecom value="telnet://ftphost.org:ftp/"/>
        <telecom value="x-hl7-applicatie:2.16.840.1.113883.2.4.6.6.7000324"/>
    -->

    <assert role="error" test="if ($urlScheme='tel' or $urlScheme='fax') then (         matches($urlStr,'^(\+?([\d()./-]|(%[a-f\d]{2}))+)*(;(phone-context=((\+?([\d()./-]|(%[a-f\d]{2}))+)|(([a-z\d-]|(%[a-f\d]{2}))+(\.([a-z\d-]|(%[a-f\d]{2}))+)*))|(ext=[\d./-]+)|(isub=(([a-z\d();/?:@&amp;=+$,_.!~*''-])|(%[a-f\d]{2}))+)|([a-z\d-]+=([a-z\d\[\]/:&amp;+$_.!~*()-]|(%[a-f\d]{2}))+)))*$')         ) else (1=1)" see="http://tools.ietf.org/html/rfc3966">dtr3-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 3966</assert>

    <!-- file -->
    <assert role="error" test="if ($urlScheme='file') then (         matches($urlStr,'^///{0,2}((((([1-2]\d{0,2})(\.([1-2]\d{0,2})){3})|(([\w-]+\.)+([a-z]+))))|([a-z][:|]))(/(([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))*)*$','i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc1738">dtr4-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 1738.</assert>

    <!-- nfs -->
    <assert role="error" test="if ($urlScheme='nfs') then (         matches($urlStr,'^//((((([1-2]\d{0,2})(\.([1-2]\d{0,2})){3})|(([\w-]+\.)+([a-z]+))))|([a-z][:|]))/?(/(([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))*)*$','i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc2224">dtr5-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 2224.</assert>

    <!-- ftp en ftps -->
    <!-- Merk op: interne hostnamen niet ondersteund -->
    <assert role="error" test="if ($urlScheme='ftp' or $urlScheme='ftps') then (         matches($urlStr,'^//((([a-z\d$\.+!*(),?&amp;=~_-])|(%[a-f\d]{2}))+(:(([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))*)?@)?((([1-2]\d{0,2})(\.([1-2]\d{0,2})){3})|(([\w-]+\.)+(aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z]{2})))(:(([1-9]\d{0,4})|([a-z][\w-]*))?)?(/(([a-z\d$\.+!*(),?&amp;_~=-])|(%[a-f\d]{2}))*)*(;type=[aid])?$','i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc1738">dtr6-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 1738.</assert>

    <!-- http en https
        http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
    -->
    <!-- Merk op: interne hostnamen niet ondersteund -->
    <assert role="error" test="if ($urlScheme='http' or $urlScheme='https') then (         matches($urlStr,'^//((([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))+(:(([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))*)?@)?((([1-2]\d{0,2})(\.([1-2]\d{0,2})){3})|(([\w-]+\.)+(aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z]{2})))(:(([1-9]\d{0,4})|([a-z]\w*))?)?(/(([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))*)*(\?(([\w$_\.+;:@~!*(),])|(%[a-f\d]{2}))+=(([\w$_\.+;:/@~!*(),-])|(%[a-f\d]{2}))*(&amp;((([\w$_\.+;:@~!*(),])|(%[a-f\d]{2}))+=(([\w$_\.+;:/@~!*(),-])|(%[a-f\d]{2}))*)?)*)?(#([\w~!$+|.,*:=~_]|%[a-f\d]{2})*)?$', 'i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc1738">dtr7-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 1738</assert>

    <!-- telnet://<user>:<password>@<host>:<port>/ -->
    <!-- Merk op: interne hostnamen niet ondersteund -->
    <assert role="error" test="if ($urlScheme='telnet') then (         matches($urlStr,'^//((([a-z\d$\.+!*(),?&amp;~_=-])|(%[a-f\d]{2}))+(:(([a-z\d$\.+!*(),?&amp;=-])|(%[a-f\d]{2}))*)?@)?((([1-2]\d{0,2})(\.([1-2]\d{0,2})){3})|(([\w-]+\.)+(aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z]{2})))(:(([1-9]\d{0,4})|([a-z]\w*))?)?(/(([a-z\d$\.+!*(),?&amp;=-])|(%[a-f\d]{2}))*)*$','i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc1738">dtr8-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 1738.</assert>

    <!-- mailto -->
    <assert role="error" test="if ($urlScheme='mailto') then (         matches($urlStr,'^[\w$\.+!*(),?&amp;~_=-]+(\.[\w$\.+!*(),?&amp;~_=-]+)*@([\w$+!*(),?&amp;~_=-]+\.)+([a-z]{2,4})$','i')         ) else (1=1)" see="http://tools.ietf.org/html/rfc2368">dtr9-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with RFC 2368. Note that it is not allowed to carry extra headers</assert>

    <!-- x-hl7-applicatie -->
    <assert role="error" test="if ($urlScheme='x-hl7-applicatie') then (         matches($urlStr,'^2\.16\.840\.1\.113883\.2\.4\.6\.6\.[1-9]\d*$')         ) else (1=1)">dtr10-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST start with "2.16.840.1.113883.2.4.6.6." prefixed with the numerical part</assert>

    <!-- mllp -->
    <!-- Note: internal hostnames not supported -->
    <assert role="error" test="if ($urlScheme='mllp') then (         matches($urlStr,'^//(([1-2]\d{0,2})(\.([1-2]\d{0,2})){3}|(([\w-]+\.)+(aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z]{2}))):(([1-9]\d{0,4})|([A-Za-z]\w*))/$')         ) else (1=1)">dtr11-URL.NL.EXTENDED: URIs with URL Scheme <value-of select="$urlScheme"/> MUST comply with mllp://host:port/ where 'host' MAY be a name or IP and 'port' a named port or integer</assert>

</rule><?DSDL_INCLUDE_END include/DTr1_URL.NL.EXTENDED.sch?>
   </pattern>

   <!-- Include the project schematrons related to scenario cdabgd -->

   <!-- CDABildiag -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.10004-2013-10-16T000000.sch?><pattern id="template-1.2.40.0.34.11.10004-2013-10-16T000000">
   <title>ELGA CDA Dokument Befund Bildgebende Diagnostik</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.10004
Context: hl7:ClinicalDocument
Item: (CDABildiag)
-->

   <rule context="hl7:ClinicalDocument" id="tmp-r-8b6f9185-d239-499d-905b-302e7d33dd5a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10004-2013-10-16T000000.html" test="string(@classCode)=('DOCCLIN') or not(@classCode)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="string(@moodCode)=('EVN') or not(@moodCode)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:realmCode)&gt;=1 and not(hl7:realmCode/@nullFlavor)">(CDABildiag): Element hl7:realmCode ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10004-2013-10-16T000000.html" test="count(hl7:realmCode)&lt;=1">(CDABildiag): Element hl7:realmCode 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.10004-2013-10-16T000000.html" test="count(hl7:typeId[@root='2.16.840.1.113883.1.3'])&gt;=1 and not(hl7:typeId[@root='2.16.840.1.113883.1.3']/@nullFlavor)">(CDABildiag): Element hl7:typeId[@root='2.16.840.1.113883.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.10004-2013-10-16T000000.html" test="count(hl7:typeId[@root='2.16.840.1.113883.1.3'])&lt;=1">(CDABildiag): Element hl7:typeId[@root='2.16.840.1.113883.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.10004-2013-10-16T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1'])&gt;=1 and not(hl7:templateId[@root='1.2.40.0.34.11.1']/@nullFlavor)">(CDABildiag): Element hl7:templateId[@root='1.2.40.0.34.11.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.10004-2013-10-16T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1'])&lt;=1">(CDABildiag): Element hl7:templateId[@root='1.2.40.0.34.11.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.10004-2013-10-16T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5'])&gt;=1 ">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5'])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="$elmcount&gt;=1">(CDABildiag): 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 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.10004-2013-10-16T000000.html" test="$elmcount&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:id)&gt;=1 and not(hl7:id/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:id)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.39-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:title)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:effectiveTime)&gt;=1 and not(hl7:effectiveTime/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:effectiveTime)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')])&gt;=1 and not(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')]/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:languageCode[@code='de-AT'])&gt;=1 and not(hl7:languageCode[@code='de-AT']/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:languageCode[@code='de-AT'])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:setId)&gt;=1 and not(hl7:setId/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:setId)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:versionNumber)&gt;=1 and not(hl7:versionNumber/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:versionNumber)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:recordTarget)&gt;=1 and not(hl7:recordTarget/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:recordTarget)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:author)&gt;=1 and not(hl7:author/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:dataEnterer)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:custodian)&gt;=1 and not(hl7:custodian/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:custodian)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:legalAuthenticator)&gt;=1 and not(hl7:legalAuthenticator/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:legalAuthenticator)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']])&gt;=1 and not(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']])&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]])&gt;=1 and not(hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/@nullFlavor)">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:relatedDocument)&lt;=1">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:authorization)=0">(CDABildiag): 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.10004-2013-10-16T000000.html" test="count(hl7:componentOf[hl7:encompassingEncounter[hl7:code[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.5-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]]])&lt;=1">(CDABildiag): 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.10000
Context: hl7:ClinicalDocument/hl7:realmCode
Item: (FirstCDAHeaderElements)
-->

   <rule context="hl7:ClinicalDocument/hl7:realmCode" id="tmp-r-9c5a2acf-6fa7-4ac1-a926-7e7d6f62db36">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10000-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)">(FirstCDAHeaderElements): 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.10000-2011-12-19T000000.html" test="@code">(FirstCDAHeaderElements): Attribut @code MUSS vorkommen.</assert>
      <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@code),' '))"/>
      <let name="theAttCheck" value="distinct-values(document('include/voc-1.2.40.0.34.10.3-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10000-2011-12-19T000000.html" test="not(@code) or count($theAttValue) = count($theAttCheck)">(FirstCDAHeaderElements): Der Wert von code MUSS gewählt werden aus Value Set 'ELGA_RealmCode' (DYNAMIC).</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.10000
Context: hl7:ClinicalDocument/hl7:typeId[@root='2.16.840.1.113883.1.3']
Item: (FirstCDAHeaderElements)
-->

   <rule context="hl7:ClinicalDocument/hl7:typeId[@root='2.16.840.1.113883.1.3']" id="tmp-r-f6889083-d35d-4670-9558-c46e0fa0a724">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10000-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)">(FirstCDAHeaderElements): 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.10000-2011-12-19T000000.html" test="string(@root)=('2.16.840.1.113883.1.3')">(FirstCDAHeaderElements): Der Wert von @root MUSS '2.16.840.1.113883.1.3' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10000-2011-12-19T000000.html" test="string(@extension)=('POCD_HD000040')">(FirstCDAHeaderElements): Der Wert von @extension MUSS 'POCD_HD000040' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.10000
Context: hl7:ClinicalDocument/hl7:templateId[@root='1.2.40.0.34.11.1']
Item: (FirstCDAHeaderElements)
-->

   <rule context="hl7:ClinicalDocument/hl7:templateId[@root='1.2.40.0.34.11.1']" id="tmp-r-f949918e-6114-4eec-94a7-0252308cd848">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10000-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)">(FirstCDAHeaderElements): 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.10000-2011-12-19T000000.html" test="string(@root)=('1.2.40.0.34.11.1')">(FirstCDAHeaderElements): Der Wert von @root MUSS '1.2.40.0.34.11.1' sein.</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/*[not(self::hl7:realmCode|self::hl7:typeId[@root='2.16.840.1.113883.1.3']|self::hl7:templateId[@root='1.2.40.0.34.11.1']|self::hl7:templateId[@root='1.2.40.0.34.11.5']|self::hl7:templateId[@root='1.2.40.0.34.11.5.0.1']|self::hl7:templateId[@root='1.2.40.0.34.11.5.0.3']|self::hl7:id|self::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)]|self::hl7:title|self::hl7:effectiveTime|self::hl7:confidentialityCode[(@code='N' and @codeSystem='2.16.840.1.113883.5.25')]|self::hl7:languageCode[@code='de-AT']|self::hl7:setId|self::hl7:versionNumber|self::hl7:recordTarget|self::hl7:author|self::hl7:dataEnterer|self::hl7:custodian|self::hl7:informationRecipient|self::hl7:legalAuthenticator|self::hl7:authenticator|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.1']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.2']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.3']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.4']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.5']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.6']]|self::hl7:participant[hl7:templateId[@root='1.2.40.0.34.11.1.1.7']]|self::hl7:inFulfillmentOf|self::hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]|self::hl7:relatedDocument|self::hl7:authorization|self::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)]]]|self::hl7:component)]" id="tmp-r-032dac29-ef41-452d-bb00-76f335ffb657">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.10004-2013-10-16T000000.html" test="not(.)">(CDABildiag): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-032dac29-ef41-452d-bb00-76f335ffb657)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:documentationOf[hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']]]/*[not(self::hl7:serviceEvent[hl7:code[@codeSystem='1.2.40.0.34.5.38']])]" id="tmp-r-e6c38802-34b3-43bb-8950-1aebc907185f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-e6c38802-34b3-43bb-8950-1aebc907185f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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']]/*[not(self::hl7:code[@codeSystem='1.2.40.0.34.5.38']|self::hl7:effectiveTime|self::hl7:performer)]" id="tmp-r-0b18026e-1336-4a48-bf96-9b19ae40109b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-0b18026e-1336-4a48-bf96-9b19ae40109b)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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/*[not(self::hl7:low|self::hl7:high)]" id="tmp-r-4dcfe6c7-d3aa-4252-9650-86c8e8ae5a22">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-4dcfe6c7-d3aa-4252-9650-86c8e8ae5a22)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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/*[not(self::hl7:assignedEntity)]" id="tmp-r-3d7fcf17-66de-4402-886a-be959d71566f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-3d7fcf17-66de-4402-886a-be959d71566f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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:assignedEntity/*[not(self::hl7:id|self::hl7:addr|self::hl7:telecom|self::hl7:assignedPerson|self::hl7:representedOrganization)]" id="tmp-r-0457d048-8b1b-4e2f-b212-a428335b7b0f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-0457d048-8b1b-4e2f-b212-a428335b7b0f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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:assignedEntity/hl7:assignedPerson/*[not(self::hl7:name)]" id="tmp-r-d9f76609-b7e1-45b3-a400-73fdc3283044">
      <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="not(.)">(AssignedEntityElements): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d9f76609-b7e1-45b3-a400-73fdc3283044)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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:assignedEntity/hl7:representedOrganization/*[not(self::hl7:id|self::hl7:name|self::hl7:telecom|self::hl7:addr)]" id="tmp-r-da114e85-7c61-424e-9dee-a7bbeaff6cc8">
      <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="not(.)">(AssignedEntityElements): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-da114e85-7c61-424e-9dee-a7bbeaff6cc8)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/*[not(self::hl7:structuredBody)]" id="tmp-r-435f11ee-1901-4b46-b4ae-e011635b1eb3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-435f11ee-1901-4b46-b4ae-e011635b1eb3)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/*[not(self::hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]|self::hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]|self::hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]])]" id="tmp-r-45b94af5-ed69-4092-8b54-cd835b777d5e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-45b94af5-ed69-4092-8b54-cd835b777d5e)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/*[not(self::hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1'])]" id="tmp-r-3669c2bb-0164-479c-87f1-8ddfb153b327">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-3669c2bb-0164-479c-87f1-8ddfb153b327)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/*[not(self::hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1']|self::hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')]|self::hl7:title|self::hl7:text|self::hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']])]" id="tmp-r-c51948ea-3c39-4c5c-91c6-517247172da4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-c51948ea-3c39-4c5c-91c6-517247172da4)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/*[not(self::hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6'])]" id="tmp-r-8fdb4808-bf89-465b-9860-1d51cd72e7a3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-8fdb4808-bf89-465b-9860-1d51cd72e7a3)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/*[not(self::hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6']|self::hl7:id|self::hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')]|self::hl7:text|self::hl7:effectiveTime|self::hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]])]" id="tmp-r-ed98a9b8-7035-4355-a6ea-e72524378596">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-ed98a9b8-7035-4355-a6ea-e72524378596)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/*[not(self::hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]])]" id="tmp-r-f53bb9ce-db62-40dd-9740-e26bed6cd11d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-f53bb9ce-db62-40dd-9740-e26bed6cd11d)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/*[not(self::hl7:id|self::hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]|self::hl7:text|self::hl7:effectiveTime|self::hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']])]" id="tmp-r-be60bdca-d7e9-4e65-8293-6167d68c2bd8">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-be60bdca-d7e9-4e65-8293-6167d68c2bd8)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/*[not(self::hl7:qualifier)]" id="tmp-r-7628d03b-1638-4a44-9697-b183b1331190">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-7628d03b-1638-4a44-9697-b183b1331190)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier/*[not(self::hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')]|self::hl7:value[@codeSystem='1.2.840.10008.2.16.4'])]" id="tmp-r-86ef14ca-9014-4f51-8253-ffe0338bba97">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-86ef14ca-9014-4f51-8253-ffe0338bba97)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/*[not(self::hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8'])]" id="tmp-r-7a9fc11c-2ae5-44c7-82b0-4b6d2726600d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-7a9fc11c-2ae5-44c7-82b0-4b6d2726600d)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/*[not(self::hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8']|self::hl7:id|self::hl7:code[@codeSystem='1.2.840.10008.2.6.1']|self::hl7:text|self::hl7:effectiveTime)]" id="tmp-r-f6fb709a-1965-4b91-a6f9-8f68cc62077e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-f6fb709a-1965-4b91-a6f9-8f68cc62077e)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:text/*[not(self::hl7:reference)]" id="tmp-r-a07b16e8-0be7-424a-9709-004fe9466af4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-a07b16e8-0be7-424a-9709-004fe9466af4)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1'])]" id="tmp-r-78f128fc-3ed8-4d9c-addc-6f43b2b71c1f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-78f128fc-3ed8-4d9c-addc-6f43b2b71c1f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.1.2.1']|self::hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')]|self::hl7:title|self::hl7:text|self::hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']])]" id="tmp-r-2fa95578-d7a9-4bb5-83cd-81b68036a4a5">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-2fa95578-d7a9-4bb5-83cd-81b68036a4a5)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/*[not(self::hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2'])]" id="tmp-r-275887ac-5e7c-4854-9a03-dc7df11ed60b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-275887ac-5e7c-4854-9a03-dc7df11ed60b)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.1.3.2']|self::hl7:value)]" id="tmp-r-288b8820-90b3-4df7-8306-23dd42c55255">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-288b8820-90b3-4df7-8306-23dd42c55255)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1'])]" id="tmp-r-b9033a89-79b6-42dc-82af-735978dd15b2">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-b9033a89-79b6-42dc-82af-735978dd15b2)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.1']|self::hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-b21a8938-9b6e-4a33-8d35-200b5de4bf87">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-b21a8938-9b6e-4a33-8d35-200b5de4bf87)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2'])]" id="tmp-r-a5c64b7b-fed0-4d05-853e-b9391b55b3d3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-a5c64b7b-fed0-4d05-853e-b9391b55b3d3)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.2']|self::hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-8502cbe7-b203-4fc8-8a0f-f720d193dd99">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-8502cbe7-b203-4fc8-8a0f-f720d193dd99)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3'])]" id="tmp-r-bcd7efc6-550f-413e-90d1-2bd029b08628">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-bcd7efc6-550f-413e-90d1-2bd029b08628)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.3']|self::hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-728b1893-d3cd-45db-a5d2-55603ec7b599">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-728b1893-d3cd-45db-a5d2-55603ec7b599)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4'])]" id="tmp-r-8041c347-00e4-4978-b404-9aa84a6efb3c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-8041c347-00e4-4978-b404-9aa84a6efb3c)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.4']|self::hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-d3aa4e04-d3a8-4c2f-9239-ee076dd1fc19">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d3aa4e04-d3a8-4c2f-9239-ee076dd1fc19)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5'])]" id="tmp-r-b6c31658-21c8-4cc7-a84c-b1e9d87aefe4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-b6c31658-21c8-4cc7-a84c-b1e9d87aefe4)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.5']|self::hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-eed6107c-4864-4146-9e09-3b98c42d51d6">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-eed6107c-4864-4146-9e09-3b98c42d51d6)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6'])]" id="tmp-r-735f33a1-d8df-4c61-875e-0b28746323cd">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-735f33a1-d8df-4c61-875e-0b28746323cd)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.6']|self::hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-b5c36090-d936-4b69-9f58-3cea4c8661af">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-b5c36090-d936-4b69-9f58-3cea4c8661af)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7'])]" id="tmp-r-97869c5a-2bab-42e2-a8b3-03e81ebb62df">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-97869c5a-2bab-42e2-a8b3-03e81ebb62df)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.7']|self::hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-3bf2c3e3-cee9-4f91-9525-95a20b233f4e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-3bf2c3e3-cee9-4f91-9525-95a20b233f4e)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8'])]" id="tmp-r-fb3cd8d7-3b7f-4a25-af7f-bdd71877ac29">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-fb3cd8d7-3b7f-4a25-af7f-bdd71877ac29)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.8']|self::hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-3ddfa050-da56-452f-8ed1-346420e9b1a6">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-3ddfa050-da56-452f-8ed1-346420e9b1a6)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9'])]" id="tmp-r-f3e1c9e9-7566-4c4d-a59f-6a47e48e5f4e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-f3e1c9e9-7566-4c4d-a59f-6a47e48e5f4e)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.9']|self::hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text|self::hl7:entry[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]|self::hl7:entry[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']])]" id="tmp-r-892b36c3-b74e-45cd-b656-a2192b44adfa">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-892b36c3-b74e-45cd-b656-a2192b44adfa)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/*[not(self::hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2'])]" id="tmp-r-b6218a70-447f-4242-83ca-1bdae4f5a32f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-b6218a70-447f-4242-83ca-1bdae4f5a32f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/*[not(self::hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12']|self::hl7:templateId[@root='1.2.40.0.34.11.5.3.2']|self::hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')]|self::hl7:value)]" id="tmp-r-d074a75e-be4f-4526-a18c-29197efa91eb">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d074a75e-be4f-4526-a18c-29197efa91eb)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:value/*[not(self::hl7:reference)]" id="tmp-r-3574fc1b-9720-4f84-934d-2a469aa118fa">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-3574fc1b-9720-4f84-934d-2a469aa118fa)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/*[not(self::hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1'])]" id="tmp-r-f626bb33-6c6a-44bd-a1da-8c5e2c645368">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-f626bb33-6c6a-44bd-a1da-8c5e2c645368)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.3.1']|self::hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:text|self::hl7:statusCode[@code='completed']|self::hl7:effectiveTime|self::hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])]" id="tmp-r-2f177d9a-67ba-4f79-b447-e7531254fed9">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-2f177d9a-67ba-4f79-b447-e7531254fed9)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:text/*[not(self::hl7:reference)]" id="tmp-r-2e1d21d2-31e1-48be-b120-0f8c0a077616">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-2e1d21d2-31e1-48be-b120-0f8c0a077616)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10'])]" id="tmp-r-692b6476-c2d5-4fbe-8fd1-59b059b6df7f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-692b6476-c2d5-4fbe-8fd1-59b059b6df7f)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.10']|self::hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-0aaded82-715f-424c-8b32-1a16bbf2784d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-0aaded82-715f-424c-8b32-1a16bbf2784d)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11'])]" id="tmp-r-d6919b71-f245-4ede-b883-70b24c544eba">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d6919b71-f245-4ede-b883-70b24c544eba)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.11']|self::hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-51008cd5-cff0-4263-b4aa-dd06e18fa794">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-51008cd5-cff0-4263-b4aa-dd06e18fa794)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12'])]" id="tmp-r-a33f7832-a09c-417a-a6d8-4ad3e64fb017">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-a33f7832-a09c-417a-a6d8-4ad3e64fb017)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.12']|self::hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-a8f51f81-ea08-407b-a526-82c4096970aa">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-a8f51f81-ea08-407b-a526-82c4096970aa)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13'])]" id="tmp-r-aa31b9e7-0c93-43ee-8854-1b7bf07d7a61">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-aa31b9e7-0c93-43ee-8854-1b7bf07d7a61)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.13']|self::hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-d72909c3-fe6b-4549-bc44-f46ccecf330d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d72909c3-fe6b-4549-bc44-f46ccecf330d)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/*[not(self::hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14'])]" id="tmp-r-d79fe4f2-0bf5-4921-b514-485c11a1ac7b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-d79fe4f2-0bf5-4921-b514-485c11a1ac7b)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/*[not(self::hl7:templateId[@root='1.2.40.0.34.11.5.2.14']|self::hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-688ef16e-6cf4-421f-850c-577da2c703d3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-688ef16e-6cf4-421f-850c-577da2c703d3)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component[hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]]]/*[not(self::hl7:section[hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]])]" id="tmp-r-0fe9ae0a-5092-4c98-854b-54c4f72c7a51">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-0fe9ae0a-5092-4c98-854b-54c4f72c7a51)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule context="hl7:ClinicalDocument/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')]]/*[not(self::hl7:code[(@code='55113-5' and @codeSystem='2.16.840.1.113883.6.1')]|self::hl7:title|self::hl7:text)]" id="tmp-r-8ad0d249-ee22-497d-8e7b-4d7bdbfa4c16">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(.)">(BefundBildgebendeDiagnostik): '<name path=".."/>' ist als geschlossen definiert und dieses Element '<name/>' ist nicht erlaubt oder nicht mit diesem Inhalt erlaubt. Dies kann templateId, code oder id betreffen. (rule-reference: tmp-r-8ad0d249-ee22-497d-8e7b-4d7bdbfa4c16)</assert>
   </rule>
</pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.10004-2013-10-16T000000.sch?>

   <!-- Include schematrons from templates with explicit * or ** context (but no representing templates), only those used in scenario template -->



   <!-- includes -->
   <!-- Brieftext -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.1.2.1-2011-12-19T000000.sch?><pattern id="template-1.2.40.0.34.11.1.2.1-2011-12-19T000000">
   <title>Brieftext</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]
Item: (Brieftext)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']" id="tmp-r-0fee1fc9-98b4-494a-ad62-dda59a2137b5">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.2.1-2011-12-19T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Brieftext): 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.1.2.1-2011-12-19T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1.2.1'])&gt;=1 ">(Brieftext): Element hl7:templateId[@root='1.2.40.0.34.11.1.2.1'] 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.2.1-2011-12-19T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1.2.1'])&lt;=1">(Brieftext): Element 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.1.2.1-2011-12-19T000000.html" test="count(hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')])&gt;=1 and not(hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')]/@nullFlavor)">(Brieftext): Element hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')] 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.2.1-2011-12-19T000000.html" test="count(hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')])&lt;=1">(Brieftext): Element hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')] 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.2.1-2011-12-19T000000.html" test="count(hl7:title)&gt;=1 ">(Brieftext): Element hl7:title 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.2.1-2011-12-19T000000.html" test="count(hl7:title)&lt;=1">(Brieftext): 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.1.2.1-2011-12-19T000000.html" test="count(hl7:text)&gt;=1 ">(Brieftext): Element hl7:text 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.2.1-2011-12-19T000000.html" test="count(hl7:text)&lt;=1">(Brieftext): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.2.1-2011-12-19T000000.html" test="count(hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']])&lt;=1">(Brieftext): Element hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']] kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:templateId[@root='1.2.40.0.34.11.1.2.1']
Item: (Brieftext)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:templateId[@root='1.2.40.0.34.11.1.2.1']" id="tmp-r-93c62c55-b474-4577-b4c7-3020436c93d1">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.2.1-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)">(Brieftext): 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.2.1-2011-12-19T000000.html" test="string(@root)=('1.2.40.0.34.11.1.2.1')">(Brieftext): Der Wert von @root MUSS '1.2.40.0.34.11.1.2.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')]
Item: (Brieftext)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:code[(@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40')]" id="tmp-r-d71494da-e3dc-4482-8cd1-4593b5e76279">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.2.1-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)">(Brieftext): 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.2.1-2011-12-19T000000.html" test="@nullFlavor or (@code='BRIEFT' and @codeSystem='1.2.40.0.34.5.40' and @displayName='Brieftext')">(Brieftext): Der Elementinhalt MUSS einer von 'code 'BRIEFT' codeSystem '1.2.40.0.34.5.40' displayName='Brieftext'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:title
Item: (Brieftext)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:title" id="tmp-r-00e6878e-c208-4581-b382-8c0fcea39890">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.2.1-2011-12-19T000000.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)">(Brieftext): 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.1.2.1-2011-12-19T000000.html" test="text()='Brieftext'">(Brieftext): Der Elementinhalt von 'hl7:title' MUSS ''Brieftext'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:text
Item: (Brieftext)
-->


   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.1.2.1']/hl7:entry[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]
Item: (Brieftext)
--></pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.1.2.1-2011-12-19T000000.sch?>
   <!-- LogoEntry -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.1.3.2-2011-12-19T000000.sch?><pattern id="template-1.2.40.0.34.11.1.3.2-2011-12-19T000000">
   <title>Logo Entry</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.3.2
Context: *[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]
Item: (LogoEntry)
-->

   <rule context="*[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]" id="tmp-r-aa4bb0ed-dff8-4a1a-89c2-5c82c9da89cc">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="count(hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2'])&gt;=1 ">(LogoEntry): Element hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="count(hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2'])&lt;=1">(LogoEntry): Element hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2'] kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.3.2
Context: *[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']
Item: (LogoEntry)
-->

   <rule context="*[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']" id="tmp-r-0ac11b64-12b0-4442-9b21-3a5abe858f9a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="string(@classCode)=('OBS')">(LogoEntry): Der Wert von @classCode MUSS 'OBS' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="string(@moodCode)=('EVN')">(LogoEntry): 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.1.3.2-2011-12-19T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1.3.2'])&gt;=1 ">(LogoEntry): Element hl7:templateId[@root='1.2.40.0.34.11.1.3.2'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.1.3.2'])&lt;=1">(LogoEntry): Element hl7:templateId[@root='1.2.40.0.34.11.1.3.2'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="count(hl7:value)&gt;=1 and not(hl7:value/@nullFlavor)">(LogoEntry): Element hl7:value 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.3.2-2011-12-19T000000.html" test="count(hl7:value)&lt;=1">(LogoEntry): Element hl7:value kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.3.2
Context: *[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']/hl7:templateId[@root='1.2.40.0.34.11.1.3.2']
Item: (LogoEntry)
-->

   <rule context="*[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']/hl7:templateId[@root='1.2.40.0.34.11.1.3.2']" id="tmp-r-9338eaaf-fd6f-4a57-8801-73f3978fa00c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-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)">(LogoEntry): 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.3.2-2011-12-19T000000.html" test="string(@root)=('1.2.40.0.34.11.1.3.2')">(LogoEntry): Der Wert von @root MUSS '1.2.40.0.34.11.1.3.2' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.1.3.2
Context: *[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']/hl7:value
Item: (LogoEntry)
-->

   <rule context="*[hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']]/hl7:observationMedia[hl7:templateId/@root='1.2.40.0.34.11.1.3.2']/hl7:value" id="tmp-r-f3293928-caa6-41aa-95a1-e105a773552a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.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)">(LogoEntry): 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"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="@mediaType">(LogoEntry): Attribut @mediaType MUSS vorkommen.</assert>
      <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@mediaType),' '))"/>
      <let name="theAttCheck" value="distinct-values(for $code in tokenize(@mediaType,' ') return if ($code=('image/png','image/jpeg')) then ($code) else ())"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="not(@mediaType) or count($theAttValue) = count($theAttCheck)">(LogoEntry): Der Wert von mediaType MUSS 'Code image/png oder Code image/jpeg' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.1.3.2-2011-12-19T000000.html" test="string(@representation)=('B64')">(LogoEntry): Der Wert von @representation MUSS 'B64' sein.</assert>
   </rule>
</pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.1.3.2-2011-12-19T000000.sch?>
   <!-- BefundBildgebendeDiagnostik -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5-2015-01-30T000000.sch?><pattern id="template-1.2.40.0.34.11.5-2015-01-30T000000">
   <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-1bbf1ddb-eda4-4b8a-abfc-a3c89f7f451a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.html" test="$elmcount&gt;=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 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.5-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-ba269f8a-7c54-4671-9375-ffe7a07ce5ac">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-f46a4f79-91b6-49ff-94e9-714105554ed2">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-8f54d781-c56c-4eba-8008-5fba035b6bf5">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-d9292336-5d10-4a77-8415-b5171d18ac1c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(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-2015-01-30T000000.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-2015-01-30T000000.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-69d978f5-f707-4dbf-95cb-9a8ac605d825">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-ca9c4f73-256b-4f1a-8d13-b249a4bd89e1">
      <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-953f7c54-6b41-464a-a31e-e8aae9feedb5">
      <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-0e4ec656-78c3-4224-95af-7b6a5864aef1">
      <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-33a0e605-2471-4440-bd22-eb89cdf482f7">
      <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-e0c98952-c646-4d37-8ecd-c44b43003f24">
      <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-f145b693-0111-4bdc-8d6e-3a07817b44ac">
      <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-1bfe3c3a-ffee-489b-8724-2aad24bfdd06">
      <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-d87f38b7-9703-4193-bed6-c0d09a22fc60">
      <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-6c39f9ab-677a-4a36-914c-a861a6c89f99">
      <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-c2f957ae-06fc-4bd7-ba87-e3fa1e1b5090">
      <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-347d99dd-825f-419c-b3a8-6a0dd0a7f9ad">
      <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-2912478a-33cd-4cbd-831e-ae409b97fb4c">
      <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-4b64d2b0-2b2b-4f37-819e-c666681ad1bb">
      <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-a152c874-5f3b-4282-b7f1-e4f3c06f61c4">
      <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-69f3b322-0490-4030-807f-45f8bbcadeb3">
      <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-78f063cb-f569-43f0-a320-2bc6461f7d19">
      <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-14642e7b-f07a-4ca7-91f7-878ff49b1092">
      <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-3eff0027-98eb-4ea8-85fa-84df0a6f17e6">
      <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-7288c336-9623-4be7-a30e-5b2c377c187d">
      <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-b20583c4-7d0d-406a-8e44-988574a42817">
      <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-418c9009-3e40-4b41-aa78-72ea9f4098c2">
      <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-3129996e-2a7a-4951-85a0-4400c6db78ba">
      <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-b07aa8ee-d9f9-4153-9859-e7db1b6eb66f">
      <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-8395fb67-61a9-4359-805b-718ed5624227">
      <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-f1936aba-1e76-46e6-ae2a-11943fdc8aa6">
      <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-61e96f3a-4373-45c2-9cf1-29d89a399b92">
      <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-eaf0e254-cb71-4c94-b381-23f5475bad54">
      <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-c7c23fc7-39fb-46f5-9a4d-ab3d19c4ce48">
      <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-e2ef8fba-2c46-4cbf-a7a7-1bfc17476d19">
      <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-2e59b018-93e4-4467-9d5b-a6ba5fe4e520">
      <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-6e20e05c-eee7-49e8-a655-571322498939">
      <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-9bbb62b6-5430-4308-afba-debdde06f03e">
      <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-faddcd1d-ab1e-4623-953f-7afde681bac1">
      <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-40f4d555-3411-4900-93e6-181fba6b8008">
      <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-cddc7321-7c22-44b7-b15e-faf679629ae1">
      <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-edf14c9f-97c6-44eb-aca7-f7dfd128bc6d">
      <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-5165c390-38d7-4190-81a8-4520f7bf4716">
      <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-4a0550b8-6c1c-4f54-b4ce-9833e2dc54a4">
      <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-9c80b15f-71fe-4bee-818e-59dfb310a29a">
      <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-b78a13fd-fad9-4746-a9f3-47d5affe936b">
      <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-93d4c767-1785-485e-a02b-11d8af02c228">
      <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-81fe8228-3ae5-4487-ac39-118983fc8f01">
      <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-8b36792c-be9c-4dac-bd79-35e12f315607">
      <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-a1dad8bc-4f24-40dd-a945-109ab886d98c">
      <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-62844cf2-633c-4b69-b7fa-a95b8c64e657">
      <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-c48e72f3-3b1e-4487-a04b-3c04106e6d6b">
      <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-325d57f2-b914-4f5b-9a41-6a2d3fb7adfb">
      <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-a366fa63-f671-49c4-9e50-c6d6bdc49801">
      <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-7b9baecc-d478-4398-b43e-c3a89a21a416">
      <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-4a35a401-c0dc-4c38-be43-27360064e873">
      <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-39d717e0-88dc-4b9d-a14d-b626f54f0439">
      <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-0b78b1e0-8ece-4c06-8c28-d9084f1a5161">
      <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-ba970501-e4e3-487d-86bf-ff44e0323a7a">
      <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-5a13c3d5-6b1b-41d8-916a-158b28f0416e">
      <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-ee5768c3-2f98-4260-9f02-945a98b2e858">
      <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-0d216da3-b67c-49e2-8200-f7d018f52a8e">
      <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-ab09bc5a-438e-4185-977f-096b9536e211">
      <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-e1049786-e84a-4f3d-96e5-3d1c7065baf9">
      <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-7fa41281-7e3b-4708-919b-1b495c2c8c1d">
      <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-95510d91-fe54-4123-ab4a-938d8d5e0575">
      <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-2fe190a7-a02e-42c8-a292-062ffd80cc9d">
      <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-f595c3d9-d179-4178-8059-955fc0beb0b3">
      <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-0e094949-e3c5-45ce-a8a7-aba811bf0fb8">
      <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-d38f73e4-391d-4eae-9e22-b869c212d894">
      <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-3c2d041c-e675-4301-8fbb-121218f17ec1">
      <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-f38eef48-728c-4294-aef6-f882551a9cc3">
      <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-da19e6f8-12d7-49c1-a5d9-bbbaaf102cf1">
      <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-b3d8adb0-7982-47da-83a7-e9407c30df7c">
      <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-f38de3bf-8732-4c42-a2bd-c954b8000526">
      <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-847017cc-1415-44d0-bdae-5712c3b0935b">
      <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-5035eebe-ee3b-4708-8ad9-6d4d52aac846">
      <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-787f0f81-f18e-44c9-b233-4cccefb94a8c">
      <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-8f8848d1-2d11-478e-9759-1df3de37173f">
      <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-f271124d-353b-44ce-a9df-67ecc7fc731a">
      <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-07c1ee67-08f4-471d-9ef8-ea95ea11f231">
      <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-4cd5d4be-3502-4fb5-99e8-46829e3117da">
      <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-dbbadeed-332a-4c36-b929-fe5abedf02d0">
      <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-80920bf4-879b-4d71-8895-68f5964d705e">
      <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-5eb4c44a-9d1d-4207-90f6-e7367c056c3d">
      <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-37558419-bb23-4fb7-937c-726222a3fef3">
      <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-95e97292-ed25-4bea-be99-f6167aa1f5d0">
      <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-b33da985-d848-44e1-a24d-4bf4d697bc9f">
      <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-44c1ea8e-e528-4a1d-b2fc-e0e9c3e254dc">
      <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-d303bef4-c82d-4942-836a-cb4702fe4d23">
      <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-0eafac67-306b-4970-a448-a0f3d71faebd">
      <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-1fc74cc7-3458-4ac1-b28b-1f1a377db91e">
      <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-080e2551-d775-449b-beff-735f05907f7f">
      <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-40c533e9-7a9b-4825-af55-55ab8094d3a3">
      <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-b046ccc7-34af-44d8-a584-a4597ababc4e">
      <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-7324de53-4f98-4a5b-bb68-a9adcdc4c813">
      <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-7fc8cdec-492c-49a5-96c7-e21738f5c60e">
      <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-958d3429-c185-4611-8140-de7fba2f8afe">
      <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-6b29092b-56e3-4803-97c1-7b6b02ca138e">
      <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-ad61010c-40a1-4ea0-9c8a-99e592f8d4a8">
      <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-2a6ef001-1c31-4622-870a-dbca08552ac3">
      <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-a5763e70-8a05-48bf-a325-1e927a48e93d">
      <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-372f2231-5c1a-4e55-9a19-f2691b90d301">
      <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-33d4a77b-ccb7-4df3-a4b1-c9e86431316e">
      <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-6e0b941e-5dfe-4fbe-9269-271f7ef423fa">
      <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-14ab2162-33fb-4844-8ee0-639bfb0aa925">
      <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-fc034839-bf3b-4c2f-b0ce-ca1f14f7e95f">
      <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-fb24a714-8dcf-4f11-af26-840b75b856c1">
      <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-bf426959-6229-45ca-b17d-1acea2511c6a">
      <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-1a9f1792-0967-406f-a6fa-fd09826cc56c">
      <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-39b8a8c1-4d5f-4d99-b22e-7b74f9dd616c">
      <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-a2feb209-7788-4348-98a4-3d16b3e68a27">
      <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-8d32c4e9-4bf9-43b2-a07c-50dd3d8c3f6d">
      <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-c82c95ac-0ad0-4d02-ac39-c5601fbc1840">
      <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-0ae96a9f-375e-4375-bb50-65acb93a4267">
      <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-30ea4dd1-7359-4d8d-ae9f-dd641c1bc7f5">
      <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-484e3e08-8fde-4f52-8178-2ba6e7a116c9">
      <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-d38ccb68-fc4a-4366-9c51-c3bcb82b6733">
      <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-f00e70b3-92b1-403a-99aa-d810475d4812">
      <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-61dc9f5d-864f-40b0-8a63-10b071bafc87">
      <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-6a44da5e-2243-4038-9e67-024aa9cebab2">
      <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-d6e86f10-43bf-4f74-94a3-c7a252e392e0">
      <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-581aed7c-d7dd-4c75-bbd7-93b2da8233dc">
      <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-039b2fa7-7e3d-4c96-b64e-0e2f3b2e20a0">
      <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-d935794f-bd46-4f6a-8cd8-fd88db3e11f9">
      <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-e7ead18d-7726-4e74-98c6-ccb5d8a59f0d">
      <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-c64cad5a-d6be-4866-8d95-b91fd66441e8">
      <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-18d18903-cf7d-47e1-b91f-340261ef3332">
      <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-30789467-7081-48ca-87a1-9ed282408a3b">
      <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-7bea919f-5e73-4fe0-828b-3b101f570268">
      <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-7a58db8d-022e-4762-8784-b69bf8b29b4f">
      <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-d28c8805-87c9-4c9d-b2b6-6ac088f10d2e">
      <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-676ee89d-4bb3-45dc-ad91-8e0856ddf795">
      <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-349c203f-10c7-4e44-898f-ea599b23b492">
      <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-3256c047-debe-4041-978b-1f4b83ee70cc">
      <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-99681957-22cf-40f4-890a-e6595d7e62b5">
      <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-a31cb153-8771-4d9d-a070-c3cfddd2cf05">
      <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-867478c8-c992-48d2-9154-22200cec882b">
      <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-727e782f-b7c6-42d9-aeed-7328eddbd3a8">
      <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-8a4ebeba-6ed6-4ee1-a962-54303d34d073">
      <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-b79c4fb0-3473-4bf6-9323-68c271c01c9b">
      <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-7f912240-52d3-4f83-96c0-9a2312af6e3a">
      <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-0beea414-cf1c-42af-b5c5-7e332547fae6">
      <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-80af94ab-fef9-49e4-8d39-d712e7c7814a">
      <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-b99520be-d20e-4775-a58a-6ba351e7ba18">
      <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-de1b6a85-3362-4e7f-a956-6414743d1437">
      <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-ad473e29-beef-4a93-8287-2fcb0c6c5e47">
      <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-6940bfd4-a9c8-4a8f-9168-240cb216e558">
      <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-82997014-1b6f-4b87-8e9a-fe4fe462b5a1">
      <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-3f972f08-bb49-4adb-8414-b1b6badf1ef4">
      <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-54c4952e-409f-466b-a2d0-13aa43fa96e1">
      <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-9e83b6f9-2467-48ff-abcb-38f9b3d192a1">
      <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-52e7a71f-c8af-492a-a495-06667cf55c13">
      <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-9240407f-796d-4c6b-95f0-6c3c4125f1e4">
      <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-3adaf679-0ca0-428b-bf05-32f7a12ca9c2">
      <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-85b49fe7-0a3a-411f-aa48-cb71ddd2e40e">
      <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-8d5b0ee4-b663-4d78-bb75-7a7bf300c8c5">
      <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-2c93dde7-d997-4ae0-99ac-8aa7a7d9b5d2">
      <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-74536378-bde7-4872-a4d0-547418c94773">
      <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-cb19b4eb-c8b6-4f64-aaf6-a166229d7d2d">
      <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-853d61f9-3fc0-41ef-a3db-add47541ab7d">
      <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-117412ff-3495-4027-b0a8-c097bcf46866">
      <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-d80f5c60-5ab5-43c3-a23b-0e51f538f5ae">
      <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-be72833f-f2bc-4abe-af6b-c20fbc30437d">
      <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-54985bfe-7a8d-4fe8-b747-ed4d977ba3ac">
      <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-ef7ade94-eb26-4fa9-9ec0-6daaab59cbae">
      <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-dc49d4c9-76f1-4779-bddf-ddfe998ecb72">
      <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-0f8fa101-bf7b-4f1b-a0d4-ccd6eddecb08">
      <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-08cbaf67-5578-4786-9f63-0d345e49741c">
      <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-b9850aa1-bdfb-43ec-8180-1701014b2655">
      <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-d938526c-dbf7-4f4d-a189-4ac6698b2dba">
      <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-d0e6c89e-ecd2-45d9-9e36-948734494282">
      <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-064ff829-3c01-4823-8354-9a08a4318c3b">
      <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-6786c02a-64dc-4175-b03e-83144c64ca75">
      <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-fde9b858-2a9b-4069-8d1b-3be052b5498f">
      <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-9778ea91-4661-4e17-8366-5a8990985555">
      <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-44673180-9a0b-4754-a27d-4b46ca14592f">
      <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-dd2685c4-bfc1-4731-b09b-c37543dde615">
      <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-77baa991-f2c7-4d25-89ea-02747dbad094">
      <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-c5c706b0-d055-42e1-a8ef-7bc787166c53">
      <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-e622e4c1-627d-4805-861f-96a283d2bdf8">
      <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-d5571bd9-c7be-4679-b497-1b2b06cc5d06">
      <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-340afc2a-046c-46b6-a7b3-5c03fade6a71">
      <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-ab16db6f-9f72-40d3-ba68-fbb1a3d694ed">
      <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-864623cd-a3fd-4862-a680-832cb9d58254">
      <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-1a13f4fe-6d05-463f-968d-f20a9f3ff49e">
      <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-c109599c-8655-49c9-8621-31270992cb25">
      <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-cc32e4d0-c213-483f-97ee-dc90914d3078">
      <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-bd151e53-91c5-4947-9d06-617abd252a63">
      <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-352828d7-e10b-4296-9fd7-ae794716e2b2">
      <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-1cc268f7-5905-4c77-a611-8079181ea7ed">
      <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-d1ed258b-3311-4187-aaf6-dfecd2d1212b">
      <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-1d42a470-4bf1-4c4a-b4b7-1e86f781f872">
      <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-fca4f523-92d0-4c87-a0b7-0aeff2f91f09">
      <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-2c735c63-7c91-4d59-a404-33ce4a6dad88">
      <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-5937291b-5393-420b-8dd6-ad08d34217d3">
      <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-e243ae9b-dfd5-4ff7-9f30-41eb45c9587b">
      <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-4979f305-7c13-4c79-98f6-becffdca9f2c">
      <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-321dbf5e-d15d-43d0-97db-fcaceaf0a3f5">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-d120030f-ea06-40fc-9b8f-b5fc78fd3a07">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-12c0a3fc-6d43-4d6c-b6b2-27d92733e8f3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.html" test="@nullFlavor or contains($appc2ok,'true')">(BefundBildgebendeDiagnostik): Code Achse 2: <value-of select="$appc2"/> 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-2015-01-30T000000.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-2015-01-30T000000.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-0deda353-48b8-45d1-a828-732fad376e0a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2167511e-a3b0-4b5b-8c7b-f1f88b0f28d3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-eb355cba-f4f3-47d0-831f-bc0131573b91">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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
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:performer" id="tmp-r-4f408f73-1680-4c21-ac13-9ab4b0e60f63">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="@typeCode">(BefundBildgebendeDiagnostik): Attribut @typeCode MUSS vorkommen.</assert>
      <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@typeCode),' '))"/>
      <let name="theAttCheck" value="distinct-values(document('include/voc-1.2.40.0.34.10.43-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="not(@typeCode) or count($theAttValue) = count($theAttCheck)">(BefundBildgebendeDiagnostik): Der Wert von typeCode MUSS gewählt werden aus Value Set 'ELGA_ServiceEventPerformer' (DYNAMIC).</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="count(hl7:assignedEntity)&gt;=1 and not(hl7:assignedEntity/@nullFlavor)">(BefundBildgebendeDiagnostik): 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.5-2015-01-30T000000.html" test="count(hl7:assignedEntity)&lt;=1">(BefundBildgebendeDiagnostik): Element hl7:assignedEntity 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:performer/hl7:assignedEntity
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:performer/hl7:assignedEntity" id="tmp-r-a35e9750-2982-4fa5-bb49-983706183afb">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.html" test="count(hl7:id)&gt;=1 ">(BefundBildgebendeDiagnostik): 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.5-2015-01-30T000000.html" test="count(hl7:addr)&lt;=1">(BefundBildgebendeDiagnostik): 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.5-2015-01-30T000000.html" test="count(hl7:assignedPerson)&gt;=1 and not(hl7:assignedPerson/@nullFlavor)">(BefundBildgebendeDiagnostik): 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.5-2015-01-30T000000.html" test="count(hl7:assignedPerson)&lt;=1">(BefundBildgebendeDiagnostik): 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.5-2015-01-30T000000.html" test="count(hl7:representedOrganization)&lt;=1">(BefundBildgebendeDiagnostik): 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: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:assignedEntity/hl7:id
Item: (AssignedEntityElements)
-->

   <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:performer/hl7:assignedEntity/hl7:id" id="tmp-r-1be7949c-2b42-49ff-badd-ca304d940b19">
      <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: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:assignedEntity/hl7:addr
Item: (AssignedEntityElements)
-->

   <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:performer/hl7:assignedEntity/hl7:addr" id="tmp-r-66e02b92-2859-41fb-b740-ec2d075e2c56">
      <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: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:assignedEntity/hl7:telecom
Item: (AssignedEntityElements)
-->

   <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:performer/hl7:assignedEntity/hl7:telecom" id="tmp-r-f22cfff7-bbd0-4fcc-b03f-e400dd3decef">
      <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: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:assignedEntity/hl7:assignedPerson
Item: (AssignedEntityElements)
-->

   <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:performer/hl7:assignedEntity/hl7:assignedPerson" id="tmp-r-7f309e1a-fa77-4955-84bf-4d94fdde9abc">
      <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: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:assignedEntity/hl7:assignedPerson/hl7:name
Item: (PersonElements)
-->

   <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:performer/hl7:assignedEntity/hl7:assignedPerson/hl7:name" id="tmp-r-07017ada-2f32-4682-90ae-a4e226753a9a">
      <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: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:assignedEntity/hl7:representedOrganization
Item: (AssignedEntityElements)
-->

   <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:performer/hl7:assignedEntity/hl7:representedOrganization" id="tmp-r-ac46fcaf-8235-4fd3-9908-ce0df8978ef5">
      <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: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:assignedEntity/hl7:representedOrganization/hl7:id
Item: (OrganizationElements)
-->

   <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:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:id" id="tmp-r-8f2694b8-6c61-4b95-885a-4fd0f6d8cc62">
      <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: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:assignedEntity/hl7:representedOrganization/hl7:name
Item: (OrganizationElements)
-->

   <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:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:name" id="tmp-r-24e000a6-679f-4213-862b-0977aeebe2c7">
      <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: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:assignedEntity/hl7:representedOrganization/hl7:telecom
Item: (OrganizationElements)
-->

   <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:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:telecom" id="tmp-r-bc7fa89f-0262-4503-9539-1cf88472707a">
      <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: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:assignedEntity/hl7:representedOrganization/hl7:addr
Item: (OrganizationElements)
-->

   <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:performer/hl7:assignedEntity/hl7:representedOrganization/hl7:addr" id="tmp-r-55b34f04-8c1e-4404-b945-42b4aa158b7f">
      <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.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-126b974a-dcd4-4257-b7cd-7cae990b55e7">
      <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-952398c4-66aa-4b15-a1a8-ac7878ccd06b">
      <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-a69727c2-22f9-42c5-844f-eb627424ddaf">
      <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-963ff319-1b32-49c7-a18b-5b51dd77c87f">
      <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-7b4e34ce-cc8b-4b62-9478-9fecf2945a9b">
      <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-ca498f44-ee39-4441-85fa-ad394621c454">
      <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-f710e51b-d8cd-46b6-ad5f-b1360cfc6010">
      <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-0fd50c4c-1c23-4b36-9fcf-6e1b1260882f">
      <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-ef6424a0-6024-4048-9c02-0a4774a8d09e">
      <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-03692ada-ce3e-4178-b5d8-ff0ad9d98a03">
      <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-d731dbb2-af7a-40bf-a30a-f00af15cc18a">
      <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-27901014-2831-4903-ad04-6b735fd1196c">
      <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-06237461-ccaa-410e-ac92-8556627ae197">
      <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-f87bbfda-90b4-48df-889b-929860b97cf5">
      <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-03314be3-f7ee-4f91-a859-60da9b14e53f">
      <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-cd11b643-1155-4525-9d6e-344225d48a00">
      <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-775bead4-1596-4d21-b5a7-7c5c94287917">
      <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-3fe71367-8704-4c62-b406-14f925ac772a">
      <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-78700f18-b179-4761-bfbc-d65065d58f94">
      <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-6ab37e4d-0dec-4dc8-a57f-877deba9637a">
      <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-4a4599b6-700e-4604-981e-413bb20c8d0c">
      <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-e7a83fed-32d0-4cc8-807a-00cc1d3f2aee">
      <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-bafbbd4e-2520-4d66-ad2f-5332fe4657c9">
      <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-cc6eae50-5b8a-4379-8a5a-da82ed80b32e">
      <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-aa0926ef-a218-468f-a638-319cbd75a192">
      <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-9d75a387-aa29-4414-bc37-83554d1f1e12">
      <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-03a8ca74-0b6c-47a1-b7ae-3632561d2c78">
      <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-67f246c4-e4bc-44b8-b197-d6471cb370d7">
      <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-e39e33ea-11df-456e-b3e0-232effa01254">
      <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-88238b18-2c14-4e9b-a756-3659391a0891">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-5fbf691b-352b-4ae3-be8d-afec8493024c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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-2015-01-30T000000.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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5-2015-01-30T000000.sch?>
   <!-- Anforderung -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.1-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.1-2012-01-12T000000">
   <title>Anforderung</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]
Item: (Anforderung)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']" id="tmp-r-bbe1c957-532d-4d51-beb9-f3d23898cc50">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.1-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Anforderung): 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.1-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.1'])&gt;=1 ">(Anforderung): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.1'] 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.2.1-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.1'])&lt;=1">(Anforderung): Element 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.2.1-2012-01-12T000000.html" test="count(hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Anforderung): Element hl7:code[(@code='55115-0' 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.1-2012-01-12T000000.html" test="count(hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Anforderung): Element hl7:code[(@code='55115-0' 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.1-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Anforderung): 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.1-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Anforderung): 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.1-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Anforderung): 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.1-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Anforderung): 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.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:templateId[@root='1.2.40.0.34.11.5.2.1']
Item: (Anforderung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:templateId[@root='1.2.40.0.34.11.5.2.1']" id="tmp-r-9ac0c12c-a7c6-4999-a8d5-fee617f33a1a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.1-2012-01-12T000000.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)">(Anforderung): 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.2.1-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.1')">(Anforderung): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Anforderung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:code[(@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-7bff7e94-8083-4839-a2ab-f47bc1f65810">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.1-2012-01-12T000000.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)">(Anforderung): 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.1-2012-01-12T000000.html" test="@nullFlavor or (@code='55115-0' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Requested imaging studies information' and @codeSystemName='LOINC')">(Anforderung): Der Elementinhalt MUSS einer von 'code '55115-0' codeSystem '2.16.840.1.113883.6.1' displayName='Requested imaging studies information' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:title
Item: (Anforderung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:title" id="tmp-r-5cd041e0-ff56-46ca-a6ee-510e1092047e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.1-2012-01-12T000000.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)">(Anforderung): 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.1-2012-01-12T000000.html" test="text()='Anforderung'">(Anforderung): Der Elementinhalt von 'hl7:title' MUSS ''Anforderung'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.1
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:text
Item: (Anforderung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.1']/hl7:text" id="tmp-r-e5a19ce0-a5f2-49ed-91fc-3da097e768da">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.1-2012-01-12T000000.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)">(Anforderung): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.1-2012-01-12T000000.sch?>
   <!-- ZusammenfassungErgebnis -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.10-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.10-2012-01-12T000000">
   <title>Zusammenfassung / Ergebnis</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.10
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]
Item: (ZusammenfassungErgebnis)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']" id="tmp-r-3bbc8945-aabf-4fdd-8a9f-d64f8c5ffb97">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.10-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.10'])&gt;=1 ">(ZusammenfassungErgebnis): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.10'] 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.2.10-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.10'])&lt;=1">(ZusammenfassungErgebnis): Element 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.2.10-2012-01-12T000000.html" test="count(hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(ZusammenfassungErgebnis): Element hl7:code[(@code='55112-7' 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.10-2012-01-12T000000.html" test="count(hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(ZusammenfassungErgebnis): Element hl7:code[(@code='55112-7' 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.10-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(ZusammenfassungErgebnis): 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.10
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:templateId[@root='1.2.40.0.34.11.5.2.10']
Item: (ZusammenfassungErgebnis)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:templateId[@root='1.2.40.0.34.11.5.2.10']" id="tmp-r-90ff3e5a-a68a-4a55-b8dd-d480503ec0e4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.10-2012-01-12T000000.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)">(ZusammenfassungErgebnis): 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.2.10-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.10')">(ZusammenfassungErgebnis): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.10' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.10
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (ZusammenfassungErgebnis)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:code[(@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-045f3613-d4db-4264-add6-0b7035ae9d46">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.10-2012-01-12T000000.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)">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="@nullFlavor or (@code='55112-7' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Document summary' and @codeSystemName='LOINC')">(ZusammenfassungErgebnis): Der Elementinhalt MUSS einer von 'code '55112-7' codeSystem '2.16.840.1.113883.6.1' displayName='Document summary' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.10
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:title
Item: (ZusammenfassungErgebnis)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:title" id="tmp-r-2ac898a8-8ac8-4e9c-91db-2326bc3b699d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.10-2012-01-12T000000.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)">(ZusammenfassungErgebnis): 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.10-2012-01-12T000000.html" test="text()='Zusammenfassung / Ergebnis'">(ZusammenfassungErgebnis): Der Elementinhalt von 'hl7:title' MUSS ''Zusammenfassung / Ergebnis'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.10
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:text
Item: (ZusammenfassungErgebnis)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.10']/hl7:text" id="tmp-r-5a63997e-b566-41f5-b724-4c612a3aeb1f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.10-2012-01-12T000000.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)">(ZusammenfassungErgebnis): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.10-2012-01-12T000000.sch?>
   <!-- Verdachtsdiagnose -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.11-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.11-2012-01-12T000000">
   <title>Verdachtsdiagnose</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.11
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]
Item: (Verdachtsdiagnose)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']" id="tmp-r-6d936da8-464a-4ef2-b621-51f6f9d74444">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.11-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.11'])&gt;=1 ">(Verdachtsdiagnose): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.11'] 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.2.11-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.11'])&lt;=1">(Verdachtsdiagnose): Element 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.2.11-2012-01-12T000000.html" test="count(hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Verdachtsdiagnose): Element hl7:code[(@code='19005-8' 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.11-2012-01-12T000000.html" test="count(hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Verdachtsdiagnose): Element hl7:code[(@code='19005-8' 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.11-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Verdachtsdiagnose): 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.11
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:templateId[@root='1.2.40.0.34.11.5.2.11']
Item: (Verdachtsdiagnose)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:templateId[@root='1.2.40.0.34.11.5.2.11']" id="tmp-r-b58c9262-319a-46d2-8bea-310d6db3567c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.11-2012-01-12T000000.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)">(Verdachtsdiagnose): 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.2.11-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.11')">(Verdachtsdiagnose): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.11' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.11
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Verdachtsdiagnose)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:code[(@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-42930aba-6a99-4195-a57c-8aeee12f58cb">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.11-2012-01-12T000000.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)">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="@nullFlavor or (@code='19005-8' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Impression' and @codeSystemName='LOINC')">(Verdachtsdiagnose): Der Elementinhalt MUSS einer von 'code '19005-8' codeSystem '2.16.840.1.113883.6.1' displayName='Impression' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.11
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:title
Item: (Verdachtsdiagnose)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:title" id="tmp-r-28089a4b-2af5-40f2-9446-d0ae034a8af2">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.11-2012-01-12T000000.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)">(Verdachtsdiagnose): 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.11-2012-01-12T000000.html" test="text()='Verdachtsdiagnose'">(Verdachtsdiagnose): Der Elementinhalt von 'hl7:title' MUSS ''Verdachtsdiagnose'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.11
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:text
Item: (Verdachtsdiagnose)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.11']/hl7:text" id="tmp-r-6d3afbd9-2495-427e-b0c1-0e6a07c2f0a3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.11-2012-01-12T000000.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)">(Verdachtsdiagnose): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.11-2012-01-12T000000.sch?>
   <!-- Schlussfolgerung -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.12-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.12-2012-01-12T000000">
   <title>Schlussfolgerung</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.12
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]
Item: (Schlussfolgerung)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']" id="tmp-r-b6bb1f10-8df7-4647-930c-98dfaa177393">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.12-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.12'])&gt;=1 ">(Schlussfolgerung): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.12'] 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.2.12-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.12'])&lt;=1">(Schlussfolgerung): Element 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.2.12-2012-01-12T000000.html" test="count(hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Schlussfolgerung): Element hl7:code[(@code='55110-1' 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.12-2012-01-12T000000.html" test="count(hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Schlussfolgerung): Element hl7:code[(@code='55110-1' 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.12-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Schlussfolgerung): 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.12
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:templateId[@root='1.2.40.0.34.11.5.2.12']
Item: (Schlussfolgerung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:templateId[@root='1.2.40.0.34.11.5.2.12']" id="tmp-r-cbeb0396-3f0b-4bcd-b2e7-d8d773c30c12">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.12-2012-01-12T000000.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)">(Schlussfolgerung): 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.2.12-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.12')">(Schlussfolgerung): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.12' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.12
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Schlussfolgerung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:code[(@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-72965d5d-459e-4135-bbe1-bb6be4aaab03">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.12-2012-01-12T000000.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)">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="@nullFlavor or (@code='55110-1' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Conclusions' and @codeSystemName='LOINC')">(Schlussfolgerung): Der Elementinhalt MUSS einer von 'code '55110-1' codeSystem '2.16.840.1.113883.6.1' displayName='Conclusions' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.12
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:title
Item: (Schlussfolgerung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:title" id="tmp-r-eff49c27-d9f4-4f94-84d4-009b487df2fe">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.12-2012-01-12T000000.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)">(Schlussfolgerung): 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.12-2012-01-12T000000.html" test="text()='Schlussfolgerung'">(Schlussfolgerung): Der Elementinhalt von 'hl7:title' MUSS ''Schlussfolgerung'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.12
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:text
Item: (Schlussfolgerung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.12']/hl7:text" id="tmp-r-a6c959d4-1850-4962-8f0b-ba620eb6b972">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.12-2012-01-12T000000.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)">(Schlussfolgerung): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.12-2012-01-12T000000.sch?>
   <!-- Empfehlung -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.13-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.13-2012-01-12T000000">
   <title>Empfehlung</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.13
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]
Item: (Empfehlung)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']" id="tmp-r-3647afb4-2022-4435-8c43-0635b3b32e0d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.13-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Empfehlung): 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.13-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.13'])&gt;=1 ">(Empfehlung): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.13'] 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.2.13-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.13'])&lt;=1">(Empfehlung): Element 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.2.13-2012-01-12T000000.html" test="count(hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Empfehlung): Element hl7:code[(@code='18783-1' 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.13-2012-01-12T000000.html" test="count(hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Empfehlung): Element hl7:code[(@code='18783-1' 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.13-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Empfehlung): 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.13-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Empfehlung): 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.13-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Empfehlung): 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.13-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Empfehlung): 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.13
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:templateId[@root='1.2.40.0.34.11.5.2.13']
Item: (Empfehlung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:templateId[@root='1.2.40.0.34.11.5.2.13']" id="tmp-r-80aac0ec-7c41-4a39-9a30-82893f9a0940">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.13-2012-01-12T000000.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)">(Empfehlung): 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.2.13-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.13')">(Empfehlung): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.13' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.13
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Empfehlung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:code[(@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-42506fdb-be0d-4641-97d5-996e59632227">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.13-2012-01-12T000000.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)">(Empfehlung): 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.13-2012-01-12T000000.html" test="@nullFlavor or (@code='18783-1' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Study recommendation' and @codeSystemName='LOINC')">(Empfehlung): Der Elementinhalt MUSS einer von 'code '18783-1' codeSystem '2.16.840.1.113883.6.1' displayName='Study recommendation' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.13
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:title
Item: (Empfehlung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:title" id="tmp-r-e958ee87-dffa-4208-af68-266d3b3ac785">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.13-2012-01-12T000000.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)">(Empfehlung): 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.13-2012-01-12T000000.html" test="text()='Empfehlung'">(Empfehlung): Der Elementinhalt von 'hl7:title' MUSS ''Empfehlung'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.13
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:text
Item: (Empfehlung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.13']/hl7:text" id="tmp-r-95a0cd7d-5cc5-4ca6-8771-098fab8316f7">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.13-2012-01-12T000000.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)">(Empfehlung): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.13-2012-01-12T000000.sch?>
   <!-- Addendum -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.14-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.14-2012-01-12T000000">
   <title>Addendum</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.14
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]
Item: (Addendum)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']" id="tmp-r-3b9b1cd7-86d1-4345-90ea-fd4e913d95aa">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.14-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Addendum): 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.14-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.14'])&gt;=1 ">(Addendum): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.14'] 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.2.14-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.14'])&lt;=1">(Addendum): Element 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.2.14-2012-01-12T000000.html" test="count(hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Addendum): Element hl7:code[(@code='55107-7' 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.14-2012-01-12T000000.html" test="count(hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Addendum): Element hl7:code[(@code='55107-7' 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.14-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Addendum): 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.14-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Addendum): 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.14-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Addendum): 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.14-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Addendum): 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.14
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:templateId[@root='1.2.40.0.34.11.5.2.14']
Item: (Addendum)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:templateId[@root='1.2.40.0.34.11.5.2.14']" id="tmp-r-d6fee1e7-fb98-448a-a0ca-cb7f916c7a0e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.14-2012-01-12T000000.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)">(Addendum): 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.2.14-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.14')">(Addendum): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.14' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.14
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Addendum)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:code[(@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-4bf6da32-985f-470e-b59c-7a407a30e89f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.14-2012-01-12T000000.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)">(Addendum): 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.14-2012-01-12T000000.html" test="@nullFlavor or (@code='55107-7' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Addendum' and @codeSystemName='LOINC')">(Addendum): Der Elementinhalt MUSS einer von 'code '55107-7' codeSystem '2.16.840.1.113883.6.1' displayName='Addendum' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.14
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:title
Item: (Addendum)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:title" id="tmp-r-afd80c95-27f4-42de-bebb-845c7924faf8">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.14-2012-01-12T000000.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)">(Addendum): 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.14-2012-01-12T000000.html" test="text()='Addendum'">(Addendum): Der Elementinhalt von 'hl7:title' MUSS ''Addendum'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.14
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:text
Item: (Addendum)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.14']/hl7:text" id="tmp-r-837b55c2-f377-4664-a501-411fe77e1092">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.14-2012-01-12T000000.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)">(Addendum): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.14-2012-01-12T000000.sch?>
   <!-- AnamneseBildgebendeDiagnostik -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.2-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.2-2012-01-12T000000">
   <title>Anamnese (BildgebendeDiagnostik)</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.2
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]
Item: (AnamneseBildgebendeDiagnostik)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']" id="tmp-r-58bece86-7e36-46a9-b61c-935a1557da2f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.2'])&gt;=1 ">(AnamneseBildgebendeDiagnostik): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.2'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.2'])&lt;=1">(AnamneseBildgebendeDiagnostik): Element 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.2.2-2012-01-12T000000.html" test="count(hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(AnamneseBildgebendeDiagnostik): Element hl7:code[(@code='11329-0' 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.2-2012-01-12T000000.html" test="count(hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(AnamneseBildgebendeDiagnostik): Element hl7:code[(@code='11329-0' 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.2-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(AnamneseBildgebendeDiagnostik): 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.2
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:templateId[@root='1.2.40.0.34.11.5.2.2']
Item: (AnamneseBildgebendeDiagnostik)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:templateId[@root='1.2.40.0.34.11.5.2.2']" id="tmp-r-498304f5-30cb-4f10-9c19-148d54eeeb35">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.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)">(AnamneseBildgebendeDiagnostik): 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.2.2-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.2')">(AnamneseBildgebendeDiagnostik): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.2' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.2
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (AnamneseBildgebendeDiagnostik)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:code[(@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-460c297c-32f3-409a-87ae-ce9b193c9710">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.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)">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="@nullFlavor or (@code='11329-0' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='History general' and @codeSystemName='LOINC')">(AnamneseBildgebendeDiagnostik): Der Elementinhalt MUSS einer von 'code '11329-0' codeSystem '2.16.840.1.113883.6.1' displayName='History general' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.2
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:title
Item: (AnamneseBildgebendeDiagnostik)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:title" id="tmp-r-155da2f5-3d15-4def-92e2-70cbbf7c9b59">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.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)">(AnamneseBildgebendeDiagnostik): 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.2-2012-01-12T000000.html" test="text()='Anamnese'">(AnamneseBildgebendeDiagnostik): Der Elementinhalt von 'hl7:title' MUSS ''Anamnese'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.2
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:text
Item: (AnamneseBildgebendeDiagnostik)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.2']/hl7:text" id="tmp-r-415f78f6-8f7e-41f4-a258-84b305271ea6">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.2-2012-01-12T000000.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)">(AnamneseBildgebendeDiagnostik): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.2-2012-01-12T000000.sch?>
   <!-- Indikation -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.3-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.3-2012-01-12T000000">
   <title>Indikation</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.3
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]
Item: (Indikation)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']" id="tmp-r-6f5adfb9-3bcf-4d71-b7a1-e94fd74834ae">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Indikation): 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.3-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.3'])&gt;=1 ">(Indikation): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.3'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.3'])&lt;=1">(Indikation): Element 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.2.3-2012-01-12T000000.html" test="count(hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Indikation): Element hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.html" test="count(hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Indikation): Element hl7:code[(@code='18785-6' 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.3-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Indikation): 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.3-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Indikation): 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.3-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Indikation): 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.3-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Indikation): 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.3
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:templateId[@root='1.2.40.0.34.11.5.2.3']
Item: (Indikation)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:templateId[@root='1.2.40.0.34.11.5.2.3']" id="tmp-r-089d00f7-0a26-4e62-99b4-8cf8938a1c23">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.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)">(Indikation): 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.2.3-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.3')">(Indikation): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.3' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.3
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Indikation)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:code[(@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-4b889009-fb7f-4f5f-86ff-90a09787291e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.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)">(Indikation): 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.3-2012-01-12T000000.html" test="@nullFlavor or (@code='18785-6' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Reason for study' and @codeSystemName='LOINC')">(Indikation): Der Elementinhalt MUSS einer von 'code '18785-6' codeSystem '2.16.840.1.113883.6.1' displayName='Reason for study' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.3
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:title
Item: (Indikation)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:title" id="tmp-r-6835db4c-99ac-40fe-9b05-75c62446b71f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.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)">(Indikation): 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.3-2012-01-12T000000.html" test="text()='Indikation'">(Indikation): Der Elementinhalt von 'hl7:title' MUSS ''Indikation'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.3
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:text
Item: (Indikation)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.3']/hl7:text" id="tmp-r-a7cda38c-6186-4f0d-a877-2112c055af0b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.3-2012-01-12T000000.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)">(Indikation): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.3-2012-01-12T000000.sch?>
   <!-- PatientenStatusAngaben -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.4-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.4-2012-01-12T000000">
   <title>Patientenstatus / Patientenangaben</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.4
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]
Item: (PatientenStatusAngaben)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']" id="tmp-r-5e133101-c831-47f9-9703-31bdff152794">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.4'])&gt;=1 ">(PatientenStatusAngaben): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.4'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.4'])&lt;=1">(PatientenStatusAngaben): Element 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.2.4-2012-01-12T000000.html" test="count(hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(PatientenStatusAngaben): Element hl7:code[(@code='55108-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.4-2012-01-12T000000.html" test="count(hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(PatientenStatusAngaben): Element hl7:code[(@code='55108-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.4-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(PatientenStatusAngaben): 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.4
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:templateId[@root='1.2.40.0.34.11.5.2.4']
Item: (PatientenStatusAngaben)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:templateId[@root='1.2.40.0.34.11.5.2.4']" id="tmp-r-3ef5e681-e608-4085-9dcf-f29fec6029ad">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.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)">(PatientenStatusAngaben): 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.2.4-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.4')">(PatientenStatusAngaben): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.4' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.4
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (PatientenStatusAngaben)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:code[(@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-d63924d0-6b8e-4305-bda2-03d798e6fa0e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.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)">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="@nullFlavor or (@code='55108-5' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Clinical presentation' and @codeSystemName='LOINC')">(PatientenStatusAngaben): Der Elementinhalt MUSS einer von 'code '55108-5' codeSystem '2.16.840.1.113883.6.1' displayName='Clinical presentation' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.4
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:title
Item: (PatientenStatusAngaben)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:title" id="tmp-r-9eaa8033-8f01-48ce-a641-a8f07a330faa">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.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)">(PatientenStatusAngaben): 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.4-2012-01-12T000000.html" test="text()='Patientenstatus / Patientenangaben'">(PatientenStatusAngaben): Der Elementinhalt von 'hl7:title' MUSS ''Patientenstatus / Patientenangaben'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.4
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:text
Item: (PatientenStatusAngaben)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.4']/hl7:text" id="tmp-r-3178eca4-853a-4752-a54a-aa67651b6639">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.4-2012-01-12T000000.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)">(PatientenStatusAngaben): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.4-2012-01-12T000000.sch?>
   <!-- AktuelleUntersuchung -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.5-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.5-2012-01-12T000000">
   <title>Aktuelle Untersuchung</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.5
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]
Item: (AktuelleUntersuchung)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']" id="tmp-r-1ee9b479-be09-474a-b36b-5dd2d01fc92f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.5-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.5'])&gt;=1 ">(AktuelleUntersuchung): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.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.2.5-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.5'])&lt;=1">(AktuelleUntersuchung): Element 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.2.5-2012-01-12T000000.html" test="count(hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(AktuelleUntersuchung): Element hl7:code[(@code='55111-9' 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.5-2012-01-12T000000.html" test="count(hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(AktuelleUntersuchung): Element hl7:code[(@code='55111-9' 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.5-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(AktuelleUntersuchung): 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.5
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:templateId[@root='1.2.40.0.34.11.5.2.5']
Item: (AktuelleUntersuchung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:templateId[@root='1.2.40.0.34.11.5.2.5']" id="tmp-r-8c292573-191f-4e92-9827-ee3d86971611">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.5-2012-01-12T000000.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)">(AktuelleUntersuchung): 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.2.5-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.5')">(AktuelleUntersuchung): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.5' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.5
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (AktuelleUntersuchung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:code[(@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-de5aa623-c1fa-498b-9ded-7c675da23eef">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.5-2012-01-12T000000.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)">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="@nullFlavor or (@code='55111-9' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Current imaging procedure descriptions' and @codeSystemName='LOINC')">(AktuelleUntersuchung): Der Elementinhalt MUSS einer von 'code '55111-9' codeSystem '2.16.840.1.113883.6.1' displayName='Current imaging procedure descriptions' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.5
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:title
Item: (AktuelleUntersuchung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:title" id="tmp-r-c632e07e-e413-4827-a200-85ef37a7082b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.5-2012-01-12T000000.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)">(AktuelleUntersuchung): 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.5-2012-01-12T000000.html" test="text()='Aktuelle Untersuchung'">(AktuelleUntersuchung): Der Elementinhalt von 'hl7:title' MUSS ''Aktuelle Untersuchung'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.5
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:text
Item: (AktuelleUntersuchung)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.5']/hl7:text" id="tmp-r-0769ab62-f06e-40c7-a5b5-222498b0963c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.5-2012-01-12T000000.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)">(AktuelleUntersuchung): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.5-2012-01-12T000000.sch?>
   <!-- FruehereUntersuchungen -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.6-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.6-2012-01-12T000000">
   <title>Frühere Untersuchungen</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.6
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]
Item: (FruehereUntersuchungen)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']" id="tmp-r-19529dbf-eedb-42a6-9b56-57fccf8073ed">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.6-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.6'])&gt;=1 ">(FruehereUntersuchungen): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.6'] 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.2.6-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.6'])&lt;=1">(FruehereUntersuchungen): Element 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.2.6-2012-01-12T000000.html" test="count(hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(FruehereUntersuchungen): Element hl7:code[(@code='55114-3' 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.6-2012-01-12T000000.html" test="count(hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(FruehereUntersuchungen): Element hl7:code[(@code='55114-3' 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.6-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(FruehereUntersuchungen): 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.6
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:templateId[@root='1.2.40.0.34.11.5.2.6']
Item: (FruehereUntersuchungen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:templateId[@root='1.2.40.0.34.11.5.2.6']" id="tmp-r-f0effbdf-fb30-4c26-9cdc-a2233b4ec8bc">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.6-2012-01-12T000000.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)">(FruehereUntersuchungen): 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.2.6-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.6')">(FruehereUntersuchungen): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.6' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.6
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (FruehereUntersuchungen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:code[(@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-c17d52cc-5c3f-4ac6-ad7a-b2d472f33a2c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.6-2012-01-12T000000.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)">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="@nullFlavor or (@code='55114-3' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Prior imaging procedure descriptions' and @codeSystemName='LOINC')">(FruehereUntersuchungen): Der Elementinhalt MUSS einer von 'code '55114-3' codeSystem '2.16.840.1.113883.6.1' displayName='Prior imaging procedure descriptions' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.6
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:title
Item: (FruehereUntersuchungen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:title" id="tmp-r-fc66ec25-4722-4d57-b635-971551ce7305">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.6-2012-01-12T000000.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)">(FruehereUntersuchungen): 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.6-2012-01-12T000000.html" test="text()='Frühere Untersuchungen'">(FruehereUntersuchungen): Der Elementinhalt von 'hl7:title' MUSS ''Frühere Untersuchungen'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.6
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:text
Item: (FruehereUntersuchungen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.6']/hl7:text" id="tmp-r-d61ff640-ef11-401b-a43d-1c3f0350d8f4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.6-2012-01-12T000000.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)">(FruehereUntersuchungen): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.6-2012-01-12T000000.sch?>
   <!-- FruehereBefunde -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.7-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.7-2012-01-12T000000">
   <title>Frühere Befunde</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.7
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]
Item: (FruehereBefunde)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']" id="tmp-r-130817fa-2276-4339-9199-521a8adf634b">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.7'])&gt;=1 ">(FruehereBefunde): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.7'] 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.2.7-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.7'])&lt;=1">(FruehereBefunde): Element 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.2.7-2012-01-12T000000.html" test="count(hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(FruehereBefunde): Element hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.html" test="count(hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(FruehereBefunde): Element hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(FruehereBefunde): 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.7
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:templateId[@root='1.2.40.0.34.11.5.2.7']
Item: (FruehereBefunde)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:templateId[@root='1.2.40.0.34.11.5.2.7']" id="tmp-r-9a07a3e0-16db-4779-8e30-01034ae2b6d4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.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)">(FruehereBefunde): 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.2.7-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.7')">(FruehereBefunde): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.7' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.7
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (FruehereBefunde)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:code[(@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-0735ccd5-5e30-47ca-86e7-57c82190c6bc">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.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)">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="@nullFlavor or (@code='18834-2' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Comparison.study' and @codeSystemName='LOINC')">(FruehereBefunde): Der Elementinhalt MUSS einer von 'code '18834-2' codeSystem '2.16.840.1.113883.6.1' displayName='Comparison.study' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.7
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:title
Item: (FruehereBefunde)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:title" id="tmp-r-b2b1f1e3-5602-43f6-8e94-e95a76748f84">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.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)">(FruehereBefunde): 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.7-2012-01-12T000000.html" test="text()='Frühere Befunde'">(FruehereBefunde): Der Elementinhalt von 'hl7:title' MUSS ''Frühere Befunde'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.7
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:text
Item: (FruehereBefunde)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.7']/hl7:text" id="tmp-r-f3a9314a-5829-4f1f-ae69-5c9b03c21414">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.7-2012-01-12T000000.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)">(FruehereBefunde): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.7-2012-01-12T000000.sch?>
   <!-- Komplikationen -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.8-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.8-2012-01-12T000000">
   <title>Komplikationen</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.8
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]
Item: (Komplikationen)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']" id="tmp-r-f1332562-8c7b-44e6-a6b8-df7e45b8a67d">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.8-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Komplikationen): 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.8-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.8'])&gt;=1 ">(Komplikationen): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.8'] 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.2.8-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.8'])&lt;=1">(Komplikationen): Element 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.2.8-2012-01-12T000000.html" test="count(hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Komplikationen): Element hl7:code[(@code='55109-3' 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.8-2012-01-12T000000.html" test="count(hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Komplikationen): Element hl7:code[(@code='55109-3' 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.8-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Komplikationen): 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.8-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Komplikationen): 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.8-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Komplikationen): 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.8-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Komplikationen): 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.8
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:templateId[@root='1.2.40.0.34.11.5.2.8']
Item: (Komplikationen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:templateId[@root='1.2.40.0.34.11.5.2.8']" id="tmp-r-53e07267-3725-4e54-b9ff-dcbfd9e31a10">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.8-2012-01-12T000000.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)">(Komplikationen): 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.2.8-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.8')">(Komplikationen): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.8' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.8
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Komplikationen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:code[(@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-07d8945f-aa4a-424f-b569-a955b43ea3c4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.8-2012-01-12T000000.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)">(Komplikationen): 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.8-2012-01-12T000000.html" test="@nullFlavor or (@code='55109-3' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Complications' and @codeSystemName='LOINC')">(Komplikationen): Der Elementinhalt MUSS einer von 'code '55109-3' codeSystem '2.16.840.1.113883.6.1' displayName='Complications' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.8
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:title
Item: (Komplikationen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:title" id="tmp-r-54f015d1-efe7-4cd0-aec8-bd092eca5510">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.8-2012-01-12T000000.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)">(Komplikationen): 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.8-2012-01-12T000000.html" test="text()='Komplikationen'">(Komplikationen): Der Elementinhalt von 'hl7:title' MUSS ''Komplikationen'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.8
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:text
Item: (Komplikationen)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.8']/hl7:text" id="tmp-r-6fdb458a-c908-4dfc-8ea6-74901c0000cb">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.8-2012-01-12T000000.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)">(Komplikationen): 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><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.8-2012-01-12T000000.sch?>
   <!-- Befund -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.2.9-2012-01-12T000000.sch?><pattern id="template-1.2.40.0.34.11.5.2.9-2012-01-12T000000">
   <title>Befund</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]
Item: (Befund)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']" id="tmp-r-6a8afd70-40b5-4250-8dc4-84e072146c16">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.9-2012-01-12T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(Befund): 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.9-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.9'])&gt;=1 ">(Befund): Element hl7:templateId[@root='1.2.40.0.34.11.5.2.9'] 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.2.9-2012-01-12T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.2.9'])&lt;=1">(Befund): Element 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.2.9-2012-01-12T000000.html" test="count(hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(Befund): Element hl7:code[(@code='18782-3' 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.9-2012-01-12T000000.html" test="count(hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(Befund): Element hl7:code[(@code='18782-3' 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.9-2012-01-12T000000.html" test="count(hl7:title)&gt;=1 and not(hl7:title/@nullFlavor)">(Befund): 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.9-2012-01-12T000000.html" test="count(hl7:title)&lt;=1">(Befund): 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.9-2012-01-12T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(Befund): 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.9-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(Befund): 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.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:templateId[@root='1.2.40.0.34.11.5.2.9']
Item: (Befund)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:templateId[@root='1.2.40.0.34.11.5.2.9']" id="tmp-r-4af76ecc-1a3f-4146-9b0a-c41c5e52e7fe">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.9-2012-01-12T000000.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)">(Befund): 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.2.9-2012-01-12T000000.html" test="string(@root)=('1.2.40.0.34.11.5.2.9')">(Befund): Der Wert von @root MUSS '1.2.40.0.34.11.5.2.9' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (Befund)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:code[(@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-638c625d-d8ca-41a9-b3aa-695445ffad9c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.9-2012-01-12T000000.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)">(Befund): 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.9-2012-01-12T000000.html" test="@nullFlavor or (@code='18782-3' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Study observation' and @codeSystemName='LOINC')">(Befund): Der Elementinhalt MUSS einer von 'code '18782-3' codeSystem '2.16.840.1.113883.6.1' displayName='Study observation' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:title
Item: (Befund)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:title" id="tmp-r-3260961c-1c2e-4a60-8d55-0599fccf1a06">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.9-2012-01-12T000000.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)">(Befund): 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.9-2012-01-12T000000.html" test="text()='Befund'">(Befund): Der Elementinhalt von 'hl7:title' MUSS ''Befund'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:text
Item: (Befund)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:text" id="tmp-r-f06c0ddf-38b4-476e-ba0a-8e06bf2d4ba9">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.2.9-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='SD.TEXT' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(Befund): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:SD.TEXT" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="SD.TEXT"/>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]
Item: (Befund)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.2.9
Context: *[hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']]/hl7:section[hl7:templateId/@root='1.2.40.0.34.11.5.2.9']/hl7:entry[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]
Item: (Befund)
--></pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.2.9-2012-01-12T000000.sch?>
   <!-- KlassifikationBIRADS -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.3.1-2014-03-24T000000.sch?><pattern id="template-1.2.40.0.34.11.5.3.1-2014-03-24T000000">
   <title>BI-RADS® Klassifikation</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]
Item: (KlassifikationBIRADS)
-->

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

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']" id="tmp-r-d995d723-b07f-4223-a917-ee5978469740">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="string(@classCode)=('OBS')">(KlassifikationBIRADS): Der Wert von @classCode MUSS 'OBS' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="string(@moodCode)=('EVN')">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.3.1'])&gt;=1 ">(KlassifikationBIRADS): Element hl7:templateId[@root='1.2.40.0.34.11.5.3.1'] 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.3.1-2014-03-24T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.3.1'])&lt;=1">(KlassifikationBIRADS): Element hl7:templateId[@root='1.2.40.0.34.11.5.3.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.3.1-2014-03-24T000000.html" test="count(hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1 and not(hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')]/@nullFlavor)">(KlassifikationBIRADS): Element hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(KlassifikationBIRADS): Element hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:text)&gt;=1 and not(hl7:text/@nullFlavor)">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="count(hl7:text)&lt;=1">(KlassifikationBIRADS): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:statusCode[@code='completed'])&gt;=1 and not(hl7:statusCode[@code='completed']/@nullFlavor)">(KlassifikationBIRADS): Element hl7:statusCode[@code='completed'] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:statusCode[@code='completed'])&lt;=1">(KlassifikationBIRADS): Element hl7:statusCode[@code='completed'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:effectiveTime)&gt;=1 and not(hl7:effectiveTime/@nullFlavor)">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="count(hl7:effectiveTime)&lt;=1">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="count(hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&gt;=1 and not(hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]/@nullFlavor)">(KlassifikationBIRADS): Element hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-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.3.1-2014-03-24T000000.html" test="count(hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)])&lt;=1">(KlassifikationBIRADS): Element hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-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.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:templateId[@root='1.2.40.0.34.11.5.3.1']
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:templateId[@root='1.2.40.0.34.11.5.3.1']" id="tmp-r-a10123c0-1961-4ee2-8092-f0dcb75a924c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.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)">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="string(@root)=('1.2.40.0.34.11.5.3.1')">(KlassifikationBIRADS): Der Wert von @root MUSS '1.2.40.0.34.11.5.3.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')]
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:code[(@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1')]" id="tmp-r-4108d40c-d57d-4ed1-8e1b-4dfabe9dcdcc">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.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)">(KlassifikationBIRADS): 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.3.1-2014-03-24T000000.html" test="@nullFlavor or (@code='36625-2' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Breast Mammogram' and @codeSystemName='LOINC')">(KlassifikationBIRADS): Der Elementinhalt MUSS einer von 'code '36625-2' codeSystem '2.16.840.1.113883.6.1' displayName='Breast Mammogram' codeSystemName='LOINC'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:text
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:text" id="tmp-r-79e26354-838c-4932-b1b9-a04ad14aed68">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.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)">(KlassifikationBIRADS): 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"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="count(hl7:reference)&gt;=1 and not(hl7:reference/@nullFlavor)">(KlassifikationBIRADS): Element hl7:reference 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.3.1-2014-03-24T000000.html" test="count(hl7:reference)&lt;=1">(KlassifikationBIRADS): Element hl7:reference kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:text/hl7:reference
Item: (KlassifikationBIRADS)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:statusCode[@code='completed']
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:statusCode[@code='completed']" id="tmp-r-a61cdc1a-1c7b-4663-ade3-73590b9714d4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.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)">(KlassifikationBIRADS): 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.5.3.1-2014-03-24T000000.html" test="@nullFlavor or (@code='completed')">(KlassifikationBIRADS): Der Elementinhalt MUSS einer von 'code 'completed'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:effectiveTime
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:effectiveTime" id="tmp-r-377c32c0-3714-4a6f-a1f8-fd2de621d1fc">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.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)">(KlassifikationBIRADS): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TS"/>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.1
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]
Item: (KlassifikationBIRADS)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']]/hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.1']/hl7:value[concat(@code,@codeSystem)=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/concept/concat(@code,@codeSystem) or (@nullFlavor=doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet/conceptList/exception/@code)]" id="tmp-r-3023886f-56c2-4a71-b6bc-bd4c0fe0faea">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(KlassifikationBIRADS): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <let name="theCodeSystemVersion" value="@codeSystemVersion"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.1-2014-03-24T000000.html" test="@nullFlavor or exists(doc('include/voc-1.2.40.0.34.10.55-DYNAMIC.xml')/*/valueSet[conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(KlassifikationBIRADS): Der Elementinhalt MUSS einer von 'ELGA_MammogramAssessment ELGA Mammogram Assessment (DYNAMIC)' sein.</assert>
      <let name="theNullFlavor" value="@nullFlavor"/>
      <let name="validNullFlavorsFound" value="exists(doc('include/voc-1.2.40.0.34.10.55-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.3.1-2014-03-24T000000.html" test="not(@nullFlavor) or $validNullFlavorsFound">(KlassifikationBIRADS): 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_MammogramAssessment ELGA Mammogram Assessment (DYNAMIC).</assert>
   </rule>
</pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.3.1-2014-03-24T000000.sch?>
   <!-- BefundtextKodierung -->
   <?DSDL_INCLUDE_START include/1.2.40.0.34.11.5.3.2-2014-03-24T000000.sch?><pattern id="template-1.2.40.0.34.11.5.3.2-2014-03-24T000000">
   <title>Kodierung des Befundtextes</title>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]
Item: (BefundtextKodierung)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']
Item: (BefundtextKodierung)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']" id="tmp-r-cdcbc955-470f-4f7d-834f-ca69eaad7ac4">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.html" test="string(@classCode)=('OBS')">(BefundtextKodierung): Der Wert von @classCode MUSS 'OBS' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.html" test="string(@moodCode)=('EVN')">(BefundtextKodierung): 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.3.2-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12'])&gt;=1 ">(BefundtextKodierung): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12'] 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.3.2-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12'])&lt;=1">(BefundtextKodierung): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.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.3.2-2014-03-24T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.3.2'])&gt;=1 ">(BefundtextKodierung): Element hl7:templateId[@root='1.2.40.0.34.11.5.3.2'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.html" test="count(hl7:templateId[@root='1.2.40.0.34.11.5.3.2'])&lt;=1">(BefundtextKodierung): Element hl7:templateId[@root='1.2.40.0.34.11.5.3.2'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.html" test="count(hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')])&gt;=1 and not(hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')]/@nullFlavor)">(BefundtextKodierung): Element hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.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.5.3.2-2014-03-24T000000.html" test="count(hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')])&lt;=1">(BefundtextKodierung): Element hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.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.3.2-2014-03-24T000000.html" test="count(hl7:value)&gt;=1 and not(hl7:value/@nullFlavor)">(BefundtextKodierung): Element hl7:value 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.3.2-2014-03-24T000000.html" test="count(hl7:value)&lt;=1">(BefundtextKodierung): Element hl7:value kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12']
Item: (BefundtextKodierung)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.12']" id="tmp-r-44cb8135-4a6a-4bd8-9325-ac3360be4cd3">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.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)">(BefundtextKodierung): 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.3.2-2014-03-24T000000.html" test="string(@root)=('2.16.840.1.113883.10.20.6.2.12')">(BefundtextKodierung): Der Wert von @root MUSS '2.16.840.1.113883.10.20.6.2.12' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:templateId[@root='1.2.40.0.34.11.5.3.2']
Item: (BefundtextKodierung)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:templateId[@root='1.2.40.0.34.11.5.3.2']" id="tmp-r-b1609fdf-09eb-42c8-b40d-76bd752e5791">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.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)">(BefundtextKodierung): 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.3.2-2014-03-24T000000.html" test="string(@root)=('1.2.40.0.34.11.5.3.2')">(BefundtextKodierung): Der Wert von @root MUSS '1.2.40.0.34.11.5.3.2' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')]
Item: (BefundtextKodierung)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:code[(@code='121071' and @codeSystem='1.2.840.10008.2.16.4')]" id="tmp-r-00fdf0c1-38c6-4003-90ba-525013cac3f1">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.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)">(BefundtextKodierung): 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.3.2-2014-03-24T000000.html" test="@nullFlavor or (@code='121071' and @codeSystem='1.2.840.10008.2.16.4' and @displayName='Finding' and @codeSystemName='DCM')">(BefundtextKodierung): Der Elementinhalt MUSS einer von 'code '121071' codeSystem '1.2.840.10008.2.16.4' displayName='Finding' codeSystemName='DCM'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:value
Item: (BefundtextKodierung)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:value" id="tmp-r-7682b7d0-1925-4387-a645-f3763fc944a5">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.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)">(BefundtextKodierung): 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"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.5.3.2-2014-03-24T000000.html" test="count(hl7:reference)&gt;=1 and not(hl7:reference/@nullFlavor)">(BefundtextKodierung): Element hl7:reference 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.3.2-2014-03-24T000000.html" test="count(hl7:reference)&lt;=1">(BefundtextKodierung): Element hl7:reference kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 1.2.40.0.34.11.5.3.2
Context: *[hl7:observation[hl7:templateId/@root='1.2.40.0.34.11.5.3.2']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.12' and hl7:templateId/@root='1.2.40.0.34.11.5.3.2']/hl7:value/hl7:reference
Item: (BefundtextKodierung)
-->
</pattern><?DSDL_INCLUDE_END include/1.2.40.0.34.11.5.3.2-2014-03-24T000000.sch?>
   <!-- DOCS -->
   <?DSDL_INCLUDE_START include/2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.sch?><pattern id="template-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000">
   <title>DICOM Object Catalog Sektion Allgemein</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.1.1
Context: *[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]
Item: (DOCS)
-->

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

   <rule context="*[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']" id="tmp-r-1ffafc85-907b-487d-a74a-38dcfd7c9b58">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="string(@classCode)=('DOCSECT') or not(@classCode)">(DOCS): Der Wert von @classCode MUSS 'DOCSECT' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1'])&gt;=1 ">(DOCS): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1'])&lt;=1">(DOCS): Element 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-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')])&gt;=1 and not(hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')]/@nullFlavor)">(DOCS): Element hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')])&lt;=1">(DOCS): Element hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:title)=0">(DOCS): Element hl7:title DARF NICHT vorkommen.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:text)=0">(DOCS): Element hl7:text DARF NICHT vorkommen.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="count(hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']])&gt;=1 and not(hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/@nullFlavor)">(DOCS): Element hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']] ist mandatory [min 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.1.1
Context: *[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1']
Item: (DOCS)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.1.1']" id="tmp-r-5583f2b8-36a0-4d8e-9e53-d3edfa540d68">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.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)">(DOCS): 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-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="string(@root)=('2.16.840.1.113883.10.20.6.1.1')">(DOCS): Der Wert von @root MUSS '2.16.840.1.113883.10.20.6.1.1' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.1.1
Context: *[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')]
Item: (DOCS)
-->

   <rule context="*[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:code[(@code='121181' and @codeSystem='1.2.840.10008.2.16.4')]" id="tmp-r-184a7b6a-a102-4eb8-9f95-ae464ba4b04f">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.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)">(DOCS): 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-2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.html" test="@nullFlavor or (@code='121181' and @codeSystem='1.2.840.10008.2.16.4' and @displayName='DICOM Object Catalog' and @codeSystemName='DCM')">(DOCS): Der Elementinhalt MUSS einer von 'code '121181' codeSystem '1.2.840.10008.2.16.4' displayName='DICOM Object Catalog' codeSystemName='DCM'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.1.1
Context: *[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:title
Item: (DOCS)
-->

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


   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.1.1
Context: *[hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']]/hl7:section[hl7:templateId/@root='2.16.840.1.113883.10.20.6.1.1']/hl7:entry[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]
Item: (DOCS)
--></pattern><?DSDL_INCLUDE_END include/2.16.840.1.113883.10.20.6.1.1-2014-03-24T000000.sch?>
   <!-- StudyAct -->
   <?DSDL_INCLUDE_START include/2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.sch?><pattern id="template-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000">
   <title>Study Act</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]
Item: (StudyAct)
-->

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

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']" id="tmp-r-0586f979-5f54-4184-9086-ca40e501ea3a">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="string(@classCode)=('ACT')">(StudyAct): Der Wert von @classCode MUSS 'ACT' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="string(@moodCode)=('EVN')">(StudyAct): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6'])&gt;=1 ">(StudyAct): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6'])&lt;=1">(StudyAct): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:id)&gt;=1 ">(StudyAct): Element hl7:id ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:id)&lt;=1">(StudyAct): Element hl7:id kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')])&gt;=1 and not(hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')]/@nullFlavor)">(StudyAct): Element hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')])&lt;=1">(StudyAct): Element hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:text)&lt;=1">(StudyAct): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:effectiveTime)&lt;=1">(StudyAct): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="count(hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]])&gt;=1 and not(hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/@nullFlavor)">(StudyAct): Element hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]] ist mandatory [min 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6']
Item: (StudyAct)
-->

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.6']" id="tmp-r-a7141e15-9fbd-421d-895b-7ba1807bdd47">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.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)">(StudyAct): 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-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="string(@root)=('2.16.840.1.113883.10.20.6.2.6')">(StudyAct): Der Wert von @root MUSS '2.16.840.1.113883.10.20.6.2.6' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:id
Item: (StudyAct)
-->

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:id" id="tmp-r-06ac1f73-a8dd-4aee-b0c8-bcc93ab69552">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.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)">(StudyAct): 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-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="@root">(StudyAct): Attribut @root MUSS vorkommen.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="not(@extension)">(StudyAct): Attribut @extension DARF NICHT vorkommen.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')]
Item: (StudyAct)
-->

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:code[(@code='113014' and @codeSystem='1.2.840.10008.2.16.4')]" id="tmp-r-5069163a-f502-46c9-b2bc-3cdeea24e5de">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.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)">(StudyAct): 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-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.html" test="@nullFlavor or (@code='113014' and @codeSystem='1.2.840.10008.2.16.4' and @displayName='DICOM Study' and @codeSystemName='DCM')">(StudyAct): Der Elementinhalt MUSS einer von 'code '113014' codeSystem '1.2.840.10008.2.16.4' displayName='DICOM Study' codeSystemName='DCM'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:text
Item: (StudyAct)
-->

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:text" id="tmp-r-243e7797-548b-43b6-9683-67e5e44ede5e">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.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)">(StudyAct): 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: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:effectiveTime
Item: (StudyAct)
-->

   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:effectiveTime" id="tmp-r-b80b3ca3-beaa-4edb-ac99-5551bdae6384">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.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)">(StudyAct): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TS"/>
   </rule>

   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.6
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]
Item: (StudyAct)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]
Item: (SeriesAct)
-->

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="string(@classCode)=('ACT')">(SeriesAct): 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.30031-2012-01-12T000000.html" test="string(@moodCode)=('EVN')">(SeriesAct): 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.30031-2012-01-12T000000.html" test="count(hl7:id)&gt;=1 ">(SeriesAct): 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.30031-2012-01-12T000000.html" test="count(hl7:id)&lt;=1">(SeriesAct): 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.30031-2012-01-12T000000.html" test="count(hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')])&gt;=1 and not(hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/@nullFlavor)">(SeriesAct): Element hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.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.30031-2012-01-12T000000.html" test="count(hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')])&lt;=1">(SeriesAct): Element hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.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.30031-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(SeriesAct): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="count(hl7:effectiveTime)&lt;=1">(SeriesAct): 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.30031-2012-01-12T000000.html" test="count(hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']])&gt;=1 and not(hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/@nullFlavor)">(SeriesAct): Element hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']] ist mandatory [min 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:id
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:id">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.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)">(SeriesAct): 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.30031-2012-01-12T000000.html" test="@root">(SeriesAct): Attribut @root MUSS vorkommen.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="not(@extension)">(SeriesAct): Attribut @extension DARF NICHT vorkommen.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SeriesAct): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="@nullFlavor or (@code='113015' and @codeSystem='1.2.840.10008.2.16.4' and @displayName='DICOM Series' and @codeSystemName='DCM')">(SeriesAct): Der Elementinhalt MUSS einer von 'code '113015' codeSystem '1.2.840.10008.2.16.4' displayName='DICOM Series' codeSystemName='DCM'' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="count(hl7:qualifier)&gt;=1 and not(hl7:qualifier/@nullFlavor)">(SeriesAct): Element hl7:qualifier ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="count(hl7:qualifier)&lt;=1">(SeriesAct): Element hl7:qualifier kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CR' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SeriesAct): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CR" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CR"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="count(hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')])&gt;=1 and not(hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')]/@nullFlavor)">(SeriesAct): Element hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.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.30031-2012-01-12T000000.html" test="count(hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')])&lt;=1">(SeriesAct): Element hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.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.30031-2012-01-12T000000.html" test="count(hl7:value[@codeSystem='1.2.840.10008.2.16.4'])&gt;=1 and not(hl7:value[@codeSystem='1.2.840.10008.2.16.4']/@nullFlavor)">(SeriesAct): Element hl7:value[@codeSystem='1.2.840.10008.2.16.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.30031-2012-01-12T000000.html" test="count(hl7:value[@codeSystem='1.2.840.10008.2.16.4'])&lt;=1">(SeriesAct): Element hl7:value[@codeSystem='1.2.840.10008.2.16.4'] kommt zu häufig vor [max 1x].</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier/hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')]
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier/hl7:name[(@code='121139' and @codeSystem='1.2.840.10008.2.16.4')]">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SeriesAct): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="@nullFlavor or (@code='121139' and @codeSystem='1.2.840.10008.2.16.4' and @displayName='Modality' and @codeSystemName='DCM')">(SeriesAct): Der Elementinhalt MUSS einer von 'code '121139' codeSystem '1.2.840.10008.2.16.4' displayName='Modality' codeSystemName='DCM'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier/hl7:value[@codeSystem='1.2.840.10008.2.16.4']
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]/hl7:qualifier/hl7:value[@codeSystem='1.2.840.10008.2.16.4']">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SeriesAct): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="@nullFlavor or (@codeSystem='1.2.840.10008.2.16.4')">(SeriesAct): Der Elementinhalt MUSS einer von 'codeSystem '1.2.840.10008.2.16.4'' sein.</assert>
   </rule>

   <!--
Template derived rules for ID: 1.2.40.0.34.11.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:text
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:text">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.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)">(SeriesAct): 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.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:effectiveTime
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:effectiveTime">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.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)">(SeriesAct): 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.30031
Context: *[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]
Item: (SeriesAct)
-->
   <rule context="*[hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']]/hl7:act[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.6']/hl7:entryRelationship[hl7:act[hl7:code[@code='113015']]]/hl7:act[hl7:code[(@code='113015' and @codeSystem='1.2.840.10008.2.16.4')]]/hl7:entryRelationship[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-1.2.40.0.34.11.30031-2012-01-12T000000.html" test="string(@typeCode)=('COMP')">(SeriesAct): Der Wert von @typeCode MUSS 'COMP' sein.</assert>
   </rule>
</pattern><?DSDL_INCLUDE_END include/2.16.840.1.113883.10.20.6.2.6-2014-03-24T000000.sch?>
   <!-- SopInstance -->
   <?DSDL_INCLUDE_START include/2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.sch?><pattern id="template-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000">
   <title>SopInstance (DICOM Service Object Pair)</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]
Item: (SopInstance)
-->

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

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']" id="tmp-r-25d83c95-bc48-4f52-aaac-1cd9605ffc73">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="string(@classCode)=('DGIMG')">(SopInstance): Der Wert von @classCode MUSS 'DGIMG' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="string(@moodCode)=('EVN')">(SopInstance): Der Wert von @moodCode MUSS 'EVN' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8'])&gt;=1 ">(SopInstance): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8'] ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8'])&lt;=1">(SopInstance): Element hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:id)&gt;=1 ">(SopInstance): Element hl7:id ist required [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:id)&lt;=1">(SopInstance): Element hl7:id kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:code[@codeSystem='1.2.840.10008.2.6.1'])&gt;=1 and not(hl7:code[@codeSystem='1.2.840.10008.2.6.1']/@nullFlavor)">(SopInstance): Element hl7:code[@codeSystem='1.2.840.10008.2.6.1'] ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:code[@codeSystem='1.2.840.10008.2.6.1'])&lt;=1">(SopInstance): Element hl7:code[@codeSystem='1.2.840.10008.2.6.1'] kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:text)&lt;=1">(SopInstance): Element hl7:text kommt zu häufig vor [max 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:effectiveTime)&lt;=1">(SopInstance): Element hl7:effectiveTime kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8']
Item: (SopInstance)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:templateId[@root='2.16.840.1.113883.10.20.6.2.8']" id="tmp-r-ae45816e-ff21-4a14-855e-5ddf7e86a9d8">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.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)">(SopInstance): 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-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="string(@root)=('2.16.840.1.113883.10.20.6.2.8')">(SopInstance): Der Wert von @root MUSS '2.16.840.1.113883.10.20.6.2.8' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:id
Item: (SopInstance)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:id" id="tmp-r-c8e2b9ed-eb77-4104-9be1-49c976245ee8">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.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)">(SopInstance): 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-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="@root">(SopInstance): Attribut @root MUSS vorkommen.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="not(@extension)">(SopInstance): Attribut @extension DARF NICHT vorkommen.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:code[@codeSystem='1.2.840.10008.2.6.1']
Item: (SopInstance)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:code[@codeSystem='1.2.840.10008.2.6.1']" id="tmp-r-a790bf23-32bf-4bad-a7d2-a118fe90b6e2">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(SopInstance): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:CD" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="CD"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="@nullFlavor or (@codeSystem='1.2.840.10008.2.6.1' and @codeSystemName='DCMUID')">(SopInstance): Der Elementinhalt MUSS einer von 'codeSystem '1.2.840.10008.2.6.1' codeSystemName='DCMUID'' sein.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:text
Item: (SopInstance)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:text" id="tmp-r-9f97c355-75b2-40b1-8415-308261b9e0ec">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.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)">(SopInstance): 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"/>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="string(@mediaType)=('application/dicom')">(SopInstance): Der Wert von @mediaType MUSS 'application/dicom' sein.</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:reference)&gt;=1 and not(hl7:reference/@nullFlavor)">(SopInstance): Element hl7:reference ist mandatory [min 1x].</assert>
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.html" test="count(hl7:reference)&lt;=1">(SopInstance): Element hl7:reference kommt zu häufig vor [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:text/hl7:reference
Item: (SopInstance)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.10.20.6.2.8
Context: *[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:effectiveTime
Item: (SopInstance)
-->

   <rule context="*[hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']]/hl7:observation[hl7:templateId/@root='2.16.840.1.113883.10.20.6.2.8']/hl7:effectiveTime" id="tmp-r-5f43ec1b-20b6-4f2e-9f9c-c5784f57db1c">
      <assert role="error" see="http://elga.art-decor.org/elga-html-20150713T115013/tmp-2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.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)">(SopInstance): Wenn eine @xsi:type Instruktion anwesend ist MUSS diese den Wert "{urn:hl7-org:v3}:TS" haben, gefunden "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="TS"/>
   </rule>
</pattern><?DSDL_INCLUDE_END include/2.16.840.1.113883.10.20.6.2.8-2012-01-12T000000.sch?>

</schema>