<?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-closed">
   <title>[4] Ocena objawów osłuchiwania płuc</title>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']]]/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']])]"
         id="d16e8743-true-d35860e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e8743-true-d35860e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248']] (rule-reference: d16e8743-true-d35860e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']]/*[not(@xsi:nil = 'true')][not(self::hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248'] | self::hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS'] | self::hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN'])]"
         id="d16e8980-true-d35898e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e8980-true-d35898e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.248'] | hl7:code[(@code = 'OP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSP'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPTR'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPRZ'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPFU'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPSW'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPBS'] | hl7:entryRelationship[hl7:observation/hl7:code/@code='OPIN'] (rule-reference: d16e8980-true-d35898e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9002-true-d35930e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9002-true-d35930e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9002-true-d35930e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9006-true-d35965e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9006-true-d35965e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPSP' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9006-true-d35965e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9031-true-d35999e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9031-true-d35999e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9031-true-d35999e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9035-true-d36034e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9035-true-d36034e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPTR' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9035-true-d36034e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9060-true-d36068e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9060-true-d36068e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9060-true-d36068e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9064-true-d36103e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9064-true-d36103e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPRZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9064-true-d36103e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9089-true-d36137e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9089-true-d36137e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9089-true-d36137e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9093-true-d36172e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9093-true-d36172e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPFU' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9093-true-d36172e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9118-true-d36206e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9118-true-d36206e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9118-true-d36206e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9122-true-d36241e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9122-true-d36241e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPSW' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9122-true-d36241e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9147-true-d36275e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9147-true-d36275e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9147-true-d36275e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::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="d16e9151-true-d36310e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9151-true-d36310e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPBS' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | 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)] (rule-reference: d16e9151-true-d36310e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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']/*[not(@xsi:nil = 'true')][not(self::hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]])]"
         id="d16e9177-true-d36344e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9177-true-d36344e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:observation[hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]] (rule-reference: d16e9177-true-d36344e0)</assert>
   </rule>

   <!-- Checking undefined contents for template/element @isClosed="true". Match context that we did not already match -->
   <rule fpi="RUL-QQQ"
         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')]]/*[not(@xsi:nil = 'true')][not(self::hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | self::hl7:statusCode[@code = 'completed'] | self::hl7:value[not(@nullFlavor)] | self::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="d16e9181-true-d36384e0">
      <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="not(.)">(plCdaBreathSoundsFindingEntry)/d16e9181-true-d36384e0: '<value-of select="name(..)"/>' is defined as closed, and this element '<name/>' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context:  hl7:code[(@code = 'OPIN' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')] | hl7:statusCode[@code = 'completed'] | hl7:value[not(@nullFlavor)] | 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)] (rule-reference: d16e9181-true-d36384e0)</assert>
   </rule>
</pattern>
