<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="SDS-Endpoint" />
  <url value="https://fhir.nhs.uk/StructureDefinition/SDS-Endpoint" />
  <version value="1.0.0" />
  <name value="SDSEndpoint" />
  <title value="SDS Endpoint" />
  <status value="draft" />
  <date value="2020-08-07" />
  <publisher value="NHS Digital" />
  <contact>
    <name value="NHS Digital" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="Defines the constraints and extensions on the Endpoint resource to register a locally hosted, regional, or  national service with the Spine Directory Service for the delivery/retrieval of information." />
  <purpose value="An endpoint describes the technical details of a location that can be connected to for the delivery/retrieval of information. Sufficient information is required to ensure that a connection can be made securely, and appropriate data transmitted as defined by the endpoint owner. This is not a description of details of the current system, as found in CapabilityStatement, but of another (potentially external) system." />
  <copyright value="NHS Digital" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Endpoint" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Endpoint" />
  <derivation value="constraint" />
  <differential>
    <element id="Endpoint.extension">
      <path value="Endpoint.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Endpoint.extension:ExtensionSDSReliabilityConfiguration">
      <path value="Endpoint.extension" />
      <sliceName value="ExtensionSDSReliabilityConfiguration" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-SDS-ReliabilityConfiguration" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.identifier">
      <path value="Endpoint.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.identifier:NhsEndpointServiceId">
      <path value="Endpoint.identifier" />
      <sliceName value="NhsEndpointServiceId" />
      <short value="NHS Endpoint Service Id" />
      <definition value="Identifier for the service that is used to identify the endpoint across multiple disparate systems." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.identifier:NhsEndpointServiceId.system">
      <path value="Endpoint.identifier.system" />
      <fixedUri value="https://fhir.nhs.uk/Id/nhsEndpointServiceId" />
    </element>
    <element id="Endpoint.identifier:NhsMhsFQDN">
      <path value="Endpoint.identifier" />
      <sliceName value="NhsMhsFQDN" />
      <short value="NHS Message Handling Service Fully Qualified Domain Name" />
      <definition value="Identifier for the service that is used to identify the endpoint across multiple disparate systems." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.identifier:NhsMhsFQDN.system">
      <path value="Endpoint.identifier.system" />
      <fixedUri value="https://fhir.nhs.uk/Id/nhsMhsFQDN" />
    </element>
    <element id="Endpoint.identifier:NhsMhsPartyKey">
      <path value="Endpoint.identifier" />
      <sliceName value="NhsMhsPartyKey" />
      <short value="NHS Message Handling Service Party Key" />
      <definition value="Identifier for the service that is used to identify the endpoint across multiple disparate systems." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.identifier:NhsMhsPartyKey.system">
      <path value="Endpoint.identifier.system" />
      <fixedUri value="https://fhir.nhs.uk/Id/nhsMhsPartyKey" />
    </element>
    <element id="Endpoint.identifier:NhsMhsCPAId">
      <path value="Endpoint.identifier" />
      <sliceName value="NhsMhsCPAId" />
      <short value="NHS Message Handling Service CPA Identifier" />
      <definition value="Identifier for the service that is used to identify the endpoint across multiple disparate systems." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.identifier:NhsMhsCPAId.system">
      <path value="Endpoint.identifier.system" />
      <fixedUri value="https://fhir.nhs.uk/Id/nhsMhsCPAId" />
    </element>
    <element id="Endpoint.identifier:NhsSpineASID">
      <path value="Endpoint.identifier" />
      <sliceName value="NhsSpineASID" />
      <short value="NHS Spine Accredited System Identifier" />
      <min value="1" />
    </element>
    <element id="Endpoint.identifier:NhsSpineASID.system">
      <path value="Endpoint.identifier.system" />
      <fixedUri value="https://fhir.nhs.uk/Id/nhsSpineASID" />
    </element>
    <element id="Endpoint.status">
      <path value="Endpoint.status" />
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.connectionType">
      <path value="Endpoint.connectionType" />
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.managingOrganization">
      <path value="Endpoint.managingOrganization" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.payloadType">
      <path value="Endpoint.payloadType" />
      <mustSupport value="true" />
    </element>
    <element id="Endpoint.payloadType.coding">
      <path value="Endpoint.payloadType.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.payloadType.coding.system">
      <path value="Endpoint.payloadType.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/endpoint-payload-type" />
    </element>
    <element id="Endpoint.payloadType.coding.code">
      <path value="Endpoint.payloadType.coding.code" />
      <min value="1" />
      <fixedCode value="any" />
    </element>
    <element id="Endpoint.payloadType.coding.display">
      <path value="Endpoint.payloadType.coding.display" />
      <min value="1" />
      <fixedString value="Any" />
    </element>
    <element id="Endpoint.address">
      <path value="Endpoint.address" />
      <short value="The technical base address, NhsMhsEndPoint, for connecting to this endpoint" />
      <definition value="The uri that describes the actual end-point to connect to. Represents the NHS Message Handling System (MHS) EndPoint." />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>