<?xml version="1.0" encoding="UTF-8"?>
<!--
Template derived pattern
===========================================
ID: 2.16.840.1.113883.3.4424.13.10.7.4
Name: [7] Adres organizacji w Polsce
Description: Wzorzec CDA dla adresu organizacji w Polsce
-->
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
         id="template-2.16.840.1.113883.3.4424.13.10.7.4-2020-06-08T000000">
   <title>[7] Adres organizacji w Polsce</title>
   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.7.4
Context: *[hl7:addr[hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.7.4']]
Item: (plCdaPolishOrganizationalAddr)
-->

   <!--
Template derived rules for ID: 2.16.840.1.113883.3.4424.13.10.7.4
Context: *[hl7:addr[hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.7.4']]/hl7:addr
Item: (plCdaPolishOrganizationalAddr)
-->

   <rule context="*[hl7:addr[hl7:templateId/@root='2.16.840.1.113883.3.4424.13.10.7.4']]/hl7:addr"
         id="tmp-">
      <assert role="error"
              see="https://www.cez.gov.pl/HL7POL-1.3.2/plcda-html-1.3.2/plcda-html/plcda-html-develop/tmp-2.16.840.1.113883.3.4424.13.10.7.4-2020-06-08T000000.html"
              test="(local-name-from-QName(resolve-QName(@xsi:type,.))='AD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(plCdaPolishOrganizationalAddr): Jeśli występuje instrukcja @xsi:type, to MUSI mieć wartość "{urn:hl7-org:v3}:AD", znaleziono "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))"/>}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))"/>"</assert>
      <extends rule="AD.PL.ORG"/>
      <let name="theValue" value="@value"/>
   </rule>
</pattern>
