<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:saxon="http://saxon.sf.net/"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:schold="http://www.ascc.net/xml/schematron"
                xmlns:iso="http://purl.oclc.org/dsdl/schematron"
                xmlns:xhtml="http://www.w3.org/1999/xhtml"
                xmlns:hl7="urn:hl7-org:v3"
                xmlns:cda="urn:hl7-org:v3"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:epsos="urn:epsos-org:ep:medication"
                xmlns:extPL="http://www.csioz.gov.pl/xsd/extPL/r3"
                xmlns:pharm="urn:ihe:pharm"
                version="2.0"><!--Implementers: please note that overriding process-prolog or process-root is 
    the preferred method for meta-stylesheets to use where possible. -->
   <xsl:param name="archiveDirParameter"/>
   <xsl:param name="archiveNameParameter"/>
   <xsl:param name="fileNameParameter"/>
   <xsl:param name="fileDirParameter"/>
   <xsl:variable name="document-uri">
      <xsl:value-of select="document-uri(/)"/>
   </xsl:variable>

   <!--PHASES-->


   <!--PROLOG-->
   <xsl:output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
               method="xml"
               omit-xml-declaration="no"
               standalone="yes"
               indent="yes"/>

   <!--XSD TYPES FOR XSLT2-->


   <!--KEYS AND FUNCTIONS-->


   <!--DEFAULT RULES-->


   <!--MODE: SCHEMATRON-SELECT-FULL-PATH-->
   <!--This mode can be used to generate an ugly though full XPath for locators-->
   <xsl:template match="*" mode="schematron-select-full-path">
      <xsl:apply-templates select="." mode="schematron-get-full-path"/>
   </xsl:template>

   <!--MODE: SCHEMATRON-FULL-PATH-->
   <!--This mode can be used to generate an ugly though full XPath for locators-->
   <xsl:template match="*" mode="schematron-get-full-path">
      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
      <xsl:text>/</xsl:text>
      <xsl:choose>
         <xsl:when test="namespace-uri()=''">
            <xsl:value-of select="name()"/>
         </xsl:when>
         <xsl:otherwise>
            <xsl:text>*:</xsl:text>
            <xsl:value-of select="local-name()"/>
            <xsl:text>[namespace-uri()='</xsl:text>
            <xsl:value-of select="namespace-uri()"/>
            <xsl:text>']</xsl:text>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="preceding"
                    select="count(preceding-sibling::*[local-name()=local-name(current())                                   and namespace-uri() = namespace-uri(current())])"/>
      <xsl:text>[</xsl:text>
      <xsl:value-of select="1+ $preceding"/>
      <xsl:text>]</xsl:text>
   </xsl:template>
   <xsl:template match="@*" mode="schematron-get-full-path">
      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
      <xsl:text>/</xsl:text>
      <xsl:choose>
         <xsl:when test="namespace-uri()=''">@<xsl:value-of select="name()"/>
         </xsl:when>
         <xsl:otherwise>
            <xsl:text>@*[local-name()='</xsl:text>
            <xsl:value-of select="local-name()"/>
            <xsl:text>' and namespace-uri()='</xsl:text>
            <xsl:value-of select="namespace-uri()"/>
            <xsl:text>']</xsl:text>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template>

   <!--MODE: SCHEMATRON-FULL-PATH-2-->
   <!--This mode can be used to generate prefixed XPath for humans-->
   <xsl:template match="node() | @*" mode="schematron-get-full-path-2">
      <xsl:for-each select="ancestor-or-self::*">
         <xsl:text>/</xsl:text>
         <xsl:value-of select="name(.)"/>
         <xsl:if test="preceding-sibling::*[name(.)=name(current())]">
            <xsl:text>[</xsl:text>
            <xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>
            <xsl:text>]</xsl:text>
         </xsl:if>
      </xsl:for-each>
      <xsl:if test="not(self::*)">
         <xsl:text/>/@<xsl:value-of select="name(.)"/>
      </xsl:if>
   </xsl:template>
   <!--MODE: SCHEMATRON-FULL-PATH-3-->
   <!--This mode can be used to generate prefixed XPath for humans 
	(Top-level element has index)-->
   <xsl:template match="node() | @*" mode="schematron-get-full-path-3">
      <xsl:for-each select="ancestor-or-self::*">
         <xsl:text>/</xsl:text>
         <xsl:value-of select="name(.)"/>
         <xsl:if test="parent::*">
            <xsl:text>[</xsl:text>
            <xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>
            <xsl:text>]</xsl:text>
         </xsl:if>
      </xsl:for-each>
      <xsl:if test="not(self::*)">
         <xsl:text/>/@<xsl:value-of select="name(.)"/>
      </xsl:if>
   </xsl:template>

   <!--MODE: GENERATE-ID-FROM-PATH -->
   <xsl:template match="/" mode="generate-id-from-path"/>
   <xsl:template match="text()" mode="generate-id-from-path">
      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
      <xsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/>
   </xsl:template>
   <xsl:template match="comment()" mode="generate-id-from-path">
      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
      <xsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/>
   </xsl:template>
   <xsl:template match="processing-instruction()" mode="generate-id-from-path">
      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
      <xsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/>
   </xsl:template>
   <xsl:template match="@*" mode="generate-id-from-path">
      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
      <xsl:value-of select="concat('.@', name())"/>
   </xsl:template>
   <xsl:template match="*" mode="generate-id-from-path" priority="-0.5">
      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
      <xsl:text>.</xsl:text>
      <xsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/>
   </xsl:template>

   <!--MODE: GENERATE-ID-2 -->
   <xsl:template match="/" mode="generate-id-2">U</xsl:template>
   <xsl:template match="*" mode="generate-id-2" priority="2">
      <xsl:text>U</xsl:text>
      <xsl:number level="multiple" count="*"/>
   </xsl:template>
   <xsl:template match="node()" mode="generate-id-2">
      <xsl:text>U.</xsl:text>
      <xsl:number level="multiple" count="*"/>
      <xsl:text>n</xsl:text>
      <xsl:number count="node()"/>
   </xsl:template>
   <xsl:template match="@*" mode="generate-id-2">
      <xsl:text>U.</xsl:text>
      <xsl:number level="multiple" count="*"/>
      <xsl:text>_</xsl:text>
      <xsl:value-of select="string-length(local-name(.))"/>
      <xsl:text>_</xsl:text>
      <xsl:value-of select="translate(name(),':','.')"/>
   </xsl:template>
   <!--Strip characters-->
   <xsl:template match="text()" priority="-1"/>

   <!--SCHEMA SETUP-->
   <xsl:template match="/">
      <svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                              title="Schematron file for transaction Karta medycznych czynności ratunkowych (2.16.840.1.113883.3.4424.13.4.56 2025-02-26T00:00:00)"
                              schemaVersion="">
         <xsl:comment>
            <xsl:value-of select="$archiveDirParameter"/>   
		 <xsl:value-of select="$archiveNameParameter"/>  
		 <xsl:value-of select="$fileNameParameter"/>  
		 <xsl:value-of select="$fileDirParameter"/>
         </xsl:comment>
         <svrl:ns-prefix-in-attribute-values uri="urn:hl7-org:v3" prefix="hl7"/>
         <svrl:ns-prefix-in-attribute-values uri="urn:hl7-org:v3" prefix="cda"/>
         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/>
         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2001/XMLSchema" prefix="xs"/>
         <svrl:ns-prefix-in-attribute-values uri="urn:epsos-org:ep:medication" prefix="epsos"/>
         <svrl:ns-prefix-in-attribute-values uri="http://www.csioz.gov.pl/xsd/extPL/r3" prefix="extPL"/>
         <svrl:ns-prefix-in-attribute-values uri="urn:ihe:pharm" prefix="pharm"/>
         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/XML/1998/namespace" prefix="xml"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M10"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="name">plCdaParamedicRescueSummaryNote</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M11"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.1.48-2025-02-26T000000</xsl:attribute>
            <xsl:attribute name="name">[1] Karta medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M12"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.1.48-2025-02-26T000000-closed</xsl:attribute>
            <xsl:attribute name="name">[1] Karta medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M13"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.1-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Osoba (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M14"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Autor karty medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M15"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.131-2025-02-26T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Treść karty medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M16"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.134-2025-02-26T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane wizyty na karcie medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M17"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.15-2019-05-31T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Praktyka medyczna (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M18"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.17-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Jednostka podmiotu wykonującego działalność leczniczą (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M19"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.18-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Komórka podmiotu wykonującego działalność leczniczą (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M20"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.19-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane ubezpieczyciela publicznego (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M21"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.19-2018-06-30T000000-closed</xsl:attribute>
            <xsl:attribute name="name">[2] Dane ubezpieczyciela publicznego (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M22"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.2-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Organizacja (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M23"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.3-2020-06-08T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane pacjenta (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M24"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.31-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Apteka (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M25"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.44-2020-06-08T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane umowy związanej z refundacją</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M26"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.49-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Osoba przypisana</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M27"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.5-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Organizacja odpowiedzialna za dokument (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M28"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.50-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Osoba powiązana</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M29"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.51-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane wykonanej usługi (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M30"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.53-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dane zlecenia (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M31"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.6-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Wystawca dokumentu (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M32"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.61-2018-09-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Odbiorca informacji (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M33"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.7-2020-06-08T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Dokument powiązany (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M34"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.75-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Miejsce</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M35"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.85-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Osoba autoryzująca dokument (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M36"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.2.89-2018-09-30T000000</xsl:attribute>
            <xsl:attribute name="name">[2] Organizacja do której kierowany jest dokument</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M37"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.3.222-2025-02-26T000000</xsl:attribute>
            <xsl:attribute name="name">[3] Sekcja postaci binarnej karty medycznych czynności ratunkowych</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M38"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.1-2018-09-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Rozpoznanie główne</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M39"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.1-2018-09-30T000000-closed</xsl:attribute>
            <xsl:attribute name="name">[4] Rozpoznanie główne</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M40"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.14-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Dane informatora dla fragmentu treści dokumentu</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M41"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.15-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Dane podmiotu związanego z fragmentem treści dokumentu</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M42"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.18-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Autor fragmentu treści dokumentu</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M43"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.2-2018-09-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Rozpoznania dodatkowe</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M44"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.2-2018-09-30T000000-closed</xsl:attribute>
            <xsl:attribute name="name">[4] Rozpoznania dodatkowe</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M45"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.25-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Urządzenie (bazowy)</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M46"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.49-2018-06-30T000000</xsl:attribute>
            <xsl:attribute name="name">[4] Dokument w postaci binarnej</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M47"/>
         <svrl:active-pattern>
            <xsl:attribute name="document">
               <xsl:value-of select="document-uri(/)"/>
            </xsl:attribute>
            <xsl:attribute name="id">template-2.16.840.1.113883.3.4424.13.10.4.49-2018-06-30T000000-closed</xsl:attribute>
            <xsl:attribute name="name">[4] Dokument w postaci binarnej</xsl:attribute>
            <xsl:apply-templates/>
         </svrl:active-pattern>
         <xsl:apply-templates select="/" mode="M48"/>
      </svrl:schematron-output>
   </xsl:template>

   <!--SCHEMATRON PATTERNS-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">Schematron file for transaction Karta medycznych czynności ratunkowych (2.16.840.1.113883.3.4424.13.4.56 2025-02-26T00:00:00)</svrl:text>
   <xsl:param name="scenariolabel" select="'plCdaParamedicRescueSummaryNote'"/>

   <!--PATTERN -->
   <xsl:template match="text()" priority="-1" mode="M10"/>
   <xsl:template match="@*|node()" priority="-2" mode="M10">
      <xsl:apply-templates select="*" mode="M10"/>
   </xsl:template>

   <!--PATTERN plCdaParamedicRescueSummaryNote-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">plCdaParamedicRescueSummaryNote</svrl:text>

	  <!--RULE -->
   <xsl:template match="/" priority="1000" mode="M11">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/"/>

		    <!--ASSERT warning-->
      <xsl:choose>
         <xsl:when test="descendant-or-self::hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="descendant-or-self::hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]">
               <xsl:attribute name="role">warning</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Instance is expected to have the following element: descendant-or-self::hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M11"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M11"/>
   <xsl:template match="@*|node()" priority="-2" mode="M11">
      <xsl:apply-templates select="*" mode="M11"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.1.48-2025-02-26T000000[1] Karta medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[1] Karta medycznych czynności ratunkowych</svrl:text>

	  <!--RULE d16e3-false-d125e0-->
   <xsl:template match="/" priority="1011" mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/"
                       id="d16e3-false-d125e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e418-false-d613e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]"
                 priority="1010"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]"
                       id="d16e418-false-d613e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('DOCCLIN') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('DOCCLIN') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The value for classCode SHALL be 'DOCCLIN'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN') or not(@moodCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN') or not(@moodCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="versionLabel" select="'1.3.2'"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root and @extension=$versionLabel])=1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root and @extension=$versionLabel])=1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Nie występuje prawidłowe oznaczenie zgodności dokumentu z daną wersją wydania Polskiej Implementacji Krajowej HL7 CDA.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="/processing-instruction('xml-stylesheet') = concat('href=&#34;CDA_PL_IG_',/hl7:ClinicalDocument/hl7:templateId[@extension]/@extension,'.xsl&#34; type=&#34;text/xsl&#34;')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="/processing-instruction('xml-stylesheet') = concat('href=&#34;CDA_PL_IG_',/hl7:ClinicalDocument/hl7:templateId[@extension]/@extension,'.xsl&#34; type=&#34;text/xsl&#34;')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Nieprawidłowe wskazanie transformaty generującej warstwę prezentacyjną dokumentu.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:id is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:id appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:title[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:title[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:title[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:title[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:title[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:title[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:effectiveTime[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:effectiveTime[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:languageCode[@code = 'pl-PL']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:languageCode[@code = 'pl-PL']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:languageCode[@code = 'pl-PL'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:languageCode[@code = 'pl-PL']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:languageCode[@code = 'pl-PL']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:languageCode[@code = 'pl-PL'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:setId[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:setId[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:setId[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:setId[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:setId[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:setId[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:versionNumber[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:versionNumber[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:versionNumber[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:versionNumber[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:versionNumber[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:versionNumber[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e424-false-d1125e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']"
                 priority="1009"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:typeId[@root = '2.16.840.1.113883.1.3'][@extension = 'POCD_HD000040']"
                       id="d16e424-false-d1125e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@extension) = ('POCD_HD000040')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@extension) = ('POCD_HD000040')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The value for extension SHALL be 'POCD_HD000040'. Found: "<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.1.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.1.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The value for root SHALL be '2.16.840.1.113883.1.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e429-false-d1142e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']"
                 priority="1008"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']"
                       id="d16e429-false-d1142e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.1.48')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.1.48')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.1.48'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e434-false-d1153e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:id"
                 priority="1007"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:id"
                       id="d16e434-false-d1153e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e442-false-d1172e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]"
                 priority="1006"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]"
                       id="d16e442-false-d1172e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='101135-2' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Ambulance Discharge summary' and @codeSystemName='LOINC')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='101135-2' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Ambulance Discharge summary' and @codeSystemName='LOINC')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The element value SHALL be one of 'code '101135-2' codeSystem '2.16.840.1.113883.6.1' displayName='Ambulance Discharge summary' codeSystemName='LOINC''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): element hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e450-false-d1205e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]/hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]"
                 priority="1005"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:code[(@code = '101135-2' and @codeSystem = '2.16.840.1.113883.6.1')]/hl7:translation[(@code = '00.50' and @codeSystem = '2.16.840.1.113883.3.4424.11.1.32')]"
                       id="d16e450-false-d1205e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='00.50' and @codeSystem='2.16.840.1.113883.3.4424.11.1.32' and @displayName='Karta medycznych czynności ratunkowych' and @codeSystemName='KLAS_DOK_P1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='00.50' and @codeSystem='2.16.840.1.113883.3.4424.11.1.32' and @displayName='Karta medycznych czynności ratunkowych' and @codeSystemName='KLAS_DOK_P1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The element value SHALL be one of 'code '00.50' codeSystem '2.16.840.1.113883.3.4424.11.1.32' displayName='Karta medycznych czynności ratunkowych' codeSystemName='KLAS_DOK_P1''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e460-false-d1228e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:title[not(@nullFlavor)]"
                 priority="1004"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:title[not(@nullFlavor)]"
                       id="d16e460-false-d1228e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="text()='Karta medycznych czynności ratunkowych'"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="text()='Karta medycznych czynności ratunkowych'">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): the element content of hl7:title[not(@nullFlavor)] SHALL be ''Karta medycznych czynności ratunkowych''. Found: "<xsl:text/>
                  <xsl:value-of select="."/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e466-false-d1239e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:effectiveTime[not(@nullFlavor)]"
                 priority="1003"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:effectiveTime[not(@nullFlavor)]"
                       id="d16e466-false-d1239e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Pierwsze 8 cyfr daty powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e472-false-d1250e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
                 priority="1002"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
                       id="d16e472-false-d1250e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The element value SHALL be one of '2.16.840.1.113883.1.11.16926 x_BasicConfidentialityKind (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e477-false-d1268e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:languageCode[@code = 'pl-PL']"
                 priority="1001"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:languageCode[@code = 'pl-PL']"
                       id="d16e477-false-d1268e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='pl-PL')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='pl-PL')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): The element value SHALL be one of 'code 'pl-PL''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

	  <!--RULE d16e482-false-d1281e0-->
   <xsl:template match="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:setId[not(@nullFlavor)]"
                 priority="1000"
                 mode="M12">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="/hl7:ClinicalDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.1.48']]/hl7:setId[not(@nullFlavor)]"
                       id="d16e482-false-d1281e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNote): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M12"/>
   <xsl:template match="@*|node()" priority="-2" mode="M12">
      <xsl:apply-templates select="*" mode="M12"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.1.48-2025-02-26T000000-closed[1] Karta medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[1] Karta medycznych czynności ratunkowych</svrl:text>
   <xsl:template match="text()" priority="-1" mode="M13"/>
   <xsl:template match="@*|node()" priority="-2" mode="M13">
      <xsl:apply-templates select="*" mode="M13"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.1-2018-06-30T000000[2] Osoba (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Osoba (bazowy)</svrl:text>

	  <!--RULE d16e554-false-d7108e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]"
                 priority="1001"
                 mode="M14">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]"
                       id="d16e554-false-d7108e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePerson): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePerson): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePerson): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePerson): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M14"/>
   </xsl:template>

	  <!--RULE d16e593-false-d7133e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']"
                 priority="1000"
                 mode="M14">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']"
                       id="d16e593-false-d7133e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePerson): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M14"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M14"/>
   <xsl:template match="@*|node()" priority="-2" mode="M14">
      <xsl:apply-templates select="*" mode="M14"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000[2] Autor karty medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Autor karty medycznych czynności ratunkowych</svrl:text>

	  <!--RULE d16e601-false-d7205e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]"
                 priority="1008"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]"
                       id="d16e601-false-d7205e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e703-false-d7306e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]"
                 priority="1007"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]"
                       id="d16e703-false-d7306e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('AUT') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('AUT') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The value for typeCode SHALL be 'AUT'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@contextControlCode) = ('OP') or not(@contextControlCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@contextControlCode) = ('OP') or not(@contextControlCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The value for contextControlCode SHALL be 'OP'. Found: "<xsl:text/>
                  <xsl:value-of select="@contextControlCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="(hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.2' and not(hl7:functionCode/@code=('LEK','LEKD','FEL'))) or (hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.3' and not(hl7:functionCode/@code=('PIEL','POL'))) or (hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.5' and not(hl7:functionCode/@code=('RATM')))">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="(hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.2' and not(hl7:functionCode/@code=('LEK','LEKD','FEL'))) or (hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.3' and not(hl7:functionCode/@code=('PIEL','POL'))) or (hl7:assignedAuthor/hl7:id/@root='2.16.840.1.113883.3.4424.1.6.5' and not(hl7:functionCode/@code=('RATM')))">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): Wskazana pula numerów Prawa Wykonywania Zawodu jest nieprawidłowa w stosunku do wskazanego zawodu autora dokumentu.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:time[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:time[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:time[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:time[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e709-false-d7412e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']"
                 priority="1006"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']"
                       id="d16e709-false-d7412e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.130')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.130')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.130'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e714-false-d7426e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1005"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e714-false-d7426e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.217-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.217 Zawód medyczny wystawiający kartę medycznych czynności ratunkowych (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e719-false-d7443e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:time[not(@nullFlavor)]"
                 priority="1004"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:time[not(@nullFlavor)]"
                       id="d16e719-false-d7443e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="(@value=/hl7:ClinicalDocument/hl7:legalAuthenticator/hl7:time/@value) or (@value=/hl7:ClinicalDocument/hl7:authenticator/hl7:time/@value)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="(@value=/hl7:ClinicalDocument/hl7:legalAuthenticator/hl7:time/@value) or (@value=/hl7:ClinicalDocument/hl7:authenticator/hl7:time/@value)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): Data utworzenia dokumentu powinna być taka sama jak data wystawienia lub autoryzacji dokumentu.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e726-false-d7493e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]"
                 priority="1003"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]"
                       id="d16e726-false-d7493e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ASSIGNED') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ASSIGNED') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The value for classCode SHALL be 'ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3'] | hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): choice (hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']  or  hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']] | hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']] | hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']] | hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): choice (hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]  or  hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]  or  hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]  or  hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e730-false-d7664e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:id[not(@nullFlavor)]"
                 priority="1002"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:id[not(@nullFlavor)]"
                       id="d16e730-false-d7664e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@nullFlavor) = ('NA') or not(@nullFlavor)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@nullFlavor) = ('NA') or not(@nullFlavor)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The value for nullFlavor SHALL be 'NA'. Found: "<xsl:text/>
                  <xsl:value-of select="@nullFlavor"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e737-false-d7673e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']"
                 priority="1001"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']"
                       id="d16e737-false-d7673e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.21-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.21-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.21 Specjalizacja lekarza (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

	  <!--RULE d16e742-false-d7688e0-->
   <xsl:template match="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']"
                 priority="1000"
                 mode="M15">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]/hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']"
                       id="d16e742-false-d7688e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.3.3.1''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteAuthor): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M15"/>
   <xsl:template match="@*|node()" priority="-2" mode="M15">
      <xsl:apply-templates select="*" mode="M15"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.131-2025-02-26T000000[2] Treść karty medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Treść karty medycznych czynności ratunkowych</svrl:text>

	  <!--RULE d16e778-false-d7905e0-->
   <xsl:template match="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]"
                 priority="1004"
                 mode="M16">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]"
                       id="d16e778-false-d7905e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>

	  <!--RULE d16e793-false-d8048e0-->
   <xsl:template match="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]"
                 priority="1003"
                 mode="M16">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]"
                       id="d16e793-false-d8048e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="count(//(hl7:observation|hl7:substanceAdministration|hl7:supply|hl7:procedure|hl7:encounter|hl7:act|hl7:externalDocument)[not(ancestor::hl7:section/hl7:templateId[@root='2.16.840.1.113883.3.4424.13.10.3.222']) and not(ancestor::hl7:entryRelationship) and not(hl7:text/hl7:reference)])&gt;0">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="count(//(hl7:observation|hl7:substanceAdministration|hl7:supply|hl7:procedure|hl7:encounter|hl7:act|hl7:externalDocument)[not(ancestor::hl7:section/hl7:templateId[@root='2.16.840.1.113883.3.4424.13.10.3.222']) and not(ancestor::hl7:entryRelationship) and not(hl7:text/hl7:reference)])&gt;0">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): Element text dla danego wyrażenia klinicznego jest wymagany, ze wskazaniem referencji do odpowiedniego elementu section.text.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:structuredBody[not(@nullFlavor)][hl7:component]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:structuredBody[not(@nullFlavor)][hl7:component]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:structuredBody[not(@nullFlavor)][hl7:component] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:structuredBody[not(@nullFlavor)][hl7:component]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:structuredBody[not(@nullFlavor)][hl7:component]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:structuredBody[not(@nullFlavor)][hl7:component] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>

	  <!--RULE d16e799-false-d8144e0-->
   <xsl:template match="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']"
                 priority="1002"
                 mode="M16">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']"
                       id="d16e799-false-d8144e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.130')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.130')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.130'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>

	  <!--RULE d16e804-false-d8218e0-->
   <xsl:template match="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:structuredBody[not(@nullFlavor)][hl7:component]"
                 priority="1001"
                 mode="M16">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:structuredBody[not(@nullFlavor)][hl7:component]"
                       id="d16e804-false-d8218e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(hl7:component[not(hl7:section/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.3.222')])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(hl7:component[not(hl7:section/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.3.222')])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): Jeżeli w dokumencie znajduje się sekcja postaci binarnej dokumentu, to nie może występować sekcja innego typu.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): element hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>

	  <!--RULE -->
   <xsl:template match="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:structuredBody[not(@nullFlavor)][hl7:component]/hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]"
                 priority="1000"
                 mode="M16">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]/hl7:component[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]/hl7:structuredBody[not(@nullFlavor)][hl7:component]/hl7:component[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteComponent): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M16"/>
   <xsl:template match="@*|node()" priority="-2" mode="M16">
      <xsl:apply-templates select="*" mode="M16"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.134-2025-02-26T000000[2] Dane wizyty na karcie medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane wizyty na karcie medycznych czynności ratunkowych</svrl:text>

	  <!--RULE d16e820-false-d8449e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]"
                 priority="1011"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]"
                       id="d16e820-false-d8449e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e895-false-d8580e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]"
                 priority="1010"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]"
                       id="d16e895-false-d8580e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e899-false-d8671e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']"
                 priority="1009"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']"
                       id="d16e899-false-d8671e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.134')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.134')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.134'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e904-false-d8743e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]"
                 priority="1008"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]"
                       id="d16e904-false-d8743e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ENC') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ENC') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for classCode SHALL be 'ENC'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN') or not(@moodCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN') or not(@moodCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:code[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:code[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:effectiveTime[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:effectiveTime[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:responsibleParty[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:responsibleParty[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:responsibleParty[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:location[hl7:healthCareFacility]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:location[hl7:healthCareFacility]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:location[hl7:healthCareFacility] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e919-false-d8882e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]"
                 priority="1007"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]"
                       id="d16e919-false-d8882e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@value) or matches(string(@value), '^[0-9]{4,14}')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@value) or matches(string(@value), '^[0-9]{4,14}')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Attribute @value SHALL be of data type 'ts'  - '<xsl:text/>
                  <xsl:value-of select="@value"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="not(@nullFlavor) and not(hl7:low) and not(hl7:high) and not(concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date)">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="not(@nullFlavor) and not(hl7:low) and not(hl7:high) and not(concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date)">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Pierwsze 8 cyfr daty powinno być w formacie YYYYMMDD.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:low) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:low) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:low appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:high) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:high) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:high appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e923-false-d8905e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]/hl7:low"
                 priority="1006"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]/hl7:low"
                       id="d16e923-false-d8905e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@value"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@value">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): attribute @value SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@value) or matches(string(@value), '^[0-9]{4,14}')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@value) or matches(string(@value), '^[0-9]{4,14}')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Attribute @value SHALL be of data type 'ts'  - '<xsl:text/>
                  <xsl:value-of select="@value"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Pierwsze 8 cyfr daty powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e931-false-d8918e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]/hl7:high"
                 priority="1005"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:effectiveTime[not(@nullFlavor)]/hl7:high"
                       id="d16e931-false-d8918e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@value"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@value">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): attribute @value SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@value) or matches(string(@value), '^[0-9]{4,14}')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@value) or matches(string(@value), '^[0-9]{4,14}')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Attribute @value SHALL be of data type 'ts'  - '<xsl:text/>
                  <xsl:value-of select="@value"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): Pierwsze 8 cyfr daty powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE -->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:responsibleParty[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]"
                 priority="1004"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:responsibleParty[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('RESP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('RESP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for typeCode SHALL be 'RESP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e949-false-d8992e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:encounterParticipant[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]"
                 priority="1003"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:encounterParticipant[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]"
                       id="d16e949-false-d8992e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@typeCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@typeCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): attribute @typeCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@typeCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19600-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19600-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for typeCode SHALL be selected from value set '2.16.840.1.113883.1.11.19600' x_EncounterParticipant (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:time appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e961-false-d9109e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]"
                 priority="1002"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]"
                       id="d16e961-false-d9109e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('LOC') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('LOC') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for typeCode SHALL be 'LOC'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e965-false-d9159e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]/hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]"
                 priority="1001"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]/hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]"
                       id="d16e965-false-d9159e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('SDLOC') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('SDLOC') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The value for classCode SHALL be 'SDLOC'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:serviceProviderOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:serviceProviderOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): element hl7:serviceProviderOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

	  <!--RULE d16e971-false-d9225e0-->
   <xsl:template match="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]/hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M17">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]]/hl7:componentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.134']]/hl7:encompassingEncounter[hl7:code[not(@nullFlavor)]]/hl7:location[hl7:healthCareFacility]/hl7:healthCareFacility[hl7:location[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e971-false-d9225e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.17660-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescureSummaryNoteComponentOf): The element value SHALL be one of '2.16.840.1.113883.1.11.17660 ServiceDeliveryLocationRoleType (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M17"/>
   <xsl:template match="@*|node()" priority="-2" mode="M17">
      <xsl:apply-templates select="*" mode="M17"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.15-2019-05-31T000000[2] Praktyka medyczna (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Praktyka medyczna (bazowy)</svrl:text>

	  <!--RULE d16e985-false-d9431e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]"
                 priority="1148"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]"
                       id="d16e985-false-d9431e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:telecom is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:telecom appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1047-false-d10136e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']"
                 priority="1147"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']"
                       id="d16e1047-false-d10136e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1054-false-d10148e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']"
                 priority="1146"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50.1']"
                       id="d16e1054-false-d10148e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.50.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1061-false-d10166e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']"
                 priority="1145"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51.1']"
                       id="d16e1061-false-d10166e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.51.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1068-false-d10184e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']"
                 priority="1144"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52.1']"
                       id="d16e1068-false-d10184e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.52.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1075-false-d10202e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']"
                 priority="1143"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53.1']"
                       id="d16e1075-false-d10202e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.53.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1082-false-d10220e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']"
                 priority="1142"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54.1']"
                       id="d16e1082-false-d10220e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.54.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1090-false-d10238e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']"
                 priority="1141"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55.1']"
                       id="d16e1090-false-d10238e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.55.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1097-false-d10256e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']"
                 priority="1140"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56.1']"
                       id="d16e1097-false-d10256e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.56.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1104-false-d10274e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']"
                 priority="1139"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57.1']"
                       id="d16e1104-false-d10274e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.57.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1111-false-d10292e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']"
                 priority="1138"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58.1']"
                       id="d16e1111-false-d10292e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.58.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1118-false-d10310e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']"
                 priority="1137"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59.1']"
                       id="d16e1118-false-d10310e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.59.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1125-false-d10328e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']"
                 priority="1136"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60.1']"
                       id="d16e1125-false-d10328e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.60.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1133-false-d10346e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']"
                 priority="1135"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61.1']"
                       id="d16e1133-false-d10346e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.61.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1140-false-d10364e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']"
                 priority="1134"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62.1']"
                       id="d16e1140-false-d10364e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.62.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1147-false-d10382e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']"
                 priority="1133"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63.1']"
                       id="d16e1147-false-d10382e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.63.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1154-false-d10400e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']"
                 priority="1132"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64.1']"
                       id="d16e1154-false-d10400e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.64.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1161-false-d10418e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']"
                 priority="1131"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65.1']"
                       id="d16e1161-false-d10418e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.65.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1168-false-d10436e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']"
                 priority="1130"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66.1']"
                       id="d16e1168-false-d10436e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.66.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1176-false-d10454e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']"
                 priority="1129"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67.1']"
                       id="d16e1176-false-d10454e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.67.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1183-false-d10472e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']"
                 priority="1128"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68.1']"
                       id="d16e1183-false-d10472e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.68.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1190-false-d10490e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']"
                 priority="1127"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69.1']"
                       id="d16e1190-false-d10490e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.69.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1197-false-d10508e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']"
                 priority="1126"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70.1']"
                       id="d16e1197-false-d10508e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.70.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1204-false-d10526e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']"
                 priority="1125"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71.1']"
                       id="d16e1204-false-d10526e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.71.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1211-false-d10544e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']"
                 priority="1124"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72.1']"
                       id="d16e1211-false-d10544e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.72.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1219-false-d10562e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']"
                 priority="1123"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73.1']"
                       id="d16e1219-false-d10562e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.73.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1226-false-d10580e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']"
                 priority="1122"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74.1']"
                       id="d16e1226-false-d10580e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.74.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1233-false-d10598e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']"
                 priority="1121"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75.1']"
                       id="d16e1233-false-d10598e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.75.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1240-false-d10616e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']"
                 priority="1120"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1.1']"
                       id="d16e1240-false-d10616e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.1.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1247-false-d10634e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']"
                 priority="1119"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2.1']"
                       id="d16e1247-false-d10634e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.2.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1254-false-d10652e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']"
                 priority="1118"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3.1']"
                       id="d16e1254-false-d10652e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.3.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1262-false-d10670e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']"
                 priority="1117"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4.1']"
                       id="d16e1262-false-d10670e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.4.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1269-false-d10688e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']"
                 priority="1116"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5.1']"
                       id="d16e1269-false-d10688e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.5.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1276-false-d10706e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']"
                 priority="1115"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6.1']"
                       id="d16e1276-false-d10706e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.6.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1283-false-d10724e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']"
                 priority="1114"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7.1']"
                       id="d16e1283-false-d10724e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.7.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1290-false-d10742e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']"
                 priority="1113"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8.1']"
                       id="d16e1290-false-d10742e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.8.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1297-false-d10760e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']"
                 priority="1112"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9.1']"
                       id="d16e1297-false-d10760e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.9.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1305-false-d10778e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']"
                 priority="1111"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10.1']"
                       id="d16e1305-false-d10778e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.10.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1312-false-d10796e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']"
                 priority="1110"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11.1']"
                       id="d16e1312-false-d10796e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.11.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1319-false-d10814e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']"
                 priority="1109"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12.1']"
                       id="d16e1319-false-d10814e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.12.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1326-false-d10832e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']"
                 priority="1108"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13.1']"
                       id="d16e1326-false-d10832e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.13.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1333-false-d10850e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']"
                 priority="1107"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14.1']"
                       id="d16e1333-false-d10850e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.14.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1340-false-d10868e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']"
                 priority="1106"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15.1']"
                       id="d16e1340-false-d10868e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.15.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1348-false-d10886e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']"
                 priority="1105"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16.1']"
                       id="d16e1348-false-d10886e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.16.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1355-false-d10904e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']"
                 priority="1104"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17.1']"
                       id="d16e1355-false-d10904e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.17.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1362-false-d10922e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']"
                 priority="1103"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18.1']"
                       id="d16e1362-false-d10922e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.18.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1369-false-d10940e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']"
                 priority="1102"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19.1']"
                       id="d16e1369-false-d10940e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.19.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1376-false-d10958e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']"
                 priority="1101"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20.1']"
                       id="d16e1376-false-d10958e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.20.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1383-false-d10976e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']"
                 priority="1100"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21.1']"
                       id="d16e1383-false-d10976e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.21.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1391-false-d10994e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']"
                 priority="1099"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22.1']"
                       id="d16e1391-false-d10994e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.22.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1398-false-d11012e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']"
                 priority="1098"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23.1']"
                       id="d16e1398-false-d11012e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.23.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1405-false-d11030e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']"
                 priority="1097"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24.1']"
                       id="d16e1405-false-d11030e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.24.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1412-false-d11048e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']"
                 priority="1096"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25.1']"
                       id="d16e1412-false-d11048e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.25.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1419-false-d11066e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']"
                 priority="1095"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26.1']"
                       id="d16e1419-false-d11066e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.26.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1426-false-d11084e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']"
                 priority="1094"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27.1']"
                       id="d16e1426-false-d11084e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.27.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1434-false-d11102e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']"
                 priority="1093"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28.1']"
                       id="d16e1434-false-d11102e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.28.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1441-false-d11120e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']"
                 priority="1092"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29.1']"
                       id="d16e1441-false-d11120e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.29.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1448-false-d11138e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']"
                 priority="1091"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30.1']"
                       id="d16e1448-false-d11138e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.30.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1455-false-d11156e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']"
                 priority="1090"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31.1']"
                       id="d16e1455-false-d11156e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.31.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1462-false-d11174e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']"
                 priority="1089"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32.1']"
                       id="d16e1462-false-d11174e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.32.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1469-false-d11192e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']"
                 priority="1088"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33.1']"
                       id="d16e1469-false-d11192e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.33.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1477-false-d11210e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']"
                 priority="1087"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34.1']"
                       id="d16e1477-false-d11210e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.34.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1484-false-d11228e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']"
                 priority="1086"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35.1']"
                       id="d16e1484-false-d11228e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.35.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1491-false-d11246e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']"
                 priority="1085"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36.1']"
                       id="d16e1491-false-d11246e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.36.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1498-false-d11264e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']"
                 priority="1084"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37.1']"
                       id="d16e1498-false-d11264e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.37.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1505-false-d11282e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']"
                 priority="1083"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38.1']"
                       id="d16e1505-false-d11282e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.38.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1512-false-d11300e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']"
                 priority="1082"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39.1']"
                       id="d16e1512-false-d11300e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.39.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1520-false-d11318e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']"
                 priority="1081"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40.1']"
                       id="d16e1520-false-d11318e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.40.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1527-false-d11336e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']"
                 priority="1080"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41.1']"
                       id="d16e1527-false-d11336e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.41.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1534-false-d11354e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']"
                 priority="1079"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42.1']"
                       id="d16e1534-false-d11354e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.42.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1541-false-d11372e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']"
                 priority="1078"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43.1']"
                       id="d16e1541-false-d11372e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.43.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1548-false-d11390e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']"
                 priority="1077"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44.1']"
                       id="d16e1548-false-d11390e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.44.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1555-false-d11408e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']"
                 priority="1076"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45.1']"
                       id="d16e1555-false-d11408e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.45.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1566-false-d11433e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:telecom"
                 priority="1075"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:telecom"
                       id="d16e1566-false-d11433e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string-length(@value)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="string-length(@value)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Wartość dla telefonu, adresu email lub lokalizacji zasobu nie może by pusta.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1574-false-d11442e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                 priority="1074"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                       id="d16e1574-false-d11442e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.2.4''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1583-false-d11468e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]"
                 priority="1073"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]"
                       id="d16e1583-false-d11468e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:wholeOrganization[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:wholeOrganization[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1585-false-d11498e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
                 priority="1072"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
                       id="d16e1585-false-d11498e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.34 Rodzaj praktyki zawodowej (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1590-false-d11515e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]"
                 priority="1071"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]"
                       id="d16e1590-false-d11515e0"/>
      <xsl:variable name="elmcount"
                    select="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44'] | hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1594-false-d12173e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']"
                 priority="1070"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.50']"
                       id="d16e1594-false-d12173e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.50'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1601-false-d12191e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']"
                 priority="1069"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.51']"
                       id="d16e1601-false-d12191e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.51'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1608-false-d12209e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']"
                 priority="1068"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.52']"
                       id="d16e1608-false-d12209e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.52'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1615-false-d12227e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']"
                 priority="1067"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.53']"
                       id="d16e1615-false-d12227e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.53'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1622-false-d12245e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']"
                 priority="1066"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.54']"
                       id="d16e1622-false-d12245e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.54'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1630-false-d12263e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']"
                 priority="1065"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.55']"
                       id="d16e1630-false-d12263e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.55'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1637-false-d12281e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']"
                 priority="1064"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.56']"
                       id="d16e1637-false-d12281e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.56'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1644-false-d12299e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']"
                 priority="1063"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.57']"
                       id="d16e1644-false-d12299e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.57'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1651-false-d12317e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']"
                 priority="1062"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.58']"
                       id="d16e1651-false-d12317e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.58'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1658-false-d12335e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']"
                 priority="1061"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.59']"
                       id="d16e1658-false-d12335e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.59'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1665-false-d12353e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']"
                 priority="1060"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.60']"
                       id="d16e1665-false-d12353e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.60'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1673-false-d12371e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']"
                 priority="1059"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.61']"
                       id="d16e1673-false-d12371e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.61'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1680-false-d12389e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']"
                 priority="1058"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.62']"
                       id="d16e1680-false-d12389e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.62'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1687-false-d12407e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']"
                 priority="1057"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.63']"
                       id="d16e1687-false-d12407e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.63'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1694-false-d12425e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']"
                 priority="1056"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.64']"
                       id="d16e1694-false-d12425e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.64'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1701-false-d12443e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']"
                 priority="1055"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.65']"
                       id="d16e1701-false-d12443e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.65'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1708-false-d12461e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']"
                 priority="1054"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.66']"
                       id="d16e1708-false-d12461e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.66'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1716-false-d12479e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']"
                 priority="1053"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.67']"
                       id="d16e1716-false-d12479e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.67'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1723-false-d12497e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']"
                 priority="1052"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.68']"
                       id="d16e1723-false-d12497e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.68'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1730-false-d12515e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']"
                 priority="1051"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.69']"
                       id="d16e1730-false-d12515e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.69'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1737-false-d12533e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']"
                 priority="1050"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.70']"
                       id="d16e1737-false-d12533e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.70'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1744-false-d12551e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']"
                 priority="1049"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.71']"
                       id="d16e1744-false-d12551e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.71'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1751-false-d12569e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']"
                 priority="1048"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.72']"
                       id="d16e1751-false-d12569e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.72'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1759-false-d12587e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']"
                 priority="1047"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.73']"
                       id="d16e1759-false-d12587e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.73'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1766-false-d12605e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']"
                 priority="1046"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.74']"
                       id="d16e1766-false-d12605e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.74'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1773-false-d12623e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']"
                 priority="1045"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.4.75']"
                       id="d16e1773-false-d12623e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.75'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1780-false-d12641e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']"
                 priority="1044"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.1']"
                       id="d16e1780-false-d12641e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1787-false-d12659e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']"
                 priority="1043"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.2']"
                       id="d16e1787-false-d12659e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1794-false-d12677e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']"
                 priority="1042"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.3']"
                       id="d16e1794-false-d12677e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1802-false-d12695e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']"
                 priority="1041"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.4']"
                       id="d16e1802-false-d12695e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.4'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1809-false-d12713e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']"
                 priority="1040"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.5']"
                       id="d16e1809-false-d12713e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1816-false-d12731e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']"
                 priority="1039"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.6']"
                       id="d16e1816-false-d12731e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1823-false-d12749e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']"
                 priority="1038"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.7']"
                       id="d16e1823-false-d12749e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1830-false-d12767e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']"
                 priority="1037"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.8']"
                       id="d16e1830-false-d12767e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.8'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1837-false-d12785e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']"
                 priority="1036"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.9']"
                       id="d16e1837-false-d12785e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.9'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1845-false-d12803e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']"
                 priority="1035"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.10']"
                       id="d16e1845-false-d12803e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.10'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1852-false-d12821e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']"
                 priority="1034"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.11']"
                       id="d16e1852-false-d12821e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.11'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1859-false-d12839e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']"
                 priority="1033"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.12']"
                       id="d16e1859-false-d12839e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.12'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1866-false-d12857e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']"
                 priority="1032"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.13']"
                       id="d16e1866-false-d12857e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.13'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1873-false-d12875e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']"
                 priority="1031"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.14']"
                       id="d16e1873-false-d12875e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1880-false-d12893e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']"
                 priority="1030"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.15']"
                       id="d16e1880-false-d12893e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1888-false-d12911e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']"
                 priority="1029"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.16']"
                       id="d16e1888-false-d12911e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.16'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1895-false-d12929e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']"
                 priority="1028"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.17']"
                       id="d16e1895-false-d12929e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.17'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1902-false-d12947e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']"
                 priority="1027"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.18']"
                       id="d16e1902-false-d12947e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.18'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1909-false-d12965e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']"
                 priority="1026"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.19']"
                       id="d16e1909-false-d12965e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.19'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1916-false-d12983e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']"
                 priority="1025"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.20']"
                       id="d16e1916-false-d12983e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.20'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1923-false-d13001e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']"
                 priority="1024"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.21']"
                       id="d16e1923-false-d13001e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.21'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1931-false-d13019e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']"
                 priority="1023"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.22']"
                       id="d16e1931-false-d13019e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.22'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1938-false-d13037e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']"
                 priority="1022"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.23']"
                       id="d16e1938-false-d13037e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.23'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1945-false-d13055e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']"
                 priority="1021"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.24']"
                       id="d16e1945-false-d13055e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.24'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1952-false-d13073e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']"
                 priority="1020"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.25']"
                       id="d16e1952-false-d13073e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.25'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1959-false-d13091e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']"
                 priority="1019"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.26']"
                       id="d16e1959-false-d13091e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.26'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1966-false-d13109e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']"
                 priority="1018"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.27']"
                       id="d16e1966-false-d13109e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.27'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1974-false-d13127e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']"
                 priority="1017"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.28']"
                       id="d16e1974-false-d13127e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.28'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1981-false-d13145e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']"
                 priority="1016"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.29']"
                       id="d16e1981-false-d13145e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.29'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1988-false-d13163e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']"
                 priority="1015"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.30']"
                       id="d16e1988-false-d13163e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.30'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e1995-false-d13181e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']"
                 priority="1014"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.31']"
                       id="d16e1995-false-d13181e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.31'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2002-false-d13199e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']"
                 priority="1013"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.32']"
                       id="d16e2002-false-d13199e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.32'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2009-false-d13217e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']"
                 priority="1012"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.33']"
                       id="d16e2009-false-d13217e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.33'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2017-false-d13235e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']"
                 priority="1011"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.34']"
                       id="d16e2017-false-d13235e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.34'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2024-false-d13253e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']"
                 priority="1010"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.35']"
                       id="d16e2024-false-d13253e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.35'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2031-false-d13271e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']"
                 priority="1009"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.36']"
                       id="d16e2031-false-d13271e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.36'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2038-false-d13289e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']"
                 priority="1008"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.37']"
                       id="d16e2038-false-d13289e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.37'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2045-false-d13307e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']"
                 priority="1007"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.38']"
                       id="d16e2045-false-d13307e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.38'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2052-false-d13325e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']"
                 priority="1006"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.39']"
                       id="d16e2052-false-d13325e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.39'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2060-false-d13343e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']"
                 priority="1005"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.40']"
                       id="d16e2060-false-d13343e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.40'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2067-false-d13361e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']"
                 priority="1004"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.41']"
                       id="d16e2067-false-d13361e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.41'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2074-false-d13379e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']"
                 priority="1003"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.42']"
                       id="d16e2074-false-d13379e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.42'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2081-false-d13397e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']"
                 priority="1002"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.43']"
                       id="d16e2081-false-d13397e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.43'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2088-false-d13415e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']"
                 priority="1001"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.44']"
                       id="d16e2088-false-d13415e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.44'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

	  <!--RULE d16e2095-false-d13433e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']"
                 priority="1000"
                 mode="M18">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]/hl7:asOrganizationPartOf[hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.34-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]]/hl7:wholeOrganization[not(@nullFlavor)]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.5.45']"
                       id="d16e2095-false-d13433e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.45'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseMedicalPractice): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M18"/>
   <xsl:template match="@*|node()" priority="-2" mode="M18">
      <xsl:apply-templates select="*" mode="M18"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.17-2018-06-30T000000[2] Jednostka podmiotu wykonującego działalność leczniczą (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Jednostka podmiotu wykonującego działalność leczniczą (bazowy)</svrl:text>

	  <!--RULE d16e2106-false-d13460e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]"
                 priority="1007"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]"
                       id="d16e2106-false-d13460e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:telecom is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:telecom appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2180-false-d13522e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']"
                 priority="1006"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']"
                       id="d16e2180-false-d13522e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.17')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.17')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.17'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2185-false-d13534e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']"
                 priority="1005"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']"
                       id="d16e2185-false-d13534e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): The value for root SHALL be '2.16.840.1.113883.3.4424.2.3.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2195-false-d13559e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:telecom"
                 priority="1004"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:telecom"
                       id="d16e2195-false-d13559e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string-length(@value)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="string-length(@value)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): Wartość dla telefonu, adresu email lub lokalizacji zasobu nie może by pusta.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2203-false-d13568e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                 priority="1003"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                       id="d16e2203-false-d13568e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.2.4''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2212-false-d13591e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]"
                 priority="1002"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]"
                       id="d16e2212-false-d13591e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:id MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:code MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:statusCode MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:effectiveTime MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2225-false-d13669e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]"
                 priority="1001"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]"
                       id="d16e2225-false-d13669e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

	  <!--RULE d16e2227-false-d13687e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                 priority="1000"
                 mode="M19">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                       id="d16e2227-false-d13687e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): The value for root SHALL be '2.16.840.1.113883.3.4424.2.2.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalUnit): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M19"/>
   <xsl:template match="@*|node()" priority="-2" mode="M19">
      <xsl:apply-templates select="*" mode="M19"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.18-2018-06-30T000000[2] Komórka podmiotu wykonującego działalność leczniczą (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Komórka podmiotu wykonującego działalność leczniczą (bazowy)</svrl:text>

	  <!--RULE d16e2237-false-d13717e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]"
                 priority="1012"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]"
                       id="d16e2237-false-d13717e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:telecom is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:telecom) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:telecom) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:telecom appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:asOrganizationPartOf[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:asOrganizationPartOf[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2313-false-d13779e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']"
                 priority="1011"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']"
                       id="d16e2313-false-d13779e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.18')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.18')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.18'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2318-false-d13791e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']"
                 priority="1010"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.3']"
                       id="d16e2318-false-d13791e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for root SHALL be '2.16.840.1.113883.3.4424.2.3.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2328-false-d13816e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:telecom"
                 priority="1009"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:telecom"
                       id="d16e2328-false-d13816e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string-length(@value)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="string-length(@value)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Wartość dla telefonu, adresu email lub lokalizacji zasobu nie może by pusta.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2336-false-d13825e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                 priority="1008"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:standardIndustryClassCode[@codeSystem = '2.16.840.1.113883.3.4424.11.2.4']"
                       id="d16e2336-false-d13825e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.2.4''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @code SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2345-false-d13848e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]"
                 priority="1007"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]"
                       id="d16e2345-false-d13848e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:code MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:statusCode MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:effectiveTime MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2'] | hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): choice (hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']  or  hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): choice (hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']  or  hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2360-false-d13930e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']"
                 priority="1006"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']"
                       id="d16e2360-false-d13930e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2362-false-d13956e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']"
                 priority="1005"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:id[@root = '2.16.840.1.113883.3.4424.2.3.2']"
                       id="d16e2362-false-d13956e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for root SHALL be '2.16.840.1.113883.3.4424.2.3.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2369-false-d13973e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]"
                 priority="1004"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]"
                       id="d16e2369-false-d13973e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:code MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:statusCode MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:effectiveTime MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2382-false-d14051e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]"
                 priority="1003"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]"
                       id="d16e2382-false-d14051e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2384-false-d14069e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                 priority="1002"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.3.2']/hl7:asOrganizationPartOf[not(@nullFlavor)][hl7:wholeOrganization]/hl7:wholeOrganization[hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']]/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                       id="d16e2384-false-d14069e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for root SHALL be '2.16.840.1.113883.3.4424.2.2.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2394-false-d14084e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']"
                 priority="1001"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']"
                       id="d16e2394-false-d14084e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): element hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

	  <!--RULE d16e2396-false-d14102e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                 priority="1000"
                 mode="M20">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]/hl7:asOrganizationPartOf[not(@nullFlavor)]/hl7:wholeOrganization[hl7:id/@root='2.16.840.1.113883.3.4424.2.2.2']/hl7:id[@root = '2.16.840.1.113883.3.4424.2.2.2']"
                       id="d16e2396-false-d14102e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): The value for root SHALL be '2.16.840.1.113883.3.4424.2.2.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganizationalCell): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M20"/>
   <xsl:template match="@*|node()" priority="-2" mode="M20">
      <xsl:apply-templates select="*" mode="M20"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.19-2018-06-30T000000[2] Dane ubezpieczyciela publicznego (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane ubezpieczyciela publicznego (bazowy)</svrl:text>

	  <!--RULE d16e2435-false-d14140e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]"
                 priority="1004"
                 mode="M21">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]"
                       id="d16e2435-false-d14140e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('IND')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('IND')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for typeCode SHALL be 'IND'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@contextControlCode) = ('OP') or not(@contextControlCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@contextControlCode) = ('OP') or not(@contextControlCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for contextControlCode SHALL be 'OP'. Found: "<xsl:text/>
                  <xsl:value-of select="@contextControlCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:associatedEntity[@classCode = 'UNDWRT']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:associatedEntity[@classCode = 'UNDWRT']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:associatedEntity[@classCode = 'UNDWRT'] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:associatedEntity[@classCode = 'UNDWRT']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:associatedEntity[@classCode = 'UNDWRT']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:associatedEntity[@classCode = 'UNDWRT'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>

	  <!--RULE d16e2441-false-d14174e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']"
                 priority="1003"
                 mode="M21">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']"
                       id="d16e2441-false-d14174e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.19')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.19')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.19'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>

	  <!--RULE d16e2446-false-d14185e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']"
                 priority="1002"
                 mode="M21">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']"
                       id="d16e2446-false-d14185e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('UNDWRT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('UNDWRT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for classCode SHALL be 'UNDWRT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:id[@root = '2.16.840.1.113883.3.4424.3.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): choice (hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']  or  hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:id[@root = '2.16.840.1.113883.3.4424.3.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): element hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>

	  <!--RULE d16e2452-false-d14226e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']"
                 priority="1001"
                 mode="M21">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/hl7:id[@root = '2.16.840.1.113883.3.4424.3.1']"
                       id="d16e2452-false-d14226e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for root SHALL be '2.16.840.1.113883.3.4424.3.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>

	  <!--RULE d16e2459-false-d14244e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']"
                 priority="1000"
                 mode="M21">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49']"
                       id="d16e2459-false-d14244e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.11.1.49')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.11.1.49')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): The value for root SHALL be '2.16.840.1.113883.3.4424.11.1.49'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M21"/>
   <xsl:template match="@*|node()" priority="-2" mode="M21">
      <xsl:apply-templates select="*" mode="M21"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.19-2018-06-30T000000-closed[2] Dane ubezpieczyciela publicznego (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane ubezpieczyciela publicznego (bazowy)</svrl:text>

	  <!--RULE d16e2407-true-d14274e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/*[not(@xsi:nil = 'true')][not(self::hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']])]"
                 priority="1002"
                 mode="M22">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/*[not(@xsi:nil = 'true')][not(self::hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']])]"
                       id="d16e2407-true-d14274e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant)/d16e2407-true-d14274e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']] (rule-reference: d16e2407-true-d14274e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M22"/>
   </xsl:template>

	  <!--RULE d16e2435-true-d14296e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19'] | self::hl7:associatedEntity[@classCode = 'UNDWRT'])]"
                 priority="1001"
                 mode="M22">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19'] | self::hl7:associatedEntity[@classCode = 'UNDWRT'])]"
                       id="d16e2435-true-d14296e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant)/d16e2435-true-d14296e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19'] | hl7:associatedEntity[@classCode = 'UNDWRT'] (rule-reference: d16e2435-true-d14296e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M22"/>
   </xsl:template>

	  <!--RULE d16e2446-true-d14317e0-->
   <xsl:template match="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/*[not(@xsi:nil = 'true')][not(self::hl7:id[@root = '2.16.840.1.113883.3.4424.3.1'] | self::hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49'])]"
                 priority="1000"
                 mode="M22">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]]/hl7:participant[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.19']]/hl7:associatedEntity[@classCode = 'UNDWRT']/*[not(@xsi:nil = 'true')][not(self::hl7:id[@root = '2.16.840.1.113883.3.4424.3.1'] | self::hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49'])]"
                       id="d16e2446-true-d14317e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePublicUnderwriterParticipant)/d16e2446-true-d14317e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:id[@root = '2.16.840.1.113883.3.4424.3.1'] | hl7:id[@root = '2.16.840.1.113883.3.4424.11.1.49'] (rule-reference: d16e2446-true-d14317e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M22"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M22"/>
   <xsl:template match="@*|node()" priority="-2" mode="M22">
      <xsl:apply-templates select="*" mode="M22"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.2-2018-06-30T000000[2] Organizacja (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Organizacja (bazowy)</svrl:text>

	  <!--RULE d16e2470-false-d14345e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]"
                 priority="1004"
                 mode="M23">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]"
                       id="d16e2470-false-d14345e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:id is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:addr) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:addr) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:addr appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:standardIndustryClassCode appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:asOrganizationPartOf appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>

	  <!--RULE d16e2499-false-d14394e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']"
                 priority="1003"
                 mode="M23">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']"
                       id="d16e2499-false-d14394e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>

	  <!--RULE d16e2515-false-d14445e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf"
                 priority="1002"
                 mode="M23">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf"
                       id="d16e2515-false-d14445e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:effectiveTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): element hl7:wholeOrganization appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>

	  <!--RULE d16e2521-false-d14498e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                 priority="1001"
                 mode="M23">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                       id="d16e2521-false-d14498e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.111''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>

	  <!--RULE d16e2526-false-d14514e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1000"
                 mode="M23">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e2526-false-d14514e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseOrganization): The element value SHALL be one of '2.16.840.1.113883.1.11.15999 RoleStatus (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M23"/>
   <xsl:template match="@*|node()" priority="-2" mode="M23">
      <xsl:apply-templates select="*" mode="M23"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.3-2020-06-08T000000[2] Dane pacjenta (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane pacjenta (bazowy)</svrl:text>

	  <!--RULE d16e2538-false-d14582e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]"
                 priority="1020"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]"
                       id="d16e2538-false-d14582e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2689-false-d14643e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]"
                 priority="1019"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]"
                       id="d16e2689-false-d14643e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('RCT') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('RCT') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for typeCode SHALL be 'RCT'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@contextControlCode) = ('OP') or not(@contextControlCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@contextControlCode) = ('OP') or not(@contextControlCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for contextControlCode SHALL be 'OP'. Found: "<xsl:text/>
                  <xsl:value-of select="@contextControlCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:patientRole[not(@nullFlavor)][hl7:patient]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:patientRole[not(@nullFlavor)][hl7:patient]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:patientRole[not(@nullFlavor)][hl7:patient] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:patientRole[not(@nullFlavor)][hl7:patient]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:patientRole[not(@nullFlavor)][hl7:patient]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:patientRole[not(@nullFlavor)][hl7:patient] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2695-false-d14699e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']"
                 priority="1018"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']"
                       id="d16e2695-false-d14699e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2700-false-d14732e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]"
                 priority="1017"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]"
                       id="d16e2700-false-d14732e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PAT') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PAT') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for classCode SHALL be 'PAT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:patient[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:patient[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:patient[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:patient[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:patient[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:patient[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:providerOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:providerOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:providerOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2704-false-d14795e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:id[not(@nullFlavor)]"
                 priority="1016"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:id[not(@nullFlavor)]"
                       id="d16e2704-false-d14795e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="@root='2.16.840.1.113883.3.4424.1.1.616' and not(matches(string(@extension),'^[0-9]{11}$'))">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="@root='2.16.840.1.113883.3.4424.1.1.616' and not(matches(string(@extension),'^[0-9]{11}$'))">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRecordTarget): Jeżeli identyfikatorem jest numer PESEL, to musi zawierać 11 cyfr.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--REPORT warning-->
      <xsl:if test="@root=('2.16.840.1.113883.3.4424.1.1','2.16.840.1.113883.3.4424.1.2','2.16.840.1.113883.3.4424.1.3','2.16.840.1.113883.3.4424.1.5')">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="@root=('2.16.840.1.113883.3.4424.1.1','2.16.840.1.113883.3.4424.1.2','2.16.840.1.113883.3.4424.1.3','2.16.840.1.113883.3.4424.1.5')">
            <xsl:attribute name="role">warning</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRecordTarget): Nieprawidłowa pula identyfikacji dla identyfikatora pacjenta.</svrl:text>
         </svrl:successful-report>
      </xsl:if>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2747-false-d14842e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]"
                 priority="1015"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]"
                       id="d16e2747-false-d14842e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PSN') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PSN') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for classCode SHALL be 'PSN'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for determinerCode SHALL be 'INSTANCE'. Found: "<xsl:text/>
                  <xsl:value-of select="@determinerCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:id MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:birthTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:birthTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:birthTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:maritalStatusCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:maritalStatusCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:maritalStatusCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:religiousAffiliationCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:religiousAffiliationCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:religiousAffiliationCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:raceCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:raceCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:raceCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:ethnicGroupCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:ethnicGroupCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:ethnicGroupCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:birthplace[hl7:birthplace]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:birthplace[hl7:birthplace]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:birthplace[hl7:birthplace] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:multipleBirthInd) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:multipleBirthInd) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element extPL:multipleBirthInd appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:multipleBirthOrderNumber) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:multipleBirthOrderNumber) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element extPL:multipleBirthOrderNumber appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2757-false-d14981e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1014"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2757-false-d14981e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.1 AdministrativeGender (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2763-false-d14998e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthTime"
                 priority="1013"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthTime"
                       id="d16e2763-false-d14998e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): Pierwsze 8 cyfr daty urodzenia powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2769-false-d15009e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:maritalStatusCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1012"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:maritalStatusCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2769-false-d15009e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12212-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.12212 MaritalStatus (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2774-false-d15029e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:religiousAffiliationCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1011"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:religiousAffiliationCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2774-false-d15029e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19185-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.19185 ReligiousAffiliation (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2779-false-d15049e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:raceCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1010"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:raceCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2779-false-d15049e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.14914-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.14914 Race (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2784-false-d15069e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:ethnicGroupCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1009"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:ethnicGroupCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2784-false-d15069e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15836-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.15836 Ethnicity (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2789-false-d15099e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']"
                 priority="1008"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']"
                       id="d16e2789-false-d15099e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('GUARD')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('GUARD')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for classCode SHALL be 'GUARD'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:guardianPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] | hl7:guardianOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): choice (hl7:guardianPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]  or  hl7:guardianOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): choice (hl7:guardianPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]  or  hl7:guardianOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2793-false-d15155e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']/hl7:id"
                 priority="1007"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']/hl7:id"
                       id="d16e2793-false-d15155e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="@root='2.16.840.1.113883.3.4424.1.1.616' and not(matches(string(@extension),'^[0-9]{11}$'))">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="@root='2.16.840.1.113883.3.4424.1.1.616' and not(matches(string(@extension),'^[0-9]{11}$'))">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRecordTarget): Jeżeli identyfikatorem jest numer PESEL to musi zawierać 11 cyfr.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--REPORT warning-->
      <xsl:if test="@root=('2.16.840.1.113883.3.4424.1.1','2.16.840.1.113883.3.4424.1.2','2.16.840.1.113883.3.4424.1.3','2.16.840.1.113883.3.4424.1.5')">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="@root=('2.16.840.1.113883.3.4424.1.1','2.16.840.1.113883.3.4424.1.2','2.16.840.1.113883.3.4424.1.3','2.16.840.1.113883.3.4424.1.5')">
            <xsl:attribute name="role">warning</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRecordTarget): Nieprawidłowa pula identyfikacji dla identyfikatora pacjenta.</svrl:text>
         </svrl:successful-report>
      </xsl:if>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2806-false-d15174e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                 priority="1006"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:guardian[@classCode = 'GUARD']/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                       id="d16e2806-false-d15174e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.111''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2822-false-d15234e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthplace[hl7:birthplace]"
                 priority="1005"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthplace[hl7:birthplace]"
                       id="d16e2822-false-d15234e0"/>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@classCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.20115-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.20115-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for classCode SHALL be selected from value set '2.16.840.1.113883.1.11.20115' RoleClassBirthplace (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:birthplace) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:birthplace) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:birthplace is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:birthplace) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:birthplace) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:birthplace appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2829-false-d15262e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthplace[hl7:birthplace]/hl7:birthplace"
                 priority="1004"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:birthplace[hl7:birthplace]/hl7:birthplace"
                       id="d16e2829-false-d15262e0"/>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@classCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.10892-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.10892-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for classCode SHALL be selected from value set '2.16.840.1.113883.1.11.10892' EntityClassPlace (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The value for determinerCode SHALL be 'INSTANCE'. Found: "<xsl:text/>
                  <xsl:value-of select="@determinerCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:addr) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:addr) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:addr appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2844-false-d15314e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication"
                 priority="1003"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication"
                       id="d16e2844-false-d15314e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:languageCode) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:languageCode) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:languageCode appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:modeCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:modeCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:modeCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:proficiencyLevelCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:proficiencyLevelCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:proficiencyLevelCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:preferenceInd) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:preferenceInd) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): element hl7:preferenceInd appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2851-false-d15371e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication/hl7:modeCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1002"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication/hl7:modeCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2851-false-d15371e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12249-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.12249 LanguageAbilityMode (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2856-false-d15391e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication/hl7:proficiencyLevelCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1001"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/hl7:languageCommunication/hl7:proficiencyLevelCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e2856-false-d15391e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.12199-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRecordTarget): The element value SHALL be one of '2.16.840.1.113883.1.11.12199 LanguageAbilityProficiency (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

	  <!--RULE d16e2866-false-d15424e0-->
   <xsl:template match="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/extPL:multipleBirthOrderNumber"
                 priority="1000"
                 mode="M24">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]]/hl7:recordTarget[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.3']]/hl7:patientRole[not(@nullFlavor)][hl7:patient]/hl7:patient[not(@nullFlavor)]/extPL:multipleBirthOrderNumber"
                       id="d16e2866-false-d15424e0"/>

		    <!--REPORT error-->
      <xsl:if test="extPL:multipleBirthInd/@value and not(extPL:multipleBirthOrderNumber/@value)">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="extPL:multipleBirthInd/@value and not(extPL:multipleBirthOrderNumber/@value)">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRecordTarget): Dla ciąży mnogiej wymagane jest podanie numeru kolejności urodzenia.</svrl:text>
         </svrl:successful-report>
      </xsl:if>
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M24"/>
   <xsl:template match="@*|node()" priority="-2" mode="M24">
      <xsl:apply-templates select="*" mode="M24"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.31-2018-06-30T000000[2] Apteka (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Apteka (bazowy)</svrl:text>

	  <!--RULE d16e2880-false-d15463e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]"
                 priority="1007"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]"
                       id="d16e2880-false-d15463e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.2.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.2.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:id[@root='2.16.840.1.113883.3.4424.2.2.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:name is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:standardIndustryClassCode MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:asOrganizationPartOf appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2934-false-d15518e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']"
                 priority="1006"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']"
                       id="d16e2934-false-d15518e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.31')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.31')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.31'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2939-false-d15527e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]"
                 priority="1005"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.6'][not(@nullFlavor)]"
                       id="d16e2939-false-d15527e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The value for root SHALL be '2.16.840.1.113883.3.4424.2.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2946-false-d15542e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.2.1']"
                 priority="1004"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.2.1']"
                       id="d16e2946-false-d15542e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.2.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The value for root SHALL be '2.16.840.1.113883.3.4424.2.2.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2956-false-d15567e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:telecom"
                 priority="1003"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:telecom"
                       id="d16e2956-false-d15567e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string-length(@value)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="string-length(@value)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): Wartość dla telefonu, adresu email lub lokalizacji zasobu nie może by pusta.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2966-false-d15583e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf"
                 priority="1002"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf"
                       id="d16e2966-false-d15583e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:effectiveTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): element hl7:wholeOrganization appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2972-false-d15636e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                 priority="1001"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                       id="d16e2972-false-d15636e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.111''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

	  <!--RULE d16e2977-false-d15652e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1000"
                 mode="M25">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e2977-false-d15652e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePharmacy): The element value SHALL be one of '2.16.840.1.113883.1.11.15999 RoleStatus (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M25"/>
   <xsl:template match="@*|node()" priority="-2" mode="M25">
      <xsl:apply-templates select="*" mode="M25"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.44-2020-06-08T000000[2] Dane umowy związanej z refundacją-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane umowy związanej z refundacją</svrl:text>

	  <!--RULE d16e2989-false-d15746e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]"
                 priority="1057"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]"
                       id="d16e2989-false-d15746e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3025-false-d15761e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]"
                 priority="1056"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]"
                       id="d16e3025-false-d15761e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('PART')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('PART')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for typeCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3029-false-d15791e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']"
                 priority="1055"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']"
                       id="d16e3029-false-d15791e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.44')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.44')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.44'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3034-false-d15802e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]"
                 priority="1054"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]"
                       id="d16e3034-false-d15802e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('CNTRCT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('CNTRCT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for classCode SHALL be 'CNTRCT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(extPL:id[@nullFlavor='NA'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15'] | extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): choice (extPL:id[@nullFlavor='NA']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): choice (extPL:id[@nullFlavor='NA']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']  or  extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@nullFlavor='NA']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@nullFlavor='NA']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@nullFlavor='NA'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:code) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(extPL:code) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:code appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3042-false-d15987e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@nullFlavor='NA']"
                 priority="1053"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@nullFlavor='NA']"
                       id="d16e3042-false-d15987e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@nullFlavor) = ('NA')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@nullFlavor) = ('NA')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for nullFlavor SHALL be 'NA'. Found: "<xsl:text/>
                  <xsl:value-of select="@nullFlavor"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3047-false-d15996e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']"
                 priority="1052"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.1']"
                       id="d16e3047-false-d15996e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3054-false-d16011e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']"
                 priority="1051"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.2']"
                       id="d16e3054-false-d16011e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3061-false-d16026e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']"
                 priority="1050"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.3']"
                       id="d16e3061-false-d16026e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3068-false-d16041e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']"
                 priority="1049"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.4']"
                       id="d16e3068-false-d16041e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.4'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3076-false-d16056e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']"
                 priority="1048"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.5']"
                       id="d16e3076-false-d16056e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3083-false-d16071e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']"
                 priority="1047"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.6']"
                       id="d16e3083-false-d16071e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3090-false-d16086e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']"
                 priority="1046"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.7']"
                       id="d16e3090-false-d16086e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3097-false-d16101e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']"
                 priority="1045"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.8']"
                       id="d16e3097-false-d16101e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.8')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.8')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.8'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3104-false-d16116e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']"
                 priority="1044"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.9']"
                       id="d16e3104-false-d16116e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.9')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.9')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.9'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3111-false-d16131e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']"
                 priority="1043"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.10']"
                       id="d16e3111-false-d16131e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.10'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3119-false-d16146e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']"
                 priority="1042"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.11']"
                       id="d16e3119-false-d16146e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.11')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.11')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.11'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3126-false-d16161e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']"
                 priority="1041"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.12']"
                       id="d16e3126-false-d16161e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.12')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.12')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.12'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3133-false-d16176e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']"
                 priority="1040"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.13']"
                       id="d16e3133-false-d16176e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.13')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.13')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.13'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3140-false-d16191e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']"
                 priority="1039"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.14']"
                       id="d16e3140-false-d16191e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3147-false-d16206e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']"
                 priority="1038"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.15']"
                       id="d16e3147-false-d16206e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3154-false-d16221e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']"
                 priority="1037"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.1.16']"
                       id="d16e3154-false-d16221e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.16')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.1.16')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.1.16'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3162-false-d16236e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']"
                 priority="1036"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.1']"
                       id="d16e3162-false-d16236e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3169-false-d16251e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']"
                 priority="1035"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.2']"
                       id="d16e3169-false-d16251e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3176-false-d16266e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']"
                 priority="1034"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.3']"
                       id="d16e3176-false-d16266e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3183-false-d16281e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']"
                 priority="1033"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.4']"
                       id="d16e3183-false-d16281e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.4'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3190-false-d16296e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']"
                 priority="1032"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.5']"
                       id="d16e3190-false-d16296e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3197-false-d16311e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']"
                 priority="1031"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.6']"
                       id="d16e3197-false-d16311e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3205-false-d16326e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']"
                 priority="1030"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.7']"
                       id="d16e3205-false-d16326e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3212-false-d16341e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']"
                 priority="1029"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.8']"
                       id="d16e3212-false-d16341e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.8')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.8')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.8'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3219-false-d16356e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']"
                 priority="1028"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.9']"
                       id="d16e3219-false-d16356e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.9')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.9')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.9'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3226-false-d16371e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']"
                 priority="1027"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.10']"
                       id="d16e3226-false-d16371e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.10'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3233-false-d16386e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']"
                 priority="1026"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.11']"
                       id="d16e3233-false-d16386e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.11')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.11')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.11'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3240-false-d16401e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']"
                 priority="1025"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.12']"
                       id="d16e3240-false-d16401e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.12')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.12')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.12'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3248-false-d16416e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']"
                 priority="1024"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.13']"
                       id="d16e3248-false-d16416e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.13')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.13')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.13'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3255-false-d16431e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']"
                 priority="1023"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.14']"
                       id="d16e3255-false-d16431e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3262-false-d16446e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']"
                 priority="1022"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.15']"
                       id="d16e3262-false-d16446e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3269-false-d16461e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']"
                 priority="1021"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.2.16']"
                       id="d16e3269-false-d16461e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.16')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.2.16')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.2.16'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3276-false-d16476e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']"
                 priority="1020"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.1']"
                       id="d16e3276-false-d16476e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3283-false-d16491e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']"
                 priority="1019"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.2']"
                       id="d16e3283-false-d16491e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3291-false-d16506e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']"
                 priority="1018"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.3']"
                       id="d16e3291-false-d16506e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3298-false-d16521e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']"
                 priority="1017"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.4']"
                       id="d16e3298-false-d16521e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.4'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3305-false-d16536e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']"
                 priority="1016"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.5']"
                       id="d16e3305-false-d16536e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3312-false-d16551e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']"
                 priority="1015"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.6']"
                       id="d16e3312-false-d16551e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3319-false-d16566e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']"
                 priority="1014"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.7']"
                       id="d16e3319-false-d16566e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3326-false-d16581e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']"
                 priority="1013"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.8']"
                       id="d16e3326-false-d16581e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.8')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.8')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.8'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3334-false-d16596e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']"
                 priority="1012"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.9']"
                       id="d16e3334-false-d16596e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.9')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.9')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.9'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3341-false-d16611e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']"
                 priority="1011"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.10']"
                       id="d16e3341-false-d16611e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.10'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3348-false-d16626e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']"
                 priority="1010"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.11']"
                       id="d16e3348-false-d16626e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.11')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.11')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.11'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3355-false-d16641e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']"
                 priority="1009"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.12']"
                       id="d16e3355-false-d16641e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.12')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.12')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.12'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3362-false-d16656e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']"
                 priority="1008"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.13']"
                       id="d16e3362-false-d16656e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.13')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.13')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.13'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3369-false-d16671e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']"
                 priority="1007"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.14']"
                       id="d16e3369-false-d16671e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3377-false-d16686e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']"
                 priority="1006"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.15']"
                       id="d16e3377-false-d16686e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3384-false-d16701e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']"
                 priority="1005"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:id[@root='2.16.840.1.113883.3.4424.8.6.3.16']"
                       id="d16e3384-false-d16701e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.16')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.8.6.3.16')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.8.6.3.16'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3394-false-d16726e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]"
                 priority="1004"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]"
                       id="d16e3394-false-d16726e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('PART')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('PART')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for typeCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3398-false-d16746e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']"
                 priority="1003"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']"
                       id="d16e3398-false-d16746e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('UNDWRT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('UNDWRT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for classCode SHALL be 'UNDWRT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(extPL:id[@root='2.16.840.1.113883.3.4424.3.1'] | extPL:id[@root='1.0.3166.1'] | extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): choice (extPL:id[@root='2.16.840.1.113883.3.4424.3.1']  or  extPL:id[@root='1.0.3166.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): choice (extPL:id[@root='2.16.840.1.113883.3.4424.3.1']  or  extPL:id[@root='1.0.3166.1']  or  extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.3.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.3.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.3.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='1.0.3166.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='1.0.3166.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='1.0.3166.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): element extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3404-false-d16775e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='2.16.840.1.113883.3.4424.3.1']"
                 priority="1002"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='2.16.840.1.113883.3.4424.3.1']"
                       id="d16e3404-false-d16775e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.3.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3411-false-d16790e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='1.0.3166.1']"
                 priority="1001"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='1.0.3166.1']"
                       id="d16e3411-false-d16790e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('1.0.3166.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('1.0.3166.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '1.0.3166.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT warning-->
      <xsl:choose>
         <xsl:when test="@extension=('AT','BE','BG','CY','CZ','DK','EE','FI','FR','GR','ES','NL','IS','IE','LI','LT','LU','LF','MT','DE','NO','PT','RO','SK','SI','CH','SE','HU','GB','IT','HR')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@extension=('AT','BE','BG','CY','CZ','DK','EE','FI','FR','GR','ES','NL','IS','IE','LI','LT','LU','LF','MT','DE','NO','PT','RO','SK','SI','CH','SE','HU','GB','IT','HR')">
               <xsl:attribute name="role">warning</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Nieprawidłowy identyfikator instytucji właściwej dla koordynacji</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

	  <!--RULE d16e3421-false-d16805e0-->
   <xsl:template match="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']"
                 priority="1000"
                 mode="M26">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]]/extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]/extPL:reimbursementRelatedContract[not(@nullFlavor)][@classCode = 'CNTRCT'][@moodCode = 'EVN'][extPL:bounding[@typeCode = 'PART']]/extPL:bounding[not(@nullFlavor)][@typeCode = 'PART'][extPL:reimburser[@classCode = 'UNDWRT']]/extPL:reimburser[not(@nullFlavor)][@classCode = 'UNDWRT']/extPL:id[@root='2.16.840.1.113883.3.4424.11.1.49']"
                       id="d16e3421-false-d16805e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.11.1.49')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.11.1.49')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): The value for root SHALL be '2.16.840.1.113883.3.4424.11.1.49'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(ReiReimbursementRelatedContract): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M26"/>
   <xsl:template match="@*|node()" priority="-2" mode="M26">
      <xsl:apply-templates select="*" mode="M26"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.49-2018-06-30T000000[2] Osoba przypisana-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Osoba przypisana</svrl:text>

	  <!--RULE d16e3434-false-d16841e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]"
                 priority="1001"
                 mode="M27">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]"
                       id="d16e3434-false-d16841e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:id is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:code appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M27"/>
   </xsl:template>

	  <!--RULE d16e3477-false-d16905e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']"
                 priority="1000"
                 mode="M27">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']"
                       id="d16e3477-false-d16905e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.49')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.49')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAssignedEntity): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.49'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M27"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M27"/>
   <xsl:template match="@*|node()" priority="-2" mode="M27">
      <xsl:apply-templates select="*" mode="M27"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.5-2018-06-30T000000[2] Organizacja odpowiedzialna za dokument (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Organizacja odpowiedzialna za dokument (bazowy)</svrl:text>

	  <!--RULE d16e3496-false-d16996e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]"
                 priority="1005"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]"
                       id="d16e3496-false-d16996e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

	  <!--RULE d16e3527-false-d17013e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]"
                 priority="1004"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]"
                       id="d16e3527-false-d17013e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('CST') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('CST') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): The value for typeCode SHALL be 'CST'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

	  <!--RULE d16e3531-false-d17043e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']"
                 priority="1003"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']"
                       id="d16e3531-false-d17043e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

	  <!--RULE d16e3536-false-d17054e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]"
                 priority="1002"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]"
                       id="d16e3536-false-d17054e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ASSIGNED') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ASSIGNED') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): The value for classCode SHALL be 'ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedCustodianOrganization[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedCustodianOrganization[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:representedCustodianOrganization[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedCustodianOrganization[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedCustodianOrganization[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:representedCustodianOrganization[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

	  <!--RULE d16e3540-false-d17074e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]/hl7:representedCustodianOrganization[not(@nullFlavor)]"
                 priority="1001"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]/hl7:representedCustodianOrganization[not(@nullFlavor)]"
                       id="d16e3540-false-d17074e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ORG') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ORG') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): The value for classCode SHALL be 'ORG'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): The value for determinerCode SHALL be 'INSTANCE'. Found: "<xsl:text/>
                  <xsl:value-of select="@determinerCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

	  <!--RULE d16e3546-false-d17096e0-->
   <xsl:template match="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]/hl7:representedCustodianOrganization[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                 priority="1000"
                 mode="M28">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]]/hl7:custodian[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.5']]/hl7:assignedCustodian[not(@nullFlavor)][hl7:representedCustodianOrganization]/hl7:representedCustodianOrganization[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                       id="d16e3546-false-d17096e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayable"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayable">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): attribute @displayable SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayable) or string(@displayable)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayable) or string(@displayable)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseCustodian): Attribute @displayable SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@displayable"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M28"/>
   <xsl:template match="@*|node()" priority="-2" mode="M28">
      <xsl:apply-templates select="*" mode="M28"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.50-2018-06-30T000000[2] Osoba powiązana-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Osoba powiązana</svrl:text>

	  <!--RULE d16e3557-false-d17124e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]"
                 priority="1002"
                 mode="M29">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]"
                       id="d16e3557-false-d17124e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): element hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): element hl7:effectiveTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:relatedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:relatedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): element hl7:relatedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M29"/>
   </xsl:template>

	  <!--RULE d16e3580-false-d17175e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']"
                 priority="1001"
                 mode="M29">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']"
                       id="d16e3580-false-d17175e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.50')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.50')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.50'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M29"/>
   </xsl:template>

	  <!--RULE d16e3585-false-d17189e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M29">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e3585-false-d17189e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedEntity): The element value SHALL be one of '2.16.840.1.113883.1.11.19563 PersonalRelationshipRoleType (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M29"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M29"/>
   <xsl:template match="@*|node()" priority="-2" mode="M29">
      <xsl:apply-templates select="*" mode="M29"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.51-2018-06-30T000000[2] Dane wykonanej usługi (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane wykonanej usługi (bazowy)</svrl:text>

	  <!--RULE d16e3630-false-d17333e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]"
                 priority="1006"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]"
                       id="d16e3630-false-d17333e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('DOC')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('DOC')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The value for typeCode SHALL be 'DOC'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3634-false-d17386e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']"
                 priority="1005"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']"
                       id="d16e3634-false-d17386e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.51')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.51')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.51'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3639-false-d17420e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]"
                 priority="1004"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]"
                       id="d16e3639-false-d17420e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ACT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ACT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The value for classCode SHALL be 'ACT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:effectiveTime[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:effectiveTime[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3647-false-d17492e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']"
                 priority="1003"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']"
                       id="d16e3647-false-d17492e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.2.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.2.6''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3652-false-d17505e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:effectiveTime[not(@nullFlavor)]"
                 priority="1002"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:effectiveTime[not(@nullFlavor)]"
                       id="d16e3652-false-d17505e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): Pierwsze 8 cyfr daty powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3659-false-d17536e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:performer[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]"
                 priority="1001"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:performer[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]"
                       id="d16e3659-false-d17536e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@typeCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@typeCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): attribute @typeCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@typeCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19601-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19601-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The value for typeCode SHALL be selected from value set '2.16.840.1.113883.1.11.19601' x_ServiceEventPerformer (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:time appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): element hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

	  <!--RULE d16e3666-false-d17608e0-->
   <xsl:template match="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:performer[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M30">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]]/hl7:documentationOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.51']]/hl7:serviceEvent[hl7:code[@codeSystem = '2.16.840.1.113883.3.4424.11.2.6']]/hl7:performer[hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e3666-false-d17608e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDocumentationOf): The element value SHALL be one of '2.16.840.1.113883.1.11.10267 ParticipationFunction (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M30"/>
   <xsl:template match="@*|node()" priority="-2" mode="M30">
      <xsl:apply-templates select="*" mode="M30"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.53-2018-06-30T000000[2] Dane zlecenia (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dane zlecenia (bazowy)</svrl:text>

	  <!--RULE d16e3707-false-d17687e0-->
   <xsl:template match="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]"
                 priority="1004"
                 mode="M31">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]"
                       id="d16e3707-false-d17687e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('FLFS') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('FLFS') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The value for typeCode SHALL be 'FLFS'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:order[@moodCode = 'RQO']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:order[@moodCode = 'RQO']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:order[@moodCode = 'RQO'] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:order[@moodCode = 'RQO']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:order[@moodCode = 'RQO']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:order[@moodCode = 'RQO'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>

	  <!--RULE d16e3711-false-d17717e0-->
   <xsl:template match="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']"
                 priority="1003"
                 mode="M31">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']"
                       id="d16e3711-false-d17717e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.53')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.53')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.53'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>

	  <!--RULE d16e3716-false-d17728e0-->
   <xsl:template match="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']"
                 priority="1002"
                 mode="M31">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']"
                       id="d16e3716-false-d17728e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ACT') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ACT') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The value for classCode SHALL be 'ACT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('RQO')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('RQO')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The value for moodCode SHALL be 'RQO'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.4' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.4' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:code[@codeSystem = '2.16.840.1.113883.5.4' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:priorityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:priorityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): element hl7:priorityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>

	  <!--RULE d16e3724-false-d17775e0-->
   <xsl:template match="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']/hl7:code[@codeSystem = '2.16.840.1.113883.5.4' or @nullFlavor]"
                 priority="1001"
                 mode="M31">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']/hl7:code[@codeSystem = '2.16.840.1.113883.5.4' or @nullFlavor]"
                       id="d16e3724-false-d17775e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.4''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>

	  <!--RULE d16e3729-false-d17791e0-->
   <xsl:template match="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']/hl7:priorityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M31">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]]/hl7:inFulfillmentOf[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.53']]/hl7:order[@moodCode = 'RQO']/hl7:priorityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e3729-false-d17791e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInFulfillmentOf): The element value SHALL be one of '2.16.840.1.113883.1.11.16866 ActPriority (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M31"/>
   <xsl:template match="@*|node()" priority="-2" mode="M31">
      <xsl:apply-templates select="*" mode="M31"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.6-2018-06-30T000000[2] Wystawca dokumentu (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Wystawca dokumentu (bazowy)</svrl:text>

	  <!--RULE d16e3737-false-d17829e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]"
                 priority="1005"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]"
                       id="d16e3737-false-d17829e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

	  <!--RULE d16e3769-false-d17870e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]"
                 priority="1004"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]"
                       id="d16e3769-false-d17870e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('LA') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('LA') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): The value for typeCode SHALL be 'LA'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@contextControlCode) = ('OP') or not(@contextControlCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@contextControlCode) = ('OP') or not(@contextControlCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): The value for contextControlCode SHALL be 'OP'. Found: "<xsl:text/>
                  <xsl:value-of select="@contextControlCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:time is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:time appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:assignedEntity[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:assignedEntity[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

	  <!--RULE d16e3775-false-d17936e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']"
                 priority="1003"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']"
                       id="d16e3775-false-d17936e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

	  <!--RULE d16e3782-false-d17958e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1002"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e3782-false-d17958e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): The element value SHALL be one of '2.16.840.1.113883.1.11.10282 ParticipationSignature (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

	  <!--RULE d16e3788-false-d17988e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:assignedEntity[not(@nullFlavor)]"
                 priority="1001"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:assignedEntity[not(@nullFlavor)]"
                       id="d16e3788-false-d17988e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ASSIGNED') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ASSIGNED') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): The value for classCode SHALL be 'ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="not(hl7:assignedPerson/hl7:name) and not(hl7:id[@root=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@extension])">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="not(hl7:assignedPerson/hl7:name) and not(hl7:id[@root=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@extension])">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseLegalAuthenticator): Jeśli wystawca dokumentu jest również jego autorem to identyfikator wystawcy musi być taki sam jak identyfikator autora. W przeciwnym wypadku należy podać dane personalne wystawcy dokumentu.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:code appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

	  <!--RULE d16e3792-false-d18047e0-->
   <xsl:template match="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:assignedEntity[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                 priority="1000"
                 mode="M32">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]]/hl7:legalAuthenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.6']]/hl7:assignedEntity[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                       id="d16e3792-false-d18047e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseLegalAuthenticator): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M32"/>
   <xsl:template match="@*|node()" priority="-2" mode="M32">
      <xsl:apply-templates select="*" mode="M32"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.61-2018-09-30T000000[2] Odbiorca informacji (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Odbiorca informacji (bazowy)</svrl:text>

	  <!--RULE d16e3869-false-d18186e0-->
   <xsl:template match="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]"
                 priority="1002"
                 mode="M33">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]"
                       id="d16e3869-false-d18186e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@typeCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@typeCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): attribute @typeCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@typeCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19366-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19366-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): The value for typeCode SHALL be selected from value set '2.16.840.1.113883.1.11.19366' x_InformationRecipient (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M33"/>
   </xsl:template>

	  <!--RULE d16e3876-false-d18241e0-->
   <xsl:template match="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']"
                 priority="1001"
                 mode="M33">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']"
                       id="d16e3876-false-d18241e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.61')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.61')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.61'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M33"/>
   </xsl:template>

	  <!--RULE d16e3881-false-d18266e0-->
   <xsl:template match="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]/hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]"
                 priority="1000"
                 mode="M33">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]]/hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.61']]/hl7:intendedRecipient[hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]]"
                       id="d16e3881-false-d18266e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@classCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@classCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): attribute @classCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@classCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@classCode) or empty($theAttValue[not(. = (('ASSIGNED')))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@classCode) or empty($theAttValue[not(. = (('ASSIGNED')))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): The value for classCode SHALL be 'code ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:informationRecipient[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseInformationRecipient): element hl7:receivedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M33"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M33"/>
   <xsl:template match="@*|node()" priority="-2" mode="M33">
      <xsl:apply-templates select="*" mode="M33"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.7-2020-06-08T000000[2] Dokument powiązany (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Dokument powiązany (bazowy)</svrl:text>

	  <!--RULE d16e3936-false-d18409e0-->
   <xsl:template match="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]"
                 priority="1003"
                 mode="M34">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]"
                       id="d16e3936-false-d18409e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@typeCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@typeCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): attribute @typeCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@typeCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.11610-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@typeCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.11610-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): The value for typeCode SHALL be selected from value set '2.16.840.1.113883.1.11.11610' x_ActRelationshipDocument (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:parentDocument) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:parentDocument) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:parentDocument is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:parentDocument) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:parentDocument) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:parentDocument appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M34"/>
   </xsl:template>

	  <!--RULE d16e3943-false-d18450e0-->
   <xsl:template match="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']"
                 priority="1002"
                 mode="M34">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']"
                       id="d16e3943-false-d18450e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M34"/>
   </xsl:template>

	  <!--RULE d16e3948-false-d18461e0-->
   <xsl:template match="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:parentDocument"
                 priority="1001"
                 mode="M34">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:parentDocument"
                       id="d16e3948-false-d18461e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('DOCCLIN') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('DOCCLIN') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): The value for classCode SHALL be 'DOCCLIN'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN') or not(@moodCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN') or not(@moodCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="hl7:id[@root=/hl7:ClinicalDocument/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:id/@extension]">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="hl7:id[@root=/hl7:ClinicalDocument/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:id/@extension]">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseRelatedDocument): Idetyfikator dokumentu jest taki sam jak identyfikator dokumentu powiązanego wskazujcego na jego poprzednią wersję.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="hl7:setId[@root=/hl7:ClinicalDocument/hl7:setId/@root and @extension=/hl7:ClinicalDocument/hl7:setId/@extension]"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="hl7:setId[@root=/hl7:ClinicalDocument/hl7:setId/@root and @extension=/hl7:ClinicalDocument/hl7:setId/@extension]">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): Identyfikator grupy wersji dokumentów (setId) powienien być identyczny dla dokumentu i dokumentu powiązanego wskazującego na jego poprzednią wersję.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="(xs:integer(hl7:versionNumber/@value)+1)=xs:integer(/hl7:ClinicalDocument/hl7:versionNumber/@value)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="(xs:integer(hl7:versionNumber/@value)+1)=xs:integer(/hl7:ClinicalDocument/hl7:versionNumber/@value)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): Dokument powiązany powienien wskazywać poprzednią wersję dokumentu.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:setId[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:setId[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:setId[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:setId[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:setId[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:setId[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:versionNumber[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:versionNumber[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:versionNumber[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:versionNumber[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:versionNumber[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): element hl7:versionNumber[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M34"/>
   </xsl:template>

	  <!--RULE d16e3956-false-d18509e0-->
   <xsl:template match="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:parentDocument/hl7:setId[not(@nullFlavor)]"
                 priority="1000"
                 mode="M34">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]]/hl7:relatedDocument[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.7']]/hl7:parentDocument/hl7:setId[not(@nullFlavor)]"
                       id="d16e3956-false-d18509e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseRelatedDocument): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M34"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M34"/>
   <xsl:template match="@*|node()" priority="-2" mode="M34">
      <xsl:apply-templates select="*" mode="M34"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.75-2018-06-30T000000[4] Miejsce-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Miejsce</svrl:text>

	  <!--RULE d16e3978-false-d18541e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]"
                 priority="1001"
                 mode="M35">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]"
                       id="d16e3978-false-d18541e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePlace): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePlace): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:name) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:name) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePlace): element hl7:name appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:addr) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:addr) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePlace): element hl7:addr appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M35"/>
   </xsl:template>

	  <!--RULE d16e4006-false-d18570e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']"
                 priority="1000"
                 mode="M35">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.75']"
                       id="d16e4006-false-d18570e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.75')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.75')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBasePlace): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.75'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M35"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M35"/>
   <xsl:template match="@*|node()" priority="-2" mode="M35">
      <xsl:apply-templates select="*" mode="M35"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.85-2018-06-30T000000[2] Osoba autoryzująca dokument (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Osoba autoryzująca dokument (bazowy)</svrl:text>

	  <!--RULE d16e4017-false-d18618e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]"
                 priority="1005"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]"
                       id="d16e4017-false-d18618e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

	  <!--RULE d16e4049-false-d18659e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]"
                 priority="1004"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]"
                       id="d16e4049-false-d18659e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('LA') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('LA') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): The value for typeCode SHALL be 'LA'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:time is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:time appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:assignedEntity[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedEntity[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedEntity[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:assignedEntity[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

	  <!--RULE d16e4053-false-d18721e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']"
                 priority="1003"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']"
                       id="d16e4053-false-d18721e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.85')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.85')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.85'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

	  <!--RULE d16e4060-false-d18743e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1002"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:signatureCode[@code = doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e4060-false-d18743e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10282-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): The element value SHALL be one of '2.16.840.1.113883.1.11.10282 ParticipationSignature (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

	  <!--RULE d16e4065-false-d18773e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:assignedEntity[not(@nullFlavor)]"
                 priority="1001"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:assignedEntity[not(@nullFlavor)]"
                       id="d16e4065-false-d18773e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ASSIGNED') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ASSIGNED') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): The value for classCode SHALL be 'ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="not(hl7:assignedPerson/hl7:name) and not(hl7:id[@root=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@extension])">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="not(hl7:assignedPerson/hl7:name) and not(hl7:id[@root=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@root and @extension=/hl7:ClinicalDocument/hl7:author/hl7:assignedAuthor/hl7:id/@extension])">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaBaseAuthenticator): Jeśli osoba autoryzująca dokument jest również jego autorem to identyfikator osoby autoryzującej musi być taki sam jak identyfikator autora. W przeciwnym wypadku należy podać dane personalne osoby autoryzującej dokument.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:code) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:code appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

	  <!--RULE d16e4069-false-d18832e0-->
   <xsl:template match="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:assignedEntity[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                 priority="1000"
                 mode="M36">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]]/hl7:authenticator[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.85']]/hl7:assignedEntity[not(@nullFlavor)]/hl7:id[not(@nullFlavor)]"
                       id="d16e4069-false-d18832e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@root"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@root">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): attribute @root SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@root) or matches(@root,'^[0-2](\.(0|[1-9]\d*))*$') or matches(@root,'^[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}$') or matches(@root,'^[A-Za-z][A-Za-z\d\-]*$')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): Attribute @root SHALL be of data type 'uid'  - '<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseAuthenticator): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M36"/>
   <xsl:template match="@*|node()" priority="-2" mode="M36">
      <xsl:apply-templates select="*" mode="M36"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.2.89-2018-09-30T000000[2] Organizacja do której kierowany jest dokument-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[2] Organizacja do której kierowany jest dokument</svrl:text>

	  <!--RULE d16e4093-false-d18992e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]"
                 priority="1076"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]"
                       id="d16e4093-false-d18992e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44'] | hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): choice (hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): choice (hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']  or  hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:addr) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:addr) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:addr appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:standardIndustryClassCode) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:standardIndustryClassCode) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:standardIndustryClassCode appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:asOrganizationPartOf) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:asOrganizationPartOf) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:asOrganizationPartOf appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4139-false-d19263e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']"
                 priority="1075"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']"
                       id="d16e4139-false-d19263e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.89')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.89')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.89'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4146-false-d19272e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]"
                 priority="1074"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.3.1'][not(@nullFlavor)]"
                       id="d16e4146-false-d19272e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.3.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.3.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4153-false-d19287e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']"
                 priority="1073"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.50']"
                       id="d16e4153-false-d19287e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.50')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.50'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4160-false-d19302e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']"
                 priority="1072"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.51']"
                       id="d16e4160-false-d19302e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.51')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.51'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4167-false-d19317e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']"
                 priority="1071"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.52']"
                       id="d16e4167-false-d19317e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.52')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.52'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4174-false-d19332e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']"
                 priority="1070"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.53']"
                       id="d16e4174-false-d19332e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.53')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.53'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4182-false-d19347e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']"
                 priority="1069"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.54']"
                       id="d16e4182-false-d19347e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.54')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.54'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4189-false-d19362e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']"
                 priority="1068"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.55']"
                       id="d16e4189-false-d19362e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.55')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.55'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4196-false-d19377e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']"
                 priority="1067"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.56']"
                       id="d16e4196-false-d19377e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.56')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.56'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4203-false-d19392e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']"
                 priority="1066"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.57']"
                       id="d16e4203-false-d19392e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.57')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.57'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4210-false-d19407e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']"
                 priority="1065"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.58']"
                       id="d16e4210-false-d19407e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.58')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.58'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4217-false-d19422e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']"
                 priority="1064"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.59']"
                       id="d16e4217-false-d19422e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.59')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.59'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4225-false-d19437e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']"
                 priority="1063"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.60']"
                       id="d16e4225-false-d19437e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.60')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.60'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4232-false-d19452e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']"
                 priority="1062"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.61']"
                       id="d16e4232-false-d19452e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.61')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.61'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4239-false-d19467e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']"
                 priority="1061"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.62']"
                       id="d16e4239-false-d19467e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.62')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.62'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4246-false-d19482e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']"
                 priority="1060"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.63']"
                       id="d16e4246-false-d19482e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.63')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.63'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4253-false-d19497e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']"
                 priority="1059"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.64']"
                       id="d16e4253-false-d19497e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.64')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.64'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4260-false-d19512e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']"
                 priority="1058"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.65']"
                       id="d16e4260-false-d19512e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.65')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.65'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4268-false-d19527e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']"
                 priority="1057"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.66']"
                       id="d16e4268-false-d19527e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.66')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.66'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4275-false-d19542e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']"
                 priority="1056"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.67']"
                       id="d16e4275-false-d19542e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.67')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.67'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4282-false-d19557e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']"
                 priority="1055"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.68']"
                       id="d16e4282-false-d19557e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.68')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.68'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4289-false-d19572e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']"
                 priority="1054"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.69']"
                       id="d16e4289-false-d19572e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.69')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.69'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4296-false-d19587e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']"
                 priority="1053"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.70']"
                       id="d16e4296-false-d19587e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.70')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.70'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4303-false-d19602e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']"
                 priority="1052"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.71']"
                       id="d16e4303-false-d19602e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.71')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.71'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4311-false-d19617e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']"
                 priority="1051"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.72']"
                       id="d16e4311-false-d19617e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.72')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.72'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4318-false-d19632e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']"
                 priority="1050"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.73']"
                       id="d16e4318-false-d19632e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.73')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.73'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4325-false-d19647e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']"
                 priority="1049"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.74']"
                       id="d16e4325-false-d19647e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.74')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.74'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4332-false-d19662e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']"
                 priority="1048"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.4.75']"
                       id="d16e4332-false-d19662e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.4.75')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.4.75'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4339-false-d19677e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']"
                 priority="1047"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.1']"
                       id="d16e4339-false-d19677e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4346-false-d19692e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']"
                 priority="1046"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.2']"
                       id="d16e4346-false-d19692e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4354-false-d19707e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']"
                 priority="1045"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.3']"
                       id="d16e4354-false-d19707e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.3')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.3'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4361-false-d19722e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']"
                 priority="1044"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.4']"
                       id="d16e4361-false-d19722e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.4')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.4'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4368-false-d19737e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']"
                 priority="1043"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.5']"
                       id="d16e4368-false-d19737e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.5')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.5'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4375-false-d19752e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']"
                 priority="1042"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.6']"
                       id="d16e4375-false-d19752e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.6')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.6'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4382-false-d19767e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']"
                 priority="1041"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.7']"
                       id="d16e4382-false-d19767e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.7')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.7'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4389-false-d19782e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']"
                 priority="1040"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.8']"
                       id="d16e4389-false-d19782e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.8')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.8'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4397-false-d19797e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']"
                 priority="1039"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.9']"
                       id="d16e4397-false-d19797e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.9')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.9'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4404-false-d19812e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']"
                 priority="1038"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.10']"
                       id="d16e4404-false-d19812e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.10'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4411-false-d19827e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']"
                 priority="1037"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.11']"
                       id="d16e4411-false-d19827e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.11')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.11'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4418-false-d19842e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']"
                 priority="1036"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.12']"
                       id="d16e4418-false-d19842e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.12')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.12'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4425-false-d19857e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']"
                 priority="1035"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.13']"
                       id="d16e4425-false-d19857e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.13')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.13'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4432-false-d19872e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']"
                 priority="1034"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.14']"
                       id="d16e4432-false-d19872e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4440-false-d19887e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']"
                 priority="1033"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.15']"
                       id="d16e4440-false-d19887e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4447-false-d19902e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']"
                 priority="1032"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.16']"
                       id="d16e4447-false-d19902e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.16')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.16'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4454-false-d19917e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']"
                 priority="1031"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.17']"
                       id="d16e4454-false-d19917e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.17')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.17'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4461-false-d19932e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']"
                 priority="1030"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.18']"
                       id="d16e4461-false-d19932e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.18')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.18'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4468-false-d19947e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']"
                 priority="1029"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.19']"
                       id="d16e4468-false-d19947e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.19')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.19'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4475-false-d19962e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']"
                 priority="1028"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.20']"
                       id="d16e4475-false-d19962e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.20')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.20'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4483-false-d19977e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']"
                 priority="1027"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.21']"
                       id="d16e4483-false-d19977e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.21')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.21'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4490-false-d19992e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']"
                 priority="1026"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.22']"
                       id="d16e4490-false-d19992e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.22')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.22'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4497-false-d20007e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']"
                 priority="1025"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.23']"
                       id="d16e4497-false-d20007e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.23')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.23'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4504-false-d20022e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']"
                 priority="1024"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.24']"
                       id="d16e4504-false-d20022e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.24')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.24'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4511-false-d20037e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']"
                 priority="1023"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.25']"
                       id="d16e4511-false-d20037e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.25')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.25'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4518-false-d20052e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']"
                 priority="1022"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.26']"
                       id="d16e4518-false-d20052e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.26')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.26'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4526-false-d20067e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']"
                 priority="1021"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.27']"
                       id="d16e4526-false-d20067e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.27')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.27'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4533-false-d20082e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']"
                 priority="1020"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.28']"
                       id="d16e4533-false-d20082e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.28')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.28'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4540-false-d20097e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']"
                 priority="1019"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.29']"
                       id="d16e4540-false-d20097e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.29')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.29'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4547-false-d20112e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']"
                 priority="1018"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.30']"
                       id="d16e4547-false-d20112e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.30')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.30'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4554-false-d20127e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']"
                 priority="1017"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.31']"
                       id="d16e4554-false-d20127e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.31')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.31'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4561-false-d20142e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']"
                 priority="1016"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.32']"
                       id="d16e4561-false-d20142e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.32')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.32'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4569-false-d20157e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']"
                 priority="1015"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.33']"
                       id="d16e4569-false-d20157e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.33')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.33'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4576-false-d20172e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']"
                 priority="1014"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.34']"
                       id="d16e4576-false-d20172e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.34')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.34'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4583-false-d20187e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']"
                 priority="1013"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.35']"
                       id="d16e4583-false-d20187e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.35')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.35'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4590-false-d20202e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']"
                 priority="1012"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.36']"
                       id="d16e4590-false-d20202e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.36')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.36'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4597-false-d20217e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']"
                 priority="1011"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.37']"
                       id="d16e4597-false-d20217e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.37')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.37'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4604-false-d20232e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']"
                 priority="1010"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.38']"
                       id="d16e4604-false-d20232e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.38')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.38'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4612-false-d20247e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']"
                 priority="1009"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.39']"
                       id="d16e4612-false-d20247e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.39')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.39'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4619-false-d20262e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']"
                 priority="1008"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.40']"
                       id="d16e4619-false-d20262e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.40')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.40'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4626-false-d20277e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']"
                 priority="1007"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.41']"
                       id="d16e4626-false-d20277e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.41')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.41'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4633-false-d20292e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']"
                 priority="1006"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.42']"
                       id="d16e4633-false-d20292e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.42')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.42'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4640-false-d20307e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']"
                 priority="1005"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.43']"
                       id="d16e4640-false-d20307e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.43')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.43'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4647-false-d20322e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']"
                 priority="1004"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.44']"
                       id="d16e4647-false-d20322e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.44')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.44'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4655-false-d20337e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']"
                 priority="1003"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:id[@root='2.16.840.1.113883.3.4424.2.5.45']"
                       id="d16e4655-false-d20337e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.2.5.45')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for root SHALL be '2.16.840.1.113883.3.4424.2.5.45'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@extension"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@extension">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): attribute @extension SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@extension) or string-length(@extension)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@extension) or string-length(@extension)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): Attribute @extension SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@extension"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4672-false-d20386e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf"
                 priority="1002"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf"
                       id="d16e4672-false-d20386e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PART') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PART') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The value for classCode SHALL be 'PART'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:effectiveTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:effectiveTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:effectiveTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:wholeOrganization) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:wholeOrganization) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): element hl7:wholeOrganization appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4678-false-d20439e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                 priority="1001"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                       id="d16e4678-false-d20439e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.111''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

	  <!--RULE d16e4683-false-d20455e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1000"
                 mode="M37">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.89']]/hl7:asOrganizationPartOf/hl7:statusCode[@code = doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e4683-false-d20455e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.15999-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaIntendedRecipientOrganization): The element value SHALL be one of '2.16.840.1.113883.1.11.15999 RoleStatus (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M37"/>
   <xsl:template match="@*|node()" priority="-2" mode="M37">
      <xsl:apply-templates select="*" mode="M37"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.3.222-2025-02-26T000000[3] Sekcja postaci binarnej karty medycznych czynności ratunkowych-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[3] Sekcja postaci binarnej karty medycznych czynności ratunkowych</svrl:text>

	  <!--RULE d16e4695-false-d20576e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]"
                 priority="1010"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]"
                       id="d16e4695-false-d20576e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4710-false-d20747e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]"
                 priority="1009"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]"
                       id="d16e4710-false-d20747e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('DOCSECT') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('DOCSECT') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for classCode SHALL be 'DOCSECT'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN') or not(@moodCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN') or not(@moodCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="hl7:code/@code = /hl7:ClinicalDocument/hl7:code/@code and hl7:code/@displayName = /hl7:ClinicalDocument/hl7:code/@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="hl7:code/@code = /hl7:ClinicalDocument/hl7:code/@code and hl7:code/@displayName = /hl7:ClinicalDocument/hl7:code/@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Kod typu sekcji postaci binarnej dokumentu musi byc zgodny z kodem typu dokumentu.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:id appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.6.1']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.6.1']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:code[@codeSystem = '2.16.840.1.113883.6.1'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.6.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.6.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:code[@codeSystem = '2.16.840.1.113883.6.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:title) = 0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:title) = 0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:title MAY NOT be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:text[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:text[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:text[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:text[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:text[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:text[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:languageCode[@code = doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:languageCode[@code = doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:languageCode[@code = doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:subject[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:subject[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:subject[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:entry[hl7:observationMedia/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.49'][not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:entry[hl7:observationMedia/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.49'][not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:entry[hl7:observationMedia/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.49'][not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): element hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4716-false-d20924e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']"
                 priority="1008"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']"
                       id="d16e4716-false-d20924e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.3.222')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.3.222')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.3.222'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4723-false-d20944e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:code[@codeSystem = '2.16.840.1.113883.6.1']"
                 priority="1007"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:code[@codeSystem = '2.16.840.1.113883.6.1']"
                       id="d16e4723-false-d20944e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.1' and @codeSystemName='LOINC')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.1' and @codeSystemName='LOINC')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.6.1' codeSystemName='LOINC''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4736-false-d20976e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1006"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:confidentialityCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e4736-false-d20976e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16926-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The element value SHALL be one of '2.16.840.1.113883.1.11.16926 x_BasicConfidentialityKind (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4741-false-d20996e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:languageCode[@code = doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                 priority="1005"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:languageCode[@code = doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]"
                       id="d16e4741-false-d20996e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.25-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.25 Język dokumentu (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE -->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:observationMedia/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.49'][not(@nullFlavor)]"
                 priority="1004"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:observationMedia/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.49'][not(@nullFlavor)]"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE -->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.1']"
                 priority="1003"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.1']"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE -->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.2']"
                 priority="1002"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry[hl7:organizer/hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.4.2']"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4781-false-d21171e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry"
                 priority="1001"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:entry"
                       id="d16e4781-false-d21171e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

	  <!--RULE d16e4788-false-d21186e0-->
   <xsl:template match="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:component"
                 priority="1000"
                 mode="M38">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]]/hl7:section[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.3.222']]/hl7:component"
                       id="d16e4788-false-d21186e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaParamedicRescueSummaryNoteBinaryContentSection): Attribute @contextConductionInd SHALL be of data type 'bl'  - '<xsl:text/>
                  <xsl:value-of select="@contextConductionInd"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M38"/>
   <xsl:template match="@*|node()" priority="-2" mode="M38">
      <xsl:apply-templates select="*" mode="M38"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.1-2018-09-30T000000[4] Rozpoznanie główne-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Rozpoznanie główne</svrl:text>

	  <!--RULE d16e4797-false-d21211e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]"
                 priority="1009"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]"
                       id="d16e4797-false-d21211e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4830-false-d21228e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]"
                 priority="1008"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]"
                       id="d16e4830-false-d21228e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('BATTERY')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('BATTERY')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for classCode SHALL be 'BATTERY'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = 'completed']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:statusCode[@code = 'completed'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = 'completed']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:statusCode[@code = 'completed'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[not(@nullFlavor)][hl7:observation]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[not(@nullFlavor)][hl7:observation]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:component[not(@nullFlavor)][hl7:observation] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[not(@nullFlavor)][hl7:observation]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[not(@nullFlavor)][hl7:observation]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:component[not(@nullFlavor)][hl7:observation] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4836-false-d21278e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']"
                 priority="1007"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']"
                       id="d16e4836-false-d21278e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.1')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.1')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.1'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4841-false-d21290e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]"
                 priority="1006"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]"
                       id="d16e4841-false-d21290e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='8319008' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Principal diagnosis' and @codeSystemName='SNOMED CT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='8319008' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Principal diagnosis' and @codeSystemName='SNOMED CT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The element value SHALL be one of 'code '8319008' codeSystem '2.16.840.1.113883.6.96' displayName='Principal diagnosis' codeSystemName='SNOMED CT''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4846-false-d21304e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:statusCode[@code = 'completed']"
                 priority="1005"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:statusCode[@code = 'completed']"
                       id="d16e4846-false-d21304e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='completed')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='completed')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The element value SHALL be one of 'code 'completed''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4852-false-d21317e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]"
                 priority="1004"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]"
                       id="d16e4852-false-d21317e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observation[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observation[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:observation[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observation[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observation[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:observation[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4856-false-d21337e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]"
                 priority="1003"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]"
                       id="d16e4856-false-d21337e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('OBS') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('OBS') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for classCode SHALL be 'OBS'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN') or not(@moodCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN') or not(@moodCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | hl7:code[@codeSystem='2.16.840.1.113883.6.260'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): choice (hl7:code[@codeSystem='2.16.840.1.113883.6.3']  or  hl7:code[@codeSystem='2.16.840.1.113883.6.260']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): choice (hl7:code[@codeSystem='2.16.840.1.113883.6.3']  or  hl7:code[@codeSystem='2.16.840.1.113883.6.260']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:code[@codeSystem='2.16.840.1.113883.6.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.260']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.260']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:code[@codeSystem='2.16.840.1.113883.6.260'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4864-false-d21376e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:code[@codeSystem='2.16.840.1.113883.6.3']"
                 priority="1002"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:code[@codeSystem='2.16.840.1.113883.6.3']"
                       id="d16e4864-false-d21376e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.3' and @codeSystemName='icd10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.3' and @codeSystemName='icd10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.6.3' codeSystemName='icd10''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or string-length(@code)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or string-length(@code)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): Attribute @code SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4873-false-d21397e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:code[@codeSystem='2.16.840.1.113883.6.260']"
                 priority="1001"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:code[@codeSystem='2.16.840.1.113883.6.260']"
                       id="d16e4873-false-d21397e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.260' and @codeSystemName='icd10DualCoding')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.260' and @codeSystemName='icd10DualCoding')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.6.260' codeSystemName='icd10DualCoding''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or string-length(@code)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or string-length(@code)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): Attribute @code SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

	  <!--RULE d16e4883-false-d21423e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M39">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e4883-false-d21423e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.80 Strona ciała w rozpoznaniu (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M39"/>
   <xsl:template match="@*|node()" priority="-2" mode="M39">
      <xsl:apply-templates select="*" mode="M39"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.1-2018-09-30T000000-closed[4] Rozpoznanie główne-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Rozpoznanie główne</svrl:text>

	  <!--RULE d16e4797-true-d21453e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/*[not(@xsi:nil = 'true')][not(self::hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']])]"
                 priority="1003"
                 mode="M40">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/*[not(@xsi:nil = 'true')][not(self::hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']])]"
                       id="d16e4797-true-d21453e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis)/d16e4797-true-d21453e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']] (rule-reference: d16e4797-true-d21453e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M40"/>
   </xsl:template>

	  <!--RULE d16e4830-true-d21489e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1'] | self::hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | self::hl7:statusCode[@code = 'completed'] | self::hl7:component[not(@nullFlavor)][hl7:observation])]"
                 priority="1002"
                 mode="M40">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1'] | self::hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | self::hl7:statusCode[@code = 'completed'] | self::hl7:component[not(@nullFlavor)][hl7:observation])]"
                       id="d16e4830-true-d21489e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis)/d16e4830-true-d21489e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1'] | hl7:code[(@code = '8319008' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | hl7:statusCode[@code = 'completed'] | hl7:component[not(@nullFlavor)][hl7:observation] (rule-reference: d16e4830-true-d21489e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M40"/>
   </xsl:template>

	  <!--RULE d16e4852-true-d21521e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/*[not(@xsi:nil = 'true')][not(self::hl7:observation[not(@nullFlavor)])]"
                 priority="1001"
                 mode="M40">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/*[not(@xsi:nil = 'true')][not(self::hl7:observation[not(@nullFlavor)])]"
                       id="d16e4852-true-d21521e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis)/d16e4852-true-d21521e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[not(@nullFlavor)] (rule-reference: d16e4852-true-d21521e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M40"/>
   </xsl:template>

	  <!--RULE d16e4856-true-d21541e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/*[not(@xsi:nil = 'true')][not(self::hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | self::hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | self::hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor])]"
                 priority="1000"
                 mode="M40">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.1']]/hl7:component[not(@nullFlavor)][hl7:observation]/hl7:observation[not(@nullFlavor)]/*[not(@xsi:nil = 'true')][not(self::hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | self::hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | self::hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor])]"
                       id="d16e4856-true-d21541e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaPrincipalDiagnosis)/d16e4856-true-d21541e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] (rule-reference: d16e4856-true-d21541e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M40"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M40"/>
   <xsl:template match="@*|node()" priority="-2" mode="M40">
      <xsl:apply-templates select="*" mode="M40"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.14-2018-06-30T000000[4] Dane informatora dla fragmentu treści dokumentu-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Dane informatora dla fragmentu treści dokumentu</svrl:text>

	  <!--RULE d16e4892-false-d21604e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']]"
                 priority="1001"
                 mode="M41">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']]"
                       id="d16e4892-false-d21604e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyInformant): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyInformant): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']] | hl7:relatedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyInformant): choice (hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]  or  hl7:relatedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyInformant): choice (hl7:assignedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.49']]  or  hl7:relatedEntity[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.50']]) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M41"/>
   </xsl:template>

	  <!--RULE d16e4919-false-d21671e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']"
                 priority="1000"
                 mode="M41">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.14']"
                       id="d16e4919-false-d21671e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.14')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.14')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyInformant): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.14'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M41"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M41"/>
   <xsl:template match="@*|node()" priority="-2" mode="M41">
      <xsl:apply-templates select="*" mode="M41"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.15-2018-06-30T000000[4] Dane podmiotu związanego z fragmentem treści dokumentu-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Dane podmiotu związanego z fragmentem treści dokumentu</svrl:text>

	  <!--RULE d16e4932-false-d21750e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]"
                 priority="1007"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]"
                       id="d16e4932-false-d21750e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:awarenessCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:awarenessCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:awarenessCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:relatedSubject[@classCode]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:relatedSubject[@classCode]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:relatedSubject[@classCode] is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:relatedSubject[@classCode]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:relatedSubject[@classCode]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:relatedSubject[@classCode] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e4989-false-d21784e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']"
                 priority="1006"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']"
                       id="d16e4989-false-d21784e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.15')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.15')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.15'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e4994-false-d21798e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:awarenessCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1005"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:awarenessCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e4994-false-d21798e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10310-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The element value SHALL be one of '2.16.840.1.113883.1.11.10310 TargetAwareness (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e4999-false-d21815e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]"
                 priority="1004"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]"
                       id="d16e4999-false-d21815e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@classCode"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@classCode">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): attribute @classCode SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="theAttValue"
                    select="distinct-values(tokenize(normalize-space(@classCode),'\s'))"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19368-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@classCode) or empty($theAttValue[not(. = (doc('include/voc-2.16.840.1.113883.1.11.19368-DYNAMIC.xml')/*/valueSet/conceptList/concept/@code))])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The value for classCode SHALL be selected from value set '2.16.840.1.113883.1.11.19368' x_DocumentSubject (DYNAMIC).</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:subject) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:subject) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:subject appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e5006-false-d21864e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1003"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:code[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e5006-false-d21864e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.19563-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The element value SHALL be one of '2.16.840.1.113883.1.11.19563 PersonalRelationshipRoleType (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e5015-false-d21897e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject"
                 priority="1002"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject"
                       id="d16e5015-false-d21897e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('PSN') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('PSN') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The value for classCode SHALL be 'PSN'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@determinerCode) = ('INSTANCE') or not(@determinerCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The value for determinerCode SHALL be 'INSTANCE'. Found: "<xsl:text/>
                  <xsl:value-of select="@determinerCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:birthTime) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:birthTime) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): element hl7:birthTime appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e5023-false-d21943e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject/hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1001"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject/hl7:administrativeGenderCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e5023-false-d21943e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.1-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): The element value SHALL be one of '2.16.840.1.113883.1.11.1 AdministrativeGender (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

	  <!--RULE d16e5028-false-d21960e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject/hl7:birthTime"
                 priority="1000"
                 mode="M42">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.15']]/hl7:relatedSubject[@classCode]/hl7:subject/hl7:birthTime"
                       id="d16e5028-false-d21960e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="concat(substring(@value,1,4),'-',substring(@value,5,2),'-',substring(@value,7,2)) castable as xs:date">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodySubject): Pierwsze 8 cyfr daty urodzenia powinno być w formacie YYYYMMDD.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M42"/>
   <xsl:template match="@*|node()" priority="-2" mode="M42">
      <xsl:apply-templates select="*" mode="M42"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.18-2018-06-30T000000[4] Autor fragmentu treści dokumentu-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Autor fragmentu treści dokumentu</svrl:text>

	  <!--RULE d16e5037-false-d21994e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]"
                 priority="1004"
                 mode="M43">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]"
                       id="d16e5037-false-d21994e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:time is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:time) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:time) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:time appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedAuthor) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedAuthor) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:assignedAuthor is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:assignedAuthor) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:assignedAuthor) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:assignedAuthor appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>

	  <!--RULE d16e5083-false-d22055e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']"
                 priority="1003"
                 mode="M43">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']"
                       id="d16e5083-false-d22055e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.18')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.18')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.18'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>

	  <!--RULE d16e5088-false-d22069e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1002"
                 mode="M43">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:functionCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e5088-false-d22069e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.10267-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): The element value SHALL be one of '2.16.840.1.113883.1.11.10267 ParticipationFunction (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>

	  <!--RULE d16e5095-false-d22113e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:assignedAuthor"
                 priority="1001"
                 mode="M43">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:assignedAuthor"
                       id="d16e5095-false-d22113e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('ASSIGNED') or not(@classCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('ASSIGNED') or not(@classCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): The value for classCode SHALL be 'ASSIGNED'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:id) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(hl7:id) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:id is required [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] | hl7:assignedAuthoringDevice[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): choice (hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]  or  hl7:assignedAuthoringDevice[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>

	  <!--RULE d16e5101-false-d22195e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:assignedAuthor/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                 priority="1000"
                 mode="M43">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.18']]/hl7:assignedAuthor/hl7:code[@codeSystem = '2.16.840.1.113883.5.111' or @nullFlavor]"
                       id="d16e5101-false-d22195e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.5.111')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseBodyAuthor): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.5.111''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M43"/>
   <xsl:template match="@*|node()" priority="-2" mode="M43">
      <xsl:apply-templates select="*" mode="M43"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.2-2018-09-30T000000[4] Rozpoznania dodatkowe-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Rozpoznania dodatkowe</svrl:text>

	  <!--RULE d16e5122-false-d22292e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]"
                 priority="1009"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]"
                       id="d16e5122-false-d22292e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5160-false-d22309e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]"
                 priority="1008"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]"
                       id="d16e5160-false-d22309e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('BATTERY')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('BATTERY')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for classCode SHALL be 'BATTERY'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = 'completed']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:statusCode[@code = 'completed'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:statusCode[@code = 'completed']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:statusCode[@code = 'completed'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5166-false-d22357e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']"
                 priority="1007"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']"
                       id="d16e5166-false-d22357e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.2')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.2')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.2'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5171-false-d22369e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]"
                 priority="1006"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor]"
                       id="d16e5171-false-d22369e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='85097005' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Secondary diagnosis' and @codeSystemName='SNOMED CT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='85097005' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Secondary diagnosis' and @codeSystemName='SNOMED CT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The element value SHALL be one of 'code '85097005' codeSystem '2.16.840.1.113883.6.96' displayName='Secondary diagnosis' codeSystemName='SNOMED CT''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5176-false-d22383e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:statusCode[@code = 'completed']"
                 priority="1005"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:statusCode[@code = 'completed']"
                       id="d16e5176-false-d22383e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@code='completed')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@code='completed')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The element value SHALL be one of 'code 'completed''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5182-false-d22396e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]"
                 priority="1004"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]"
                       id="d16e5182-false-d22396e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@typeCode) = ('COMP') or not(@typeCode)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@typeCode) = ('COMP') or not(@typeCode)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for typeCode SHALL be 'COMP'. Found: "<xsl:text/>
                  <xsl:value-of select="@typeCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5186-false-d22416e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']"
                 priority="1003"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']"
                       id="d16e5186-false-d22416e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('OBS')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('OBS')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for classCode SHALL be 'OBS'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:variable name="elmcount"
                    select="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | hl7:code[@codeSystem='2.16.840.1.113883.6.260'])"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): choice (hl7:code[@codeSystem='2.16.840.1.113883.6.3']  or  hl7:code[@codeSystem='2.16.840.1.113883.6.260']) does not contain enough elements [min 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="$elmcount &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="$elmcount &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): choice (hl7:code[@codeSystem='2.16.840.1.113883.6.3']  or  hl7:code[@codeSystem='2.16.840.1.113883.6.260']) contains too many elements [max 1x]</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.3']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:code[@codeSystem='2.16.840.1.113883.6.3'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.260']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem='2.16.840.1.113883.6.260']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:code[@codeSystem='2.16.840.1.113883.6.260'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5194-false-d22455e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:code[@codeSystem='2.16.840.1.113883.6.3']"
                 priority="1002"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:code[@codeSystem='2.16.840.1.113883.6.3']"
                       id="d16e5194-false-d22455e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.3' and @codeSystemName='icd10')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.3' and @codeSystemName='icd10')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.6.3' codeSystemName='icd10''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or string-length(@code)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or string-length(@code)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): Attribute @code SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5203-false-d22476e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:code[@codeSystem='2.16.840.1.113883.6.260']"
                 priority="1001"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:code[@codeSystem='2.16.840.1.113883.6.260']"
                       id="d16e5203-false-d22476e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.260' and @codeSystemName='icd10DualCoding')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or (@codeSystem='2.16.840.1.113883.6.260' and @codeSystemName='icd10DualCoding')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.6.260' codeSystemName='icd10DualCoding''.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@code"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@code">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): attribute @code SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@code) or string-length(@code)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@code) or string-length(@code)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): Attribute @code SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@code"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@displayName"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@displayName">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): attribute @displayName SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@displayName) or string-length(@displayName)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@displayName) or string-length(@displayName)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): Attribute @displayName SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@displayName"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

	  <!--RULE d16e5213-false-d22502e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M44">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e5213-false-d22502e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.80 Strona ciała w rozpoznaniu (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M44"/>
   <xsl:template match="@*|node()" priority="-2" mode="M44">
      <xsl:apply-templates select="*" mode="M44"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.2-2018-09-30T000000-closed[4] Rozpoznania dodatkowe-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Rozpoznania dodatkowe</svrl:text>

	  <!--RULE d16e5122-true-d22532e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/*[not(@xsi:nil = 'true')][not(self::hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']])]"
                 priority="1003"
                 mode="M45">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/*[not(@xsi:nil = 'true')][not(self::hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']])]"
                       id="d16e5122-true-d22532e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis)/d16e5122-true-d22532e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']] (rule-reference: d16e5122-true-d22532e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M45"/>
   </xsl:template>

	  <!--RULE d16e5160-true-d22568e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2'] | self::hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | self::hl7:statusCode[@code = 'completed'] | self::hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']])]"
                 priority="1002"
                 mode="M45">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2'] | self::hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | self::hl7:statusCode[@code = 'completed'] | self::hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']])]"
                       id="d16e5160-true-d22568e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis)/d16e5160-true-d22568e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2'] | hl7:code[(@code = '85097005' and @codeSystem = '2.16.840.1.113883.6.96') or @nullFlavor] | hl7:statusCode[@code = 'completed'] | hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']] (rule-reference: d16e5160-true-d22568e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M45"/>
   </xsl:template>

	  <!--RULE d16e5182-true-d22600e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/*[not(@xsi:nil = 'true')][not(self::hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN'])]"
                 priority="1001"
                 mode="M45">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/*[not(@xsi:nil = 'true')][not(self::hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN'])]"
                       id="d16e5182-true-d22600e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis)/d16e5182-true-d22600e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN'] (rule-reference: d16e5182-true-d22600e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M45"/>
   </xsl:template>

	  <!--RULE d16e5186-true-d22620e0-->
   <xsl:template match="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/*[not(@xsi:nil = 'true')][not(self::hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | self::hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | self::hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor])]"
                 priority="1000"
                 mode="M45">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]]/hl7:organizer[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.2']]/hl7:component[not(@nullFlavor)][hl7:observation[@classCode = 'OBS'][@moodCode = 'EVN']]/hl7:observation[not(@nullFlavor)][@classCode = 'OBS'][@moodCode = 'EVN']/*[not(@xsi:nil = 'true')][not(self::hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | self::hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | self::hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor])]"
                       id="d16e5186-true-d22620e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaSecondaryDiagnosis)/d16e5186-true-d22620e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[@codeSystem='2.16.840.1.113883.6.3'] | hl7:code[@codeSystem='2.16.840.1.113883.6.260'] | hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.80-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] (rule-reference: d16e5186-true-d22620e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M45"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M45"/>
   <xsl:template match="@*|node()" priority="-2" mode="M45">
      <xsl:apply-templates select="*" mode="M45"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.25-2018-06-30T000000[4] Urządzenie (bazowy)-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Urządzenie (bazowy)</svrl:text>

	  <!--RULE d16e5222-false-d22649e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]"
                 priority="1002"
                 mode="M46">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]"
                       id="d16e5222-false-d22649e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:code[@codeSystem = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/completeCodeSystem/@codeSystem or concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:code[@codeSystem = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/completeCodeSystem/@codeSystem or concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): element hl7:code[@codeSystem = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/completeCodeSystem/@codeSystem or concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:manufacturerModelName) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:manufacturerModelName) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): element hl7:manufacturerModelName appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:softwareName) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:softwareName) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): element hl7:softwareName appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M46"/>
   </xsl:template>

	  <!--RULE d16e5246-false-d22687e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']"
                 priority="1001"
                 mode="M46">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']"
                       id="d16e5246-false-d22687e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.25')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.25')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.25'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M46"/>
   </xsl:template>

	  <!--RULE d16e5251-false-d22701e0-->
   <xsl:template match="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]/hl7:code[@codeSystem = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/completeCodeSystem/@codeSystem or concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                 priority="1000"
                 mode="M46">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.25']]/hl7:code[@codeSystem = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/completeCodeSystem/@codeSystem or concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem) or @nullFlavor]"
                       id="d16e5251-false-d22701e0"/>
      <xsl:variable name="theCode" select="@code"/>
      <xsl:variable name="theCodeSystem" select="@codeSystem"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem] | completeCodeSystem[@codeSystem=$theCodeSystem]])"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.1.11.16040-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem] | completeCodeSystem[@codeSystem=$theCodeSystem]])">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaBaseDevice): The element value SHALL be one of '2.16.840.1.113883.1.11.16040 EntityCode (DYNAMIC)'.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M46"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M46"/>
   <xsl:template match="@*|node()" priority="-2" mode="M46">
      <xsl:apply-templates select="*" mode="M46"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.49-2018-06-30T000000[4] Dokument w postaci binarnej-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Dokument w postaci binarnej</svrl:text>

	  <!--RULE d16e5261-false-d22742e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]"
                 priority="1004"
                 mode="M47">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]"
                       id="d16e5261-false-d22742e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>

	  <!--RULE d16e5285-false-d22759e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]"
                 priority="1003"
                 mode="M47">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]"
                       id="d16e5285-false-d22759e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@ID) = ('DOCUMENT_CONTENT')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@ID) = ('DOCUMENT_CONTENT')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): The value for ID SHALL be 'DOCUMENT_CONTENT'. Found: "<xsl:text/>
                  <xsl:value-of select="@ID"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@ID) or string-length(@ID)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@ID) or string-length(@ID)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): Attribute @ID SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@ID"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@classCode) = ('OBS')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@classCode) = ('OBS')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): The value for classCode SHALL be 'OBS'. Found: "<xsl:text/>
                  <xsl:value-of select="@classCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@moodCode) = ('EVN')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@moodCode) = ('EVN')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): The value for moodCode SHALL be 'EVN'. Found: "<xsl:text/>
                  <xsl:value-of select="@moodCode"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49'] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49'] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:value[not(@nullFlavor)]) &gt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:value[not(@nullFlavor)] is mandatory [min 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:value[not(@nullFlavor)]) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:value[not(@nullFlavor)] appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>

	  <!--RULE d16e5293-false-d22803e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']"
                 priority="1002"
                 mode="M47">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']"
                       id="d16e5293-false-d22803e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.49')"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.49')">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.49'. Found: "<xsl:text/>
                  <xsl:value-of select="@root"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>

	  <!--RULE d16e5301-false-d22822e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]"
                 priority="1001"
                 mode="M47">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]"
                       id="d16e5301-false-d22822e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="string(@representation) = ('B64') or not(@representation)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="string(@representation) = ('B64') or not(@representation)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): The value for representation SHALL be 'B64'. Found: "<xsl:text/>
                  <xsl:value-of select="@representation"/>
                  <xsl:text/>"</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@mediaType"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@mediaType">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): attribute @mediaType SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@mediaType) or (string-length(@mediaType) &gt; 0 and not(matches(@mediaType,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@mediaType) or (string-length(@mediaType) &gt; 0 and not(matches(@mediaType,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): Attribute @mediaType SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@mediaType"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@compression) or (string-length(@compression) &gt; 0 and not(matches(@compression,'\s')))"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@compression) or (string-length(@compression) &gt; 0 and not(matches(@compression,'\s')))">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): Attribute @compression SHALL be of data type 'cs'  - '<xsl:text/>
                  <xsl:value-of select="@compression"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--REPORT error-->
      <xsl:if test="@representation and  hl7:reference">
         <svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                 test="@representation and hl7:reference">
            <xsl:attribute name="role">error</xsl:attribute>
            <xsl:attribute name="location">
               <xsl:apply-templates select="." mode="schematron-select-full-path"/>
            </xsl:attribute>
            <svrl:text>(plCdaDocumentBinaryContentEntry): Nie może istnieć jednocześnie wskazanie zawartości w postaci Base64 i referencja do dokumentu zewnętrznego.</svrl:text>
         </svrl:successful-report>
      </xsl:if>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="count(hl7:reference) &lt;= 1"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="count(hl7:reference) &lt;= 1">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): element hl7:reference appears too often [max 1x].</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>

	  <!--RULE d16e5309-false-d22848e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]/hl7:reference"
                 priority="1000"
                 mode="M47">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]/hl7:reference"
                       id="d16e5309-false-d22848e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="@value"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@value">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): attribute @value SHALL be present.</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(@value) or string-length(@value)&gt;0"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                                test="not(@value) or string-length(@value)&gt;0">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry): Attribute @value SHALL be of data type 'st'  - '<xsl:text/>
                  <xsl:value-of select="@value"/>
                  <xsl:text/>'</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M47"/>
   <xsl:template match="@*|node()" priority="-2" mode="M47">
      <xsl:apply-templates select="*" mode="M47"/>
   </xsl:template>

   <!--PATTERN template-2.16.840.1.113883.3.4424.13.10.4.49-2018-06-30T000000-closed[4] Dokument w postaci binarnej-->
   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">[4] Dokument w postaci binarnej</svrl:text>

	  <!--RULE d16e5261-true-d22874e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/*[not(@xsi:nil = 'true')][not(self::hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']])]"
                 priority="1002"
                 mode="M48">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/*[not(@xsi:nil = 'true')][not(self::hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']])]"
                       id="d16e5261-true-d22874e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry)/d16e5261-true-d22874e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']] (rule-reference: d16e5261-true-d22874e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M48"/>
   </xsl:template>

	  <!--RULE d16e5285-true-d22901e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49'] | self::hl7:id | self::hl7:value[not(@nullFlavor)])]"
                 priority="1001"
                 mode="M48">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49'] | self::hl7:id | self::hl7:value[not(@nullFlavor)])]"
                       id="d16e5285-true-d22901e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry)/d16e5285-true-d22901e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49'] | hl7:id | hl7:value[not(@nullFlavor)] (rule-reference: d16e5285-true-d22901e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M48"/>
   </xsl:template>

	  <!--RULE d16e5301-true-d22926e0-->
   <xsl:template match="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]/*[not(@xsi:nil = 'true')][not(self::hl7:reference)]"
                 priority="1000"
                 mode="M48">
      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
                       context="*[hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]]/hl7:observationMedia[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.49']]/hl7:value[not(@nullFlavor)]/*[not(@xsi:nil = 'true')][not(self::hl7:reference)]"
                       id="d16e5301-true-d22926e0"/>

		    <!--ASSERT error-->
      <xsl:choose>
         <xsl:when test="not(.)"/>
         <xsl:otherwise>
            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(.)">
               <xsl:attribute name="role">error</xsl:attribute>
               <xsl:attribute name="location">
                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>
               </xsl:attribute>
               <svrl:text>(plCdaDocumentBinaryContentEntry)/d16e5301-true-d22926e0: '<xsl:text/>
                  <xsl:value-of select="name(..)"/>
                  <xsl:text/>' is defined as closed, and this element '<xsl:text/>
                  <xsl:value-of select="name(.)"/>
                  <xsl:text/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:reference (rule-reference: d16e5301-true-d22926e0)</svrl:text>
            </svrl:failed-assert>
         </xsl:otherwise>
      </xsl:choose>
      <xsl:apply-templates select="*" mode="M48"/>
   </xsl:template>
   <xsl:template match="text()" priority="-1" mode="M48"/>
   <xsl:template match="@*|node()" priority="-2" mode="M48">
      <xsl:apply-templates select="*" mode="M48"/>
   </xsl:template>
</xsl:stylesheet>
