<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="fdc9ba79-8ae5-425c-8581-824b336dbe00" />
  <meta>
    <lastUpdated value="2021-10-11T13:47:41.340+00:00" />
  </meta>
  <url value="https://fhir.cambio.se/StructureDefinition/BasicUnitOutlierSituationSe/v1" />
  <name value="BasicUnitOutlierSituationSe" />
  <status value="draft" />
  <date value="2021-10-11T13:43:20.7972491Z" />
  <description value="The number of patients of a given medical responsible unit outlying at another unit.&#xD;&#xA;&#xD;&#xA;An outlier is a patient who is  admitted at a ward that do not belong to the medical responsible unit which the patient belongs to. The ward which the patient is located at has another medical responsibility. &#xD;&#xA;&#xD;&#xA;The intended use is to get the outliers for a specified medical responsible unit.  Therefore, the organization in the call must be a medical resposnible unit." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Basic" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Basic" />
  <derivation value="constraint" />
  <differential>
    <element id="Basic.extension">
      <path value="Basic.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Basic.extension:outliers">
      <path value="Basic.extension" />
      <sliceName value="outliers" />
      <definition value="An outlier is a patient placed on ward that is not the serving unit of the medical responsible unit of the patient.&#xD;&#xA;A reason for outlying patients can be that the wards that serves a specific medical responsibility is full&#xD;&#xA;or crowded.&#xD;&#xA;&#xD;&#xA;E.g., A patient whose responsibility is with unit X is placed in ward Y. If ward Y is not a serving unit of unit X&#xD;&#xA;then;&#xD;&#xA;&#xD;&#xA;The patient is outlying from the unit X&#xD;&#xA;The patient is outlying to (inlier to) the ward Y." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.cambio.se/StructureDefinition/unitBedSituation-outliers/v1" />
      </type>
    </element>
    <element id="Basic.extension:outliers.extension">
      <path value="Basic.extension.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="3" />
    </element>
    <element id="Basic.extension:outliers.extension:outlyingToUnitId">
      <path value="Basic.extension.extension" />
      <sliceName value="outlyingToUnitId" />
      <definition value="Id of the unit to which the patient(s) is outlying." />
      <min value="1" />
    </element>
    <element id="Basic.identifier">
      <path value="Basic.identifier" />
      <max value="0" />
    </element>
    <element id="Basic.code.coding">
      <path value="Basic.code.coding" />
      <max value="1" />
    </element>
    <element id="Basic.code.text">
      <path value="Basic.code.text" />
      <min value="1" />
      <fixedString value="UnitOutlierSituation" />
    </element>
    <element id="Basic.subject">
      <path value="Basic.subject" />
      <definition value="The Unit that the Bed overview represent" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
    </element>
    <element id="Basic.subject.type">
      <path value="Basic.subject.type" />
      <min value="1" />
      <fixedUri value="Organization" />
    </element>
    <element id="Basic.subject.identifier">
      <path value="Basic.subject.identifier" />
      <min value="1" />
    </element>
    <element id="Basic.subject.identifier.system">
      <path value="Basic.subject.identifier.system" />
      <definition value="The URN of the HSA-ID catalogue" />
      <min value="1" />
      <fixedUri value="urn:oid:1.2.752.129.2.1.4.1" />
    </element>
    <element id="Basic.subject.identifier.value">
      <path value="Basic.subject.identifier.value" />
      <definition value="The HSA-ID of the Unit" />
      <min value="1" />
    </element>
    <element id="Basic.author">
      <path value="Basic.author" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>