<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.4.272
Name: [4] Ocena temperatury ciała
Description: Ocena temperatury ciała
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.4.272-2025-02-26T000000">
   <title>[4] Ocena temperatury ciała</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]
Item: (plCdaBodyTemperatureFindingEntry)
-->

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]"
         id="d16e10514-false-d40984e0">
      <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.272-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272'] 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.272-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272'] 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.272-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '386725007' and @codeSystem = '2.16.840.1.113883.6.96')]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:code[(@code = '386725007' and @codeSystem = '2.16.840.1.113883.6.96')] is mandatory [min 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.4.272-2025-02-26T000000.html"
              test="count(hl7:code[(@code = '386725007' and @codeSystem = '2.16.840.1.113883.6.96')]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:code[(@code = '386725007' and @codeSystem = '2.16.840.1.113883.6.96')] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.4.272-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:value[not(@nullFlavor)]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' 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.272-2025-02-26T000000.html"
              test="count(hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' 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.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']
Item: (plCdaBodyTemperatureFindingEntry)
-->

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

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:statusCode[@code = 'completed']"
         id="d16e10530-false-d41071e0">
      <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.272-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBodyTemperatureFindingEntry): 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.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:value[not(@nullFlavor)]
Item: (plCdaBodyTemperatureFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:value[not(@nullFlavor)]"
         id="d16e10536-false-d41084e0">
      <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.272-2025-02-26T000000.html"
              test="@value">(plCdaBodyTemperatureFindingEntry): attribute @value SHALL be present.</assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.4.272-2025-02-26T000000.html"
              test="not(@value) or matches(string(@value), '^[-+]?\d*\.?[0-9]+([eE][-+]?\d+)?$')">(plCdaBodyTemperatureFindingEntry): Attribute @value is not a valid real number <value-of select="@value"/>
      </assert>
      <assert role="error"
              see="https://www.csioz.gov.pl/HL7POL/pl-cda-html-pl-PL/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.4.272-2025-02-26T000000.html"
              test="string(@unit) = ('cel')">(plCdaBodyTemperatureFindingEntry): The value for unit SHALL be 'cel'. Found: "<value-of select="@unit"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]
Item: (plCdaBodyTemperatureFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]"
         id="d16e10548-false-d41101e0">
      <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.272-2025-02-26T000000.html"
              test="string(@typeCode) = ('COMP')">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:observation[hl7:code[(@code = 'TC' 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.272-2025-02-26T000000.html"
              test="count(hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:observation[hl7:code[(@code = 'TC' 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.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]
Item: (plCdaBodyTemperatureFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]"
         id="d16e10552-false-d41123e0">
      <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.272-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:code[(@code = 'TC' 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.272-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:code[(@code = 'TC' 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.272-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaBodyTemperatureFindingEntry): 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.272-2025-02-26T000000.html"
              test="count(hl7:value[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.238-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &gt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:value[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.238-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.272-2025-02-26T000000.html"
              test="count(hl7:value[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.238-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]) &lt;= 1">(plCdaBodyTemperatureFindingEntry): element hl7:value[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.238-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.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]
Item: (plCdaBodyTemperatureFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]"
         id="d16e10558-false-d41169e0">
      <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.272-2025-02-26T000000.html"
              test="@nullFlavor or (@code='TC' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.11' and @displayName='Temperatura ciała' and @codeSystemName='ObjawyKliniczne')">(plCdaBodyTemperatureFindingEntry): The element value SHALL be one of 'code 'TC' codeSystem '2.16.840.1.113883.3.4424.13.5.30.11' displayName='Temperatura ciała' codeSystemName='ObjawyKliniczne''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']
Item: (plCdaBodyTemperatureFindingEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:statusCode[@code = 'completed']"
         id="d16e10563-false-d41183e0">
      <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.272-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaBodyTemperatureFindingEntry): 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.272
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.272']]/hl7:entryRelationship[hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]]/hl7:observation[hl7:code[(@code = 'TC' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.11')]]/hl7:value[concat(@code, @codeSystem) = doc('include/voc-2.16.840.1.113883.3.4424.13.11.238-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codeSystem)]
Item: (plCdaBodyTemperatureFindingEntry)
-->

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