<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pcm-endpoint-update" />
  <url value="http://pcm.fhir.health.gov.il/StructureDefinition/pcm-endpoint-update" />
  <version value="0.3.2" />
  <name value="PCMEndpointUpdate" />
  <title value="PCM Endpoint Update Request" />
  <status value="active" />
  <description value="Closed FHIR PUT request for changing the technical availability or address of an owning Data Source Endpoint. The request declares status as active, suspended, or off; PCM validates the transition and preserves the immutable owner." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Endpoint" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Endpoint" />
  <derivation value="constraint" />
  <differential>
    <element id="Endpoint.id">
      <path value="Endpoint.id" />
      <min value="1" />
    </element>
    <element id="Endpoint.meta.versionId">
      <path value="Endpoint.meta.versionId" />
      <comment value="Server-managed FHIR metadata. Prohibited in client requests." />
      <max value="0" />
    </element>
    <element id="Endpoint.meta.lastUpdated">
      <path value="Endpoint.meta.lastUpdated" />
      <comment value="Server-managed FHIR metadata. Prohibited in client requests." />
      <max value="0" />
    </element>
    <element id="Endpoint.meta.source">
      <path value="Endpoint.meta.source" />
      <max value="0" />
    </element>
    <element id="Endpoint.meta.profile">
      <path value="Endpoint.meta.profile" />
      <comment value="Clients may assert the interaction-specific request profile, but PCM validates the request shape independently and does not require this declaration." />
    </element>
    <element id="Endpoint.meta.security">
      <path value="Endpoint.meta.security" />
      <max value="0" />
    </element>
    <element id="Endpoint.meta.tag">
      <path value="Endpoint.meta.tag" />
      <max value="0" />
    </element>
    <element id="Endpoint.implicitRules">
      <path value="Endpoint.implicitRules" />
      <max value="0" />
    </element>
    <element id="Endpoint.language">
      <path value="Endpoint.language" />
      <max value="0" />
    </element>
    <element id="Endpoint.text">
      <path value="Endpoint.text" />
      <max value="0" />
    </element>
    <element id="Endpoint.contained">
      <path value="Endpoint.contained" />
      <max value="0" />
    </element>
    <element id="Endpoint.extension">
      <path value="Endpoint.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Endpoint.extension:applicableCertificates">
      <path value="Endpoint.extension" />
      <sliceName value="applicableCertificates" />
      <comment value="Prohibited on update. PCM alone preserves or recomputes the authoritative certificate inventory." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="Extension" />
        <profile value="http://pcm.fhir.health.gov.il/StructureDefinition/ext-applicable-certificates" />
      </type>
    </element>
    <element id="Endpoint.modifierExtension">
      <path value="Endpoint.modifierExtension" />
      <max value="0" />
    </element>
    <element id="Endpoint.identifier">
      <path value="Endpoint.identifier" />
      <max value="0" />
    </element>
    <element id="Endpoint.status">
      <path value="Endpoint.status" />
      <comment value="Requested technical state. Active and suspended are reversible. Off is terminal; a referenced Endpoint must be replaced on its Data Source Organization before it can be turned off." />
      <binding>
        <strength value="required" />
        <valueSet value="http://pcm.fhir.health.gov.il/ValueSet/pcm-endpoint-status" />
      </binding>
    </element>
    <element id="Endpoint.connectionType.system">
      <path value="Endpoint.connectionType.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/endpoint-connection-type" />
    </element>
    <element id="Endpoint.connectionType.code">
      <path value="Endpoint.connectionType.code" />
      <min value="1" />
      <fixedCode value="hl7-fhir-rest" />
    </element>
    <element id="Endpoint.name">
      <path value="Endpoint.name" />
      <max value="0" />
    </element>
    <element id="Endpoint.managingOrganization">
      <path value="Endpoint.managingOrganization" />
      <comment value="Prohibited on update. PCM determines ownership from the target Endpoint and authenticated Data Source." />
      <max value="0" />
    </element>
    <element id="Endpoint.contact">
      <path value="Endpoint.contact" />
      <max value="0" />
    </element>
    <element id="Endpoint.period">
      <path value="Endpoint.period" />
      <max value="0" />
    </element>
    <element id="Endpoint.payloadType">
      <path value="Endpoint.payloadType" />
      <max value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/endpoint-payload-type" />
          <code value="any" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="Endpoint.payloadType.coding">
      <path value="Endpoint.payloadType.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Endpoint.payloadMimeType">
      <path value="Endpoint.payloadMimeType" />
      <max value="0" />
    </element>
    <element id="Endpoint.address">
      <path value="Endpoint.address" />
      <comment value="Complete replacement for the client-writable FHIR REST API base URL. A changed address is accepted only while the Endpoint is suspended and invalidates authorization for the previous audience." />
    </element>
    <element id="Endpoint.header">
      <path value="Endpoint.header" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>