{
  "resourceType": "StructureDefinition",
  "id": "pcm-endpoint-update",
  "url": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-endpoint-update",
  "version": "0.3.2",
  "name": "PCMEndpointUpdate",
  "title": "PCM Endpoint Update Request",
  "status": "active",
  "description": "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": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Endpoint",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Endpoint",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Endpoint.id",
        "path": "Endpoint.id",
        "min": 1
      },
      {
        "id": "Endpoint.meta.versionId",
        "path": "Endpoint.meta.versionId",
        "comment": "Server-managed FHIR metadata. Prohibited in client requests.",
        "max": "0"
      },
      {
        "id": "Endpoint.meta.lastUpdated",
        "path": "Endpoint.meta.lastUpdated",
        "comment": "Server-managed FHIR metadata. Prohibited in client requests.",
        "max": "0"
      },
      {
        "id": "Endpoint.meta.source",
        "path": "Endpoint.meta.source",
        "max": "0"
      },
      {
        "id": "Endpoint.meta.profile",
        "path": "Endpoint.meta.profile",
        "comment": "Clients may assert the interaction-specific request profile, but PCM validates the request shape independently and does not require this declaration."
      },
      {
        "id": "Endpoint.meta.security",
        "path": "Endpoint.meta.security",
        "max": "0"
      },
      {
        "id": "Endpoint.meta.tag",
        "path": "Endpoint.meta.tag",
        "max": "0"
      },
      {
        "id": "Endpoint.implicitRules",
        "path": "Endpoint.implicitRules",
        "max": "0"
      },
      {
        "id": "Endpoint.language",
        "path": "Endpoint.language",
        "max": "0"
      },
      {
        "id": "Endpoint.text",
        "path": "Endpoint.text",
        "max": "0"
      },
      {
        "id": "Endpoint.contained",
        "path": "Endpoint.contained",
        "max": "0"
      },
      {
        "id": "Endpoint.extension",
        "path": "Endpoint.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Endpoint.extension:applicableCertificates",
        "path": "Endpoint.extension",
        "sliceName": "applicableCertificates",
        "comment": "Prohibited on update. PCM alone preserves or recomputes the authoritative certificate inventory.",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-applicable-certificates"
            ]
          }
        ]
      },
      {
        "id": "Endpoint.modifierExtension",
        "path": "Endpoint.modifierExtension",
        "max": "0"
      },
      {
        "id": "Endpoint.identifier",
        "path": "Endpoint.identifier",
        "max": "0"
      },
      {
        "id": "Endpoint.status",
        "path": "Endpoint.status",
        "comment": "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": "required",
          "valueSet": "http://pcm.fhir.health.gov.il/ValueSet/pcm-endpoint-status"
        }
      },
      {
        "id": "Endpoint.connectionType.system",
        "path": "Endpoint.connectionType.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/endpoint-connection-type"
      },
      {
        "id": "Endpoint.connectionType.code",
        "path": "Endpoint.connectionType.code",
        "min": 1,
        "fixedCode": "hl7-fhir-rest"
      },
      {
        "id": "Endpoint.name",
        "path": "Endpoint.name",
        "max": "0"
      },
      {
        "id": "Endpoint.managingOrganization",
        "path": "Endpoint.managingOrganization",
        "comment": "Prohibited on update. PCM determines ownership from the target Endpoint and authenticated Data Source.",
        "max": "0"
      },
      {
        "id": "Endpoint.contact",
        "path": "Endpoint.contact",
        "max": "0"
      },
      {
        "id": "Endpoint.period",
        "path": "Endpoint.period",
        "max": "0"
      },
      {
        "id": "Endpoint.payloadType",
        "path": "Endpoint.payloadType",
        "max": "1",
        "fixedCodeableConcept": {
          "coding": [
            {
              "code": "any",
              "system": "http://terminology.hl7.org/CodeSystem/endpoint-payload-type"
            }
          ]
        }
      },
      {
        "id": "Endpoint.payloadType.coding",
        "path": "Endpoint.payloadType.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Endpoint.payloadMimeType",
        "path": "Endpoint.payloadMimeType",
        "max": "0"
      },
      {
        "id": "Endpoint.address",
        "path": "Endpoint.address",
        "comment": "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."
      },
      {
        "id": "Endpoint.header",
        "path": "Endpoint.header",
        "max": "0"
      }
    ]
  }
}