<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.4.248
Name: [4] Ocena objawów osłuchiwania płuc
Description: Ocena objawów osłuchiwania płuc
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.4.248-2025-02-26T000000">
   <title>[4] Ocena objawów osłuchiwania płuc</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]
Item: (plCdaBreathSoundsFindingEntry)
-->

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]"
         id="d16e8980-false-d34929e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248'] 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.248-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248'] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS'] appears too often [max 2x].</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.248-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']) &lt;= 2">(plCdaBreathSoundsFindingEntry): element hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN'] appears too often [max 2x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']
Item: (plCdaBreathSoundsFindingEntry)
-->

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e8991-false-d35013e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OP' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Objawy osłuchiwania płuc' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OP' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Objawy osłuchiwania płuc' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:statusCode[@code = 'completed']"
         id="d16e8996-false-d35027e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']"
         id="d16e9002-false-d35038e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9006-false-d35060e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9012-false-d35106e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPSP' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Szmer pęcherzykowy' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPSP' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Szmer pęcherzykowy' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9017-false-d35120e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP']/hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9022-false-d35136e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']"
         id="d16e9031-false-d35151e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9035-false-d35173e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9041-false-d35219e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPTR' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Trzeszczenia' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPTR' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Trzeszczenia' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9046-false-d35233e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR']/hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9051-false-d35249e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']"
         id="d16e9060-false-d35264e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9064-false-d35286e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9070-false-d35332e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPRZ' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Rzężenia' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPRZ' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Rzężenia' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9075-false-d35346e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ']/hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9080-false-d35362e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']"
         id="d16e9089-false-d35377e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9093-false-d35399e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9099-false-d35445e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPFU' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Furczenia' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPFU' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Furczenia' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9104-false-d35459e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU']/hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9109-false-d35475e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']"
         id="d16e9118-false-d35490e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9122-false-d35512e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9128-false-d35558e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPSW' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Świsty' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPSW' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Świsty' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9133-false-d35572e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW']/hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9138-false-d35588e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']"
         id="d16e9147-false-d35603e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9151-false-d35625e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9157-false-d35671e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPBS' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Brak szmeru pęcherzykowego' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPBS' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Brak szmeru pęcherzykowego' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9162-false-d35685e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS']/hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9167-false-d35701e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']"
         id="d16e9177-false-d35716e0">
      <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.248-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] 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.248-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e9181-false-d35738e0">
      <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.248-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] 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.248-2025-02-26T000000.html"
              test="count(hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBreathSoundsFindingEntry): element hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e9187-false-d35792e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OPIN' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Inne objawy osłuchowe płuc' and @codeSystemName='ObjawyKliniczne')">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of 'code 'OPIN' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Inne objawy osłuchowe płuc' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e9192-false-d35806e0">
      <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.248-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBreathSoundsFindingEntry): 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.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:value[not(@nullFlavor)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.248
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBreathSoundsFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]/hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN']/hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:targetSiteCode[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]"
         id="d16e9200-false-d35830e0">
      <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.4.248-2025-02-26T000000.html"
              test="@nullFlavor or exists(doc('include/voc-2.16.840.1.113883.3.4424.13.11.243-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem]])">(plCdaBreathSoundsFindingEntry): The element value SHALL be one of '2.16.840.1.113883.3.4424.13.11.243 Strona ciała (DYNAMIC)'.</assert>
   </rule>
</pattern>
