<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="hn-basis-slot" />
  <url value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-slot" />
  <version value="1.3.2" />
  <name value="HnBasisSlot" />
  <title value="HnBasisSlot" />
  <status value="draft" />
  <description value="Profil for slot i Helsenorge. Basert på FHIR Slot (R4)" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="NO" />
      <display value="Norway" />
    </coding>
  </jurisdiction>
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Slot" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Slot" />
  <derivation value="constraint" />
  <differential>
    <element id="Slot.identifier">
      <path value="Slot.identifier" />
      <short value="Identifer must be UUID/GUID" />
      <definition value="Identifer must be UUID/GUID" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Slot.identifier.system">
      <path value="Slot.identifier.system" />
      <min value="1" />
    </element>
    <element id="Slot.identifier.value">
      <path value="Slot.identifier.value" />
      <min value="1" />
    </element>
    <element id="Slot.identifier.assigner">
      <path value="Slot.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
      </type>
    </element>
    <element id="Slot.serviceCategory">
      <path value="Slot.serviceCategory" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/ValueSet/service-category" />
      </binding>
    </element>
    <element id="Slot.serviceCategory.coding">
      <path value="Slot.serviceCategory.coding" />
      <constraint>
        <key value="inv-4" />
        <severity value="error" />
        <human value="If code is used in a codable consept the system must be used" />
        <expression value="code &gt; '' implies (system &gt; '' )" />
        <source value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-slot" />
      </constraint>
    </element>
    <element id="Slot.serviceType">
      <path value="Slot.serviceType" />
      <binding>
        <strength value="required" />
        <valueSet value="http://helsenorge.no/fhir/ValueSet/hn-scheduleandslot-type-vs" />
      </binding>
    </element>
    <element id="Slot.serviceType.coding">
      <path value="Slot.serviceType.coding" />
      <constraint>
        <key value="inv-4" />
        <severity value="error" />
        <human value="If code is used in a codable consept the system must be used" />
        <expression value="code &gt; '' implies (system &gt; '' )" />
        <source value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-slot" />
      </constraint>
    </element>
    <element id="Slot.specialty.coding">
      <path value="Slot.specialty.coding" />
      <constraint>
        <key value="inv-4" />
        <severity value="error" />
        <human value="If code is used in a codable consept the system must be used" />
        <expression value="code &gt; '' implies (system &gt; '' )" />
        <source value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-slot" />
      </constraint>
    </element>
    <element id="Slot.appointmentType">
      <path value="Slot.appointmentType" />
      <binding>
        <strength value="required" />
        <valueSet value="http://helsenorge.no/fhir/ValueSet/hn-scheduleandslot-type-vs" />
      </binding>
    </element>
    <element id="Slot.appointmentType.coding">
      <path value="Slot.appointmentType.coding" />
      <constraint>
        <key value="inv-4" />
        <severity value="error" />
        <human value="If code is used in a codable consept the system must be used" />
        <expression value="code &gt; '' implies (system &gt; '' )" />
        <source value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-slot" />
      </constraint>
    </element>
    <element id="Slot.schedule">
      <path value="Slot.schedule" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Schedule" />
        <targetProfile value="http://helsenorge.no/fhir/StructureDefinition/hn-basis-schedule" />
      </type>
    </element>
  </differential>
</StructureDefinition>