<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.1937.777.63.10.694
Name: Confronto Con Precedenti Esami Eseguiti (Tele)
Description: Comparison With Previous Exams Performed (LOINC: X1-8 )
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248">
   <title>Confronto Con Precedenti Esami Eseguiti (Tele)</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <rule fpi="RULC-1"
         context="*[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]"
         id="d44e6339-false-d99620e0">
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@classCode) = ('DOCSECT') or not(@classCode)">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for classCode SHALL be 'DOCSECT'. Found: "<value-of select="@classCode"/>"</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@moodCode) = ('EVN') or not(@moodCode)">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for moodCode SHALL be 'EVN'. Found: "<value-of select="@moodCode"/>"</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:templateId[@root = '2.16.840.1.113883.3.1937.777.63.10.694']) &lt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:templateId[@root = '2.16.840.1.113883.3.1937.777.63.10.694'] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:id) &lt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:id appears too often [max 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]) &gt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')] is required [min 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]) &lt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')] appears too often [max 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:title) &lt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:title appears too often [max 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:text) &gt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:text is required [min 1x].</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="count(hl7:text) &lt;= 1">(Confronto Con Precedenti Esami Eseguiti (Tele)): element hl7:text appears too often [max 1x].</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:templateId[@root = '2.16.840.1.113883.3.1937.777.63.10.694']
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <rule fpi="RULC-1"
         context="*[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:templateId[@root = '2.16.840.1.113883.3.1937.777.63.10.694']"
         id="d44e6345-false-d99673e0">
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@root) = ('2.16.840.1.113883.3.1937.777.63.10.694')">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for root SHALL be '2.16.840.1.113883.3.1937.777.63.10.694'. Found: "<value-of select="@root"/>"</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:id
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <rule fpi="RULC-1"
         context="*[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]"
         id="d44e6352-false-d99693e0">
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@code) = ('93126-1')">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for code SHALL be '93126-1'. Found: "<value-of select="@code"/>"</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@codeSystem) = ('2.16.840.1.113883.6.1')">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for codeSystem SHALL be '2.16.840.1.113883.6.1'. Found: "<value-of select="@codeSystem"/>"</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="string(@codeSystemName) = ('LOINC') or not(@codeSystemName)">(Confronto Con Precedenti Esami Eseguiti (Tele)): The value for codeSystemName SHALL be 'LOINC'. Found: "<value-of select="@codeSystemName"/>"</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="not(@codeSystemName) or string-length(@codeSystemName)&gt;0">(Confronto Con Precedenti Esami Eseguiti (Tele)): Attribute @codeSystemName SHALL be of data type 'st'  - '<value-of select="@codeSystemName"/>'</assert>
      <assert role="error"
              see="https://hl7itig.art-decor.pub/hl7itig-html-20251014T164917/tmp-2.16.840.1.113883.3.1937.777.63.10.694-2025-06-05T143248.html"
              test="not(@displayName) or string-length(@displayName)&gt;0">(Confronto Con Precedenti Esami Eseguiti (Tele)): Attribute @displayName SHALL be of data type 'st'  - '<value-of select="@displayName"/>'</assert>
   </rule>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:title
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.1937.777.63.10.694
Context: *[hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]]/hl7:section[hl7:code[(@code = '93126-1' and @codeSystem = '2.16.840.1.113883.6.1')]]/hl7:text
Item: (Confronto Con Precedenti Esami Eseguiti (Tele))
-->
</pattern>
