<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pl-lab-laboratorium" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics">
    <valueCode value="can-be-target" />
  </extension>
  <url value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-laboratorium" />
  <name value="Laboratorium" />
  <title value="Laboratorium" />
  <status value="draft" />
  <description value="Laboratorium" />
  <fhirVersion value="5.0.0" />
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-laboratorium" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Base" />
  <derivation value="specialization" />
  <snapshot>
    <element id="pl-lab-laboratorium">
      <path value="pl-lab-laboratorium" />
      <short value="Laboratorium" />
      <definition value="Laboratorium" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-laboratorium" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.identyfikator">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pl-lab-laboratorium.identyfikator" />
      <short value="Identyfikator laboratorium" />
      <definition value="Identyfikator laboratorium" />
      <comment value="The rules of the identifier.type  determine if a check digit is part of the ID value or sent separately, such as through the checkDigit extension." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pl-lab-laboratorium.identyfikator" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ident-1" />
        <severity value="warning" />
        <human value="Identifier with no value has limited utility.  If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason" />
        <expression value="value.exists()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Identifier" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Identifier" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.rodzajPracowni">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pl-lab-laboratorium.rodzajPracowni" />
      <short value="Rodzaj pracowni" />
      <definition value="Rodzaj pracowni laboratoryjnej" />
      <comment value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-laboratorium.rodzajPracowni" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Coding" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="cod-1" />
        <severity value="warning" />
        <human value="A Coding SHOULD NOT have a display unless a code is also present.  Computation on Coding.display alone is generally unsafe.  Consider using CodeableConcept.text" />
        <expression value="code.exists().not() implies display.exists().not()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Coding" />
      </constraint>
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org.pl/fhir/ig/pl-lab/ValueSet/pl-lab-serviceProviderType-VS" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CV" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.nazwa">
      <path value="pl-lab-laboratorium.nazwa" />
      <short value="Nazwa laboratorium" />
      <definition value="Nazwa laboratorium" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="pl-lab-laboratorium.nazwa" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.adres">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pl-lab-laboratorium.adres" />
      <short value="Adres laboratorium" />
      <definition value="Adres laboratorium" />
      <comment value="Note: address is intended to describe postal addresses for administrative purposes, not to describe absolute geographical coordinates.  Postal addresses are often used as proxies for physical locations (also see the [Location](location.html#) resource)." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pl-lab-laboratorium.adres" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Address" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="XAD" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="AD" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Address" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.telefon">
      <path value="pl-lab-laboratorium.telefon" />
      <short value="Telefon laboratorium" />
      <definition value="Telefon laboratorium" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-laboratorium.telefon" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.email">
      <path value="pl-lab-laboratorium.email" />
      <short value="Email laboratorium" />
      <definition value="Email laboratorium" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-laboratorium.email" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pl-lab-laboratorium.podmiotZarzadzajacy">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pl-lab-laboratorium.podmiotZarzadzajacy" />
      <short value="Podmiot zarządzający" />
      <definition value="Podmiot zarządzający laboratorium" />
      <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="pl-lab-laboratorium.podmiotZarzadzajacy" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-podmiotDiagnostyczny" />
      </type>
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <expression value="reference.exists()  implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <constraint>
        <key value="ref-2" />
        <severity value="error" />
        <human value="At least one of reference, identifier and display SHALL be present (unless an extension is provided)." />
        <expression value="reference.exists() or identifier.exists() or display.exists() or extension.exists()" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="pl-lab-laboratorium">
      <path value="pl-lab-laboratorium" />
      <short value="Laboratorium" />
      <definition value="Laboratorium" />
    </element>
    <element id="pl-lab-laboratorium.identyfikator">
      <path value="pl-lab-laboratorium.identyfikator" />
      <short value="Identyfikator laboratorium" />
      <definition value="Identyfikator laboratorium" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="pl-lab-laboratorium.rodzajPracowni">
      <path value="pl-lab-laboratorium.rodzajPracowni" />
      <short value="Rodzaj pracowni" />
      <definition value="Rodzaj pracowni laboratoryjnej" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Coding" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org.pl/fhir/ig/pl-lab/ValueSet/pl-lab-serviceProviderType-VS" />
      </binding>
    </element>
    <element id="pl-lab-laboratorium.nazwa">
      <path value="pl-lab-laboratorium.nazwa" />
      <short value="Nazwa laboratorium" />
      <definition value="Nazwa laboratorium" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="pl-lab-laboratorium.adres">
      <path value="pl-lab-laboratorium.adres" />
      <short value="Adres laboratorium" />
      <definition value="Adres laboratorium" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Address" />
      </type>
    </element>
    <element id="pl-lab-laboratorium.telefon">
      <path value="pl-lab-laboratorium.telefon" />
      <short value="Telefon laboratorium" />
      <definition value="Telefon laboratorium" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="pl-lab-laboratorium.email">
      <path value="pl-lab-laboratorium.email" />
      <short value="Email laboratorium" />
      <definition value="Email laboratorium" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="pl-lab-laboratorium.podmiotZarzadzajacy">
      <path value="pl-lab-laboratorium.podmiotZarzadzajacy" />
      <short value="Podmiot zarządzający" />
      <definition value="Podmiot zarządzający laboratorium" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-podmiotDiagnostyczny" />
      </type>
    </element>
  </differential>
</StructureDefinition>