<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ie-core-organization" />
  <url value="https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-organization" />
  <name value="IECoreOrganization" />
  <title value="IE Core Organization" />
  <status value="draft" />
  <description value="The IE Core Organization Profile is based upon the core FHIR Organization Resource and defines the minimum set of data required to query and retrieve organization information within the Irish healthcare system. Identifier slicing for HIQA-sourced facility identifiers is defined in the use-case context (HIQA EP/PS 2.8, 2.12)." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Organization" />
  <baseDefinition value="http://hl7.eu/fhir/base/StructureDefinition/organization-eu-core" />
  <derivation value="constraint" />
  <snapshot />
  <differential>
    <element id="Organization.identifier">
      <path value="Organization.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Identifies this organization across multiple systems" />
      <comment value="HIQA EP/PS 2.8 Healthcare facility identifier (Required): for a pharmacy, the PSI Retail Pharmacy Business (RPB) registration number. HIQA EP/PS 2.12 GMS Panel ID (Optional) for a GP. The GLN (2.11) is a location identifier (IECoreLocation)." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:PSIRPB">
      <path value="Organization.identifier" />
      <sliceName value="PSIRPB" />
      <short value="PSI Retail Pharmacy Business (RPB) registration number" />
      <comment value="HIQA EP/PS 2.8: the unique registration number issued by the PSI to a Retail Pharmacy Business. System URI placeholder (OI-003)." />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:PSIRPB.system">
      <path value="Organization.identifier.system" />
      <min value="1" />
      <patternUri value="https://hl7-ie.github.io/ie-core/fhir/ie/core/sid/psi-rpb" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:PSIRPB.value">
      <path value="Organization.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:GMSPanel">
      <path value="Organization.identifier" />
      <sliceName value="GMSPanel" />
      <short value="GMS Panel ID (GP)" />
      <comment value="HIQA EP/PS 2.12 GMS Panel ID (Optional): typically a five- to six-digit number assigned to a GP registered with the HSE to provide General Medical Services. No format is enforced (HIQA says 'typically'). System URI placeholder (OI-003)." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Organization.identifier:GMSPanel.system">
      <path value="Organization.identifier.system" />
      <min value="1" />
      <patternUri value="https://hl7-ie.github.io/ie-core/fhir/ie/core/sid/gms-panel" />
    </element>
    <element id="Organization.identifier:GMSPanel.value">
      <path value="Organization.identifier.value" />
      <min value="1" />
    </element>
    <element id="Organization.active">
      <path value="Organization.active" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.type">
      <path value="Organization.type" />
      <short value="Kind of organization" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/ValueSet/organization-type" />
      </binding>
    </element>
    <element id="Organization.name">
      <path value="Organization.name" />
      <short value="Name used for the organization" />
      <comment value="HIQA EP/PS 2.7 Healthcare facility name (Required): for a pharmacy, the Retail Pharmacy Business name as registered with the PSI." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.alias">
      <path value="Organization.alias" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom">
      <path value="Organization.telecom" />
      <short value="A contact detail for the organization" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.system">
      <path value="Organization.telecom.system" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.value">
      <path value="Organization.telecom.value" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom.use">
      <path value="Organization.telecom.use" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address">
      <path value="Organization.address" />
      <comment value="HIQA EP/PS 2.9 Healthcare facility address (Mandatory 1..1): postcode (2.9.1 M), address line(s) (2.9.2 M), locality (2.9.3 R), county (2.9.4 M) and country (2.9.5 M). Enforced for the prescriber and dispenser facilities in the ePrescription Bundle (invariant ie-bnd-rx-5)." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address.line">
      <path value="Organization.address.line" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address.city">
      <path value="Organization.address.city" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address.state">
      <path value="Organization.address.state" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://hl7-ie.github.io/ie-core/fhir/ie/core/ValueSet/ie-core-county" />
      </binding>
    </element>
    <element id="Organization.address.postalCode">
      <path value="Organization.address.postalCode" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address.country">
      <path value="Organization.address.country" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.partOf">
      <path value="Organization.partOf" />
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy">
          <valueBoolean value="true" />
        </extension>
        <code value="Reference" />
        <targetProfile value="https://hl7-ie.github.io/ie-core/fhir/ie/core/StructureDefinition/ie-core-organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Organization.contact">
      <path value="Organization.contact" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.contact.purpose">
      <path value="Organization.contact.purpose" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.contact.name">
      <path value="Organization.contact.name" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.contact.telecom">
      <path value="Organization.contact.telecom" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.endpoint">
      <path value="Organization.endpoint" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>