<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pl-lab-katalogUslugLaboratorium" />
  <url value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-katalogUslugLaboratorium" />
  <name value="KatalogUslugLaboratorium" />
  <title value="Katalog usług laboratorium" />
  <status value="draft" />
  <description value="Karalog usług 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-katalogUslugLaboratorium" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Base" />
  <derivation value="specialization" />
  <snapshot>
    <element id="pl-lab-katalogUslugLaboratorium">
      <path value="pl-lab-katalogUslugLaboratorium" />
      <short value="Katalog usług laboratorium" />
      <definition value="Karalog usług laboratorium" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-katalogUslugLaboratorium" />
        <min value="0" />
        <max value="*" />
      </base>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.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-katalogUslugLaboratorium.identyfikator" />
      <short value="Identyfikator katalogu usług" />
      <definition value="Identyfikator katalogu usług 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="1" />
      <max value="1" />
      <base>
        <path value="pl-lab-katalogUslugLaboratorium.identyfikator" />
        <min value="1" />
        <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-katalogUslugLaboratorium.nazwa">
      <path value="pl-lab-katalogUslugLaboratorium.nazwa" />
      <short value="Nazea katalogu usług" />
      <definition value="Nazwa katalogu usług 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-katalogUslugLaboratorium.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-katalogUslugLaboratorium.usluga">
      <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-katalogUslugLaboratorium.usluga" />
      <short value="Usługa katalogowa" />
      <definition value="Usługa katalogowa 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="0" />
      <max value="*" />
      <base>
        <path value="pl-lab-katalogUslugLaboratorium.usluga" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-uslugaKatalogowaLaboratorium" />
      </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>
    <element id="pl-lab-katalogUslugLaboratorium.laboratorium">
      <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-katalogUslugLaboratorium.laboratorium" />
      <short value="Laboratorium" />
      <definition value="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-katalogUslugLaboratorium.laboratorium" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-laboratorium" />
      </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>
    <element id="pl-lab-katalogUslugLaboratorium.podmiot">
      <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-katalogUslugLaboratorium.podmiot" />
      <short value="Podmiot diagnostyczny" />
      <definition value="Podmiot diagnostyczny" />
      <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-katalogUslugLaboratorium.podmiot" />
        <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-katalogUslugLaboratorium">
      <path value="pl-lab-katalogUslugLaboratorium" />
      <short value="Katalog usług laboratorium" />
      <definition value="Karalog usług laboratorium" />
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.identyfikator">
      <path value="pl-lab-katalogUslugLaboratorium.identyfikator" />
      <short value="Identyfikator katalogu usług" />
      <definition value="Identyfikator katalogu usług laboratorium" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.nazwa">
      <path value="pl-lab-katalogUslugLaboratorium.nazwa" />
      <short value="Nazea katalogu usług" />
      <definition value="Nazwa katalogu usług laboratorium" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.usluga">
      <path value="pl-lab-katalogUslugLaboratorium.usluga" />
      <short value="Usługa katalogowa" />
      <definition value="Usługa katalogowa laboratorium" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-uslugaKatalogowaLaboratorium" />
      </type>
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.laboratorium">
      <path value="pl-lab-katalogUslugLaboratorium.laboratorium" />
      <short value="Laboratorium" />
      <definition value="Laboratorium" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-laboratorium" />
      </type>
    </element>
    <element id="pl-lab-katalogUslugLaboratorium.podmiot">
      <path value="pl-lab-katalogUslugLaboratorium.podmiot" />
      <short value="Podmiot diagnostyczny" />
      <definition value="Podmiot diagnostyczny" />
      <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>