<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.4.328
Name: [4] Obecność oparzeń wziewnych
Description: Obecność oparzeń wziewnych
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.4.328-2025-02-26T000000">
   <title>[4] Obecność oparzeń wziewnych</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.328
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]
Item: (plCdaAirwayBurnEntry)
-->

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]"
         id="d16e14847-false-d57182e0">
      <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.328-2025-02-26T000000.html"
              test="string(@classCode) = ('OBS')">(plCdaAirwayBurnEntry): 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.328-2025-02-26T000000.html"
              test="string(@moodCode) = ('EVN')">(plCdaAirwayBurnEntry): 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.328-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']) &gt;= 1">(plCdaAirwayBurnEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328'] 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.328-2025-02-26T000000.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']) &lt;= 1">(plCdaAirwayBurnEntry): element hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328'] 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.328-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OWZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.13')]) &gt;= 1">(plCdaAirwayBurnEntry): element hl7:code[(@code = 'OWZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.13')] 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.328-2025-02-26T000000.html"
              test="count(hl7:code[(@code = 'OWZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.13')]) &lt;= 1">(plCdaAirwayBurnEntry): element hl7:code[(@code = 'OWZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.13')] 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.328-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &gt;= 1">(plCdaAirwayBurnEntry): 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.328-2025-02-26T000000.html"
              test="count(hl7:statusCode[@code = 'completed']) &lt;= 1">(plCdaAirwayBurnEntry): element hl7:statusCode[@code = 'completed'] appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.328
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]/hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']
Item: (plCdaAirwayBurnEntry)
-->

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

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]/hl7:code[(@code = 'OWZ' and @codeSystem = '2.16.840.1.113883.3.4424.13.5.30.13')]"
         id="d16e14858-false-d57238e0">
      <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.328-2025-02-26T000000.html"
              test="@nullFlavor or (@code='OWZ' and @codeSystem='2.16.840.1.113883.3.4424.13.5.30.13' and @displayName='Obecność oparzeń wziewnych' and @codeSystemName='RodzajeObserwacjiUrazowych')">(plCdaAirwayBurnEntry): The element value SHALL be one of 'code 'OWZ' codeSystem '2.16.840.1.113883.3.4424.13.5.30.13' displayName='Obecność oparzeń wziewnych' codeSystemName='RodzajeObserwacjiUrazowych''.</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.4.328
Context: *[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]/hl7:statusCode[@code = 'completed']
Item: (plCdaAirwayBurnEntry)
-->

   <rule fpi="RULC-1"
         context="*[hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]]/hl7:observation[hl7:templateId[@root = '2.16.840.1.113883.3.4424.13.10.4.328']]/hl7:statusCode[@code = 'completed']"
         id="d16e14863-false-d57252e0">
      <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.328-2025-02-26T000000.html"
              test="@nullFlavor or (@code='completed')">(plCdaAirwayBurnEntry): The element value SHALL be one of 'code 'completed''.</assert>
   </rule>
</pattern>
