<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.4.244
Name: [4] Ciśnienie tętnicze
Description: Ciśnienie tętnicze
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.4.244-2025-02-26T000000">
   <title>[4] Ciśnienie tętnicze</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]"
         id="d16e8440-false-d33814e0">
      <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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]"
         id="d16e8489-false-d33831e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBloodPressureEntry): The value for classCode SHALL be 'OBS'. 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.4.244-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBloodPressureEntry): The value for moodCode SHALL be 'EVN'. Found: "<value-of select="@moodCode"/>"</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.4.244-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']) &gt;= 1">(plCdaBloodPressureEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:value[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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:value[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.4.244-2025-02-26T000000.html"
              test="count(hl7:component[hl7:procedure/hl7:code/@code='271649006']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:component[hl7:procedure/hl7:code/@code='271649006'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:component[hl7:procedure/hl7:code/@code='271650006']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:component[hl7:procedure/hl7:code/@code='271650006'] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']"
         id="d16e8495-false-d33891e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@root) = ('2.16.840.1.113883.3.4424.13.10.4.244')">(plCdaBloodPressureEntry): The value for root SHALL be '2.16.840.1.113883.3.4424.13.10.4.244'. Found: "<value-of select="@root"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:code[(@code = '75367002' and @codeSystem = '2.16.840.1.113883.6.96')]"
         id="d16e8500-false-d33903e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='75367002' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Blood pressure (observable entity)' and @codeSystemName='SNOMED-CT')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code '75367002' codeSystem '2.16.840.1.113883.6.96' displayName='Blood pressure (observable entity)' codeSystemName='SNOMED-CT''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:statusCode[@code = 'completed']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:statusCode[@code = 'completed']"
         id="d16e8505-false-d33917e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code 'completed''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:value[not(@nullFlavor)]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:value[not(@nullFlavor)]"
         id="d16e8511-false-d33930e0">
      <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.4.244-2025-02-26T000000.html"
              test="@value">(plCdaBloodPressureEntry): attribute @value 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.4.244-2025-02-26T000000.html"
              test="not(@value) or matches(string(@value), '^[-+]?\d*\.?[0-9]+([eE][-+]?\d+)?$')">(plCdaBloodPressureEntry): Attribute @value is not a valid real number <value-of select="@value"/>
      </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.4.244-2025-02-26T000000.html"
              test="string(@unit) = ('{beats}/min')">(plCdaBloodPressureEntry): The value for unit SHALL be '{beats}/min'. Found: "<value-of select="@unit"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']"
         id="d16e8523-false-d33944e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP') or not(@typeCode)">(plCdaBloodPressureEntry): The value for typeCode SHALL be 'COMP'. 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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]"
         id="d16e8527-false-d33966e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS') or not(@classCode)">(plCdaBloodPressureEntry): The value for classCode SHALL be 'OBS'. 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.4.244-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN') or not(@moodCode)">(plCdaBloodPressureEntry): The value for moodCode SHALL be 'EVN'. Found: "<value-of select="@moodCode"/>"</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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:value[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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:value[not(@nullFlavor)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]"
         id="d16e8533-false-d34009e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='271649006' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Systolic blood pressure (observable entity)' and @codeSystemName='SNOMED-CT')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code '271649006' codeSystem '2.16.840.1.113883.6.96' displayName='Systolic blood pressure (observable entity)' codeSystemName='SNOMED-CT''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:statusCode[@code = 'completed']"
         id="d16e8538-false-d34023e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code 'completed''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:value[not(@nullFlavor)]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271649006']/hl7:observation[hl7:code[(@code = '271649006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:value[not(@nullFlavor)]"
         id="d16e8543-false-d34036e0">
      <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.4.244-2025-02-26T000000.html"
              test="@value">(plCdaBloodPressureEntry): attribute @value 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.4.244-2025-02-26T000000.html"
              test="not(@value) or matches(string(@value), '^[-+]?\d*\.?[0-9]+([eE][-+]?\d+)?$')">(plCdaBloodPressureEntry): Attribute @value is not a valid real number <value-of select="@value"/>
      </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.4.244-2025-02-26T000000.html"
              test="string(@unit) = ('mm[Hg]')">(plCdaBloodPressureEntry): The value for unit SHALL be 'mm[Hg]'. Found: "<value-of select="@unit"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']"
         id="d16e8557-false-d34050e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP') or not(@typeCode)">(plCdaBloodPressureEntry): The value for typeCode SHALL be 'COMP'. 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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]"
         id="d16e8561-false-d34072e0">
      <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.4.244-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS') or not(@classCode)">(plCdaBloodPressureEntry): The value for classCode SHALL be 'OBS'. 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.4.244-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN') or not(@moodCode)">(plCdaBloodPressureEntry): The value for moodCode SHALL be 'EVN'. Found: "<value-of select="@moodCode"/>"</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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBloodPressureEntry): element hl7:statusCode[@code = 'completed'] 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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">(plCdaBloodPressureEntry): element hl7:value[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.4.244-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">(plCdaBloodPressureEntry): element hl7:value[not(@nullFlavor)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]"
         id="d16e8567-false-d34115e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='271650006' and @codeSystem='2.16.840.1.113883.6.96' and @displayName='Diastolic blood pressure (observable entity)' and @codeSystemName='SNOMED-CT')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code '271650006' codeSystem '2.16.840.1.113883.6.96' displayName='Diastolic blood pressure (observable entity)' codeSystemName='SNOMED-CT''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:statusCode[@code = 'completed']"
         id="d16e8572-false-d34129e0">
      <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.4.244-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBloodPressureEntry): The element value SHALL be one of 'code 'completed''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.244
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:value[not(@nullFlavor)]
Item: (plCdaBloodPressureEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.244']]/hl7:component[hl7:procedure/hl7:code/@code='271650006']/hl7:observation[hl7:code[(@code = '271650006' and @codeSystem = '2.16.840.1.113883.6.96')]]/hl7:value[not(@nullFlavor)]"
         id="d16e8577-false-d34142e0">
      <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.4.244-2025-02-26T000000.html"
              test="@value">(plCdaBloodPressureEntry): attribute @value 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.4.244-2025-02-26T000000.html"
              test="not(@value) or matches(string(@value), '^[-+]?\d*\.?[0-9]+([eE][-+]?\d+)?$')">(plCdaBloodPressureEntry): Attribute @value is not a valid real number <value-of select="@value"/>
      </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.4.244-2025-02-26T000000.html"
              test="string(@unit) = ('mm[Hg]')">(plCdaBloodPressureEntry): The value for unit SHALL be 'mm[Hg]'. Found: "<value-of select="@unit"/>"</assert>
   </rule>
</pattern>
