<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.2.130
Name: [2] Autor karty medycznych czynności ratunkowych
Description: Szablon struktury CDA dla autora karty medycznych czynności ratunkowychc
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000">
   <title>[2] Autor karty medycznych czynności ratunkowych</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
Context: *[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         context="*[hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]]"
         id="d16e601-false-d7205e0">
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']]) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:author[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']] is mandatory [min 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="string(@typeCode) = ('AUT') or not(@typeCode)">(plCdaParamedicRescueSummaryNoteAuthor): The value for typeCode SHALL be 'AUT'. Found: "<value-of select="@typeCode"/>"</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="string(@contextControlCode) = ('OP') or not(@contextControlCode)">(plCdaParamedicRescueSummaryNoteAuthor): The value for contextControlCode SHALL be 'OP'. Found: "<value-of select="@contextControlCode"/>"</assert>
      <report role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              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')))">(plCdaParamedicRescueSummaryNoteAuthor): Wskazana pula numerów Prawa Wykonywania Zawodu jest nieprawidłowa w stosunku do wskazanego zawodu autora dokumentu.</report>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] is mandatory [min 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130']) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.130'] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              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">(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].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              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">(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].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:time[not(@nullFlavor)]) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:time[not(@nullFlavor)] is mandatory [min 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:time[not(@nullFlavor)]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:time[not(@nullFlavor)] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]] is required [min 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:assignedAuthor[hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]]) &lt;= 1">(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].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element extPL:boundedBy[extPL:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.44']] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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']
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.2.130')">(plCdaParamedicRescueSummaryNoteAuthor): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.2.130'. Found: "<value-of select="@root"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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">
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              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]])">(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)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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)]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="(@value=/hl7:ClinicalDocument/hl7:legalAuthenticator/hl7:time/@value) or (@value=/hl7:ClinicalDocument/hl7:authenticator/hl7:time/@value)">(plCdaParamedicRescueSummaryNoteAuthor): Data utworzenia dokumentu powinna być taka sama jak data wystawienia lub autoryzacji dokumentu.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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']]]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="string(@classCode) = ('ASSIGNED') or not(@classCode)">(plCdaParamedicRescueSummaryNoteAuthor): The value for classCode SHALL be 'ASSIGNED'. Found: "<value-of select="@classCode"/>"</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:id[not(@nullFlavor)]) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
      <let name="elmcount"
           value="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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="$elmcount &lt;= 1">(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]</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3']) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3'] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1']) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:code[@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1'] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &gt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] is required [min 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']] appears too often [max 1x].</assert>
      <let name="elmcount"
           value="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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="$elmcount &lt;= 1">(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]</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="count(hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]) &lt;= 1">(plCdaParamedicRescueSummaryNoteAuthor): element hl7:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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)]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="string(@nullFlavor) = ('NA') or not(@nullFlavor)">(plCdaParamedicRescueSummaryNoteAuthor): The value for nullFlavor SHALL be 'NA'. Found: "<value-of select="@nullFlavor"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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']
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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">
      <let name="theCode" value="@code"/>
      <let name="theCodeSystem" value="@codeSystem"/>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              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]])">(plCdaParamedicRescueSummaryNoteAuthor): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.21 Specjalizacja lekarza (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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']
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <rule fpi="RULC-1"
         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 role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="@nullFlavor or (@codeSystem='2.16.840.1.113883.3.4424.11.3.3.1')">(plCdaParamedicRescueSummaryNoteAuthor): The element value SHALL be one of 'codeSystem '2.16.840.1.113883.3.4424.11.3.3.1''.</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="@code">(plCdaParamedicRescueSummaryNoteAuthor): attribute @code SHALL be present.</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="not(@code) or (string-length(@code) &gt; 0 and not(matches(@code,'\s')))">(plCdaParamedicRescueSummaryNoteAuthor): Attribute @code SHALL be of data type 'cs'  - '<value-of select="@code"/>'</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="@displayName">(plCdaParamedicRescueSummaryNoteAuthor): attribute @displayName SHALL be present.</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.2.130-2025-02-26T000000.html"
              test="not(@displayName) or string-length(@displayName)&gt;0">(plCdaParamedicRescueSummaryNoteAuthor): Attribute @displayName SHALL be of data type 'st'  - '<value-of select="@displayName"/>'</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:addr
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:telecom
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->


   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:assignedPerson[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.1']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.15']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.17']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.18']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.2.130
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:representedOrganization[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.2.31']]
Item: (plCdaParamedicRescueSummaryNoteAuthor)
--></pattern>
