{
  "resourceType": "StructureDefinition",
  "id": "pcm-endpoint-create",
  "url": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-endpoint-create",
  "version": "0.3.2",
  "name": "PCMEndpointCreate",
  "title": "PCM Endpoint Create Request",
  "status": "active",
  "description": "Closed FHIR create request for a Data Source FHIR REST Endpoint. The owning Data Source supplies the address and an initial status of active or suspended. PCM derives managingOrganization from the authenticated Data Source and assigns the logical id.",
  "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",
        "comment": "FHIR create metadata. If supplied, PCM ignores it and assigns the logical id."
      },
      {
        "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 create. PCM alone populates 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": "Initial technical availability declared by the owning Data Source. Create accepts active or suspended; off is not a valid initial state.",
        "binding": {
          "strength": "required",
          "valueSet": "http://pcm.fhir.health.gov.il/ValueSet/pcm-endpoint-create-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 create. PCM derives the authoritative owner from the 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": "The complete absolute HTTPS FHIR REST API base URL supplied by the organization. PCM validates ownership, uniqueness, and suitability as an exact OAuth resource/audience."
      },
      {
        "id": "Endpoint.header",
        "path": "Endpoint.header",
        "max": "0"
      }
    ]
  }
}