{
  "resourceType": "StructureDefinition",
  "id": "pcm-healthcareservice-new-service-submit",
  "url": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-healthcareservice-new-service-submit",
  "version": "0.3.2",
  "name": "PCMHealthcareServiceNewServiceSubmit",
  "title": "PCM HealthcareService New Service Submit",
  "status": "active",
  "description": "Closed interaction-specific submit profile for a provider-initiated new-service registration request. Clients may assert this profile in meta.profile, but PCM validates the request shape independently and does not require the declaration. The provider supplies the writable service definition without basedOn and must omit meta.tag; PCM adds the authoritative classification tags to the returned catalog and provider-instance resources. Identity, ownership, lifecycle, and approval fields are prohibited.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "HealthcareService",
  "baseDefinition": "http://fhir.health.gov.il/StructureDefinition/il-core-healthcare-service",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "HealthcareService",
        "path": "HealthcareService",
        "constraint": [
          {
            "key": "pcm-hcs-information-bucket-code-unique",
            "severity": "error",
            "human": "Each IL HDP information-bucket code may appear at most once in a PCM HealthcareService.",
            "expression": "extension.where(url = 'http://pcm.fhir.health.gov.il/StructureDefinition/ext-information-bucket').extension.where(url = 'bucket').value.ofType(CodeableConcept).coding.where(system = 'http://fhir.health.gov.il/cs/il-hdp-information-buckets').code.isDistinct()",
            "source": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-healthcareservice-new-service-submit"
          }
        ]
      },
      {
        "id": "HealthcareService.id",
        "path": "HealthcareService.id",
        "comment": "FHIR create metadata. If supplied, PCM ignores it and assigns the logical id."
      },
      {
        "id": "HealthcareService.meta.versionId",
        "path": "HealthcareService.meta.versionId",
        "comment": "Server-managed FHIR metadata. Prohibited in this client create request.",
        "max": "0"
      },
      {
        "id": "HealthcareService.meta.lastUpdated",
        "path": "HealthcareService.meta.lastUpdated",
        "comment": "Server-managed FHIR metadata. Prohibited in this client create request.",
        "max": "0"
      },
      {
        "id": "HealthcareService.meta.source",
        "path": "HealthcareService.meta.source",
        "max": "0"
      },
      {
        "id": "HealthcareService.meta.profile",
        "path": "HealthcareService.meta.profile",
        "comment": "Clients may assert this interaction-specific request profile, but PCM validates the request shape independently and does not require the declaration."
      },
      {
        "id": "HealthcareService.meta.security",
        "path": "HealthcareService.meta.security",
        "max": "0"
      },
      {
        "id": "HealthcareService.meta.tag",
        "path": "HealthcareService.meta.tag",
        "comment": "Prohibited in this direct create request. PCM adds the authoritative HealthcareService classification tags to the returned catalog and provider-instance resources.",
        "max": "0"
      },
      {
        "id": "HealthcareService.implicitRules",
        "path": "HealthcareService.implicitRules",
        "max": "0"
      },
      {
        "id": "HealthcareService.language",
        "path": "HealthcareService.language",
        "max": "0"
      },
      {
        "id": "HealthcareService.text",
        "path": "HealthcareService.text",
        "max": "0"
      },
      {
        "id": "HealthcareService.contained",
        "path": "HealthcareService.contained",
        "max": "0"
      },
      {
        "id": "HealthcareService.extension",
        "path": "HealthcareService.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 5
      },
      {
        "id": "HealthcareService.extension:businessStatus",
        "path": "HealthcareService.extension",
        "sliceName": "businessStatus",
        "comment": "Prohibited in the request. PCM derives the lifecycle state.",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-service-business-status"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:basedOn",
        "path": "HealthcareService.extension",
        "sliceName": "basedOn",
        "comment": "Prohibited in a new-service request. PCM creates the canonical service and links the resulting provider instance.",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-based-on-canonical-healthcareservice"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:approvalWindow",
        "path": "HealthcareService.extension",
        "sliceName": "approvalWindow",
        "comment": "Prohibited in the request. PCM derives the applicable approval or objection period.",
        "min": 0,
        "max": "0",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-approval-window"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:accessMode",
        "path": "HealthcareService.extension",
        "sliceName": "accessMode",
        "comment": "Required requested consent access mode.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-access-mode"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:accessDuration",
        "path": "HealthcareService.extension",
        "sliceName": "accessDuration",
        "comment": "Required requested consent access duration. PCM may apply additional server-side handling for durations that require exceptional review.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-access-duration"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:exampleQuery",
        "path": "HealthcareService.extension",
        "sliceName": "exampleQuery",
        "comment": "Required example FHIR queries for implementers and reviewers.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-example-query"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:allowPatientBucketChange",
        "path": "HealthcareService.extension",
        "sliceName": "allowPatientBucketChange",
        "comment": "Required requested setting indicating whether patients can customize information buckets.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-allow-patient-bucket-change"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.extension:informationBucket",
        "path": "HealthcareService.extension",
        "sliceName": "informationBucket",
        "comment": "Required requested information buckets and history depth. Each IL HDP information-bucket code may occur only once; PCM rejects the complete request when a code is repeated.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/ext-information-bucket"
            ]
          }
        ]
      },
      {
        "id": "HealthcareService.modifierExtension",
        "path": "HealthcareService.modifierExtension",
        "max": "0"
      },
      {
        "id": "HealthcareService.identifier",
        "path": "HealthcareService.identifier",
        "comment": "Prohibited on submit. PCM assigns returned catalog and instance identifiers.",
        "max": "0"
      },
      {
        "id": "HealthcareService.active",
        "path": "HealthcareService.active",
        "comment": "Prohibited on submit. PCM creates new-service requests with active=false.",
        "max": "0"
      },
      {
        "id": "HealthcareService.providedBy",
        "path": "HealthcareService.providedBy",
        "comment": "Prohibited on submit. PCM derives the owner from the authenticated Service Provider.",
        "max": "0"
      },
      {
        "id": "HealthcareService.category",
        "path": "HealthcareService.category",
        "comment": "Required service category for catalog discovery and governance.",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://pcm.fhir.health.gov.il/ValueSet/pcm-healthcareservice-category"
        }
      },
      {
        "id": "HealthcareService.type",
        "path": "HealthcareService.type",
        "comment": "Required service type; PCM services are information access services.",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "INFA",
              "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "display": "information access"
            }
          ]
        }
      },
      {
        "id": "HealthcareService.specialty",
        "path": "HealthcareService.specialty",
        "max": "0"
      },
      {
        "id": "HealthcareService.location",
        "path": "HealthcareService.location",
        "max": "0"
      },
      {
        "id": "HealthcareService.name",
        "path": "HealthcareService.name",
        "comment": "Required service name for the new-service request.",
        "min": 1
      },
      {
        "id": "HealthcareService.comment",
        "path": "HealthcareService.comment",
        "max": "0"
      },
      {
        "id": "HealthcareService.extraDetails",
        "path": "HealthcareService.extraDetails",
        "comment": "Required concise patient-facing service description, including why the requested information buckets are needed.",
        "min": 1
      },
      {
        "id": "HealthcareService.photo",
        "path": "HealthcareService.photo",
        "max": "0"
      },
      {
        "id": "HealthcareService.telecom",
        "path": "HealthcareService.telecom",
        "max": "0"
      },
      {
        "id": "HealthcareService.coverageArea",
        "path": "HealthcareService.coverageArea",
        "max": "0"
      },
      {
        "id": "HealthcareService.serviceProvisionCode",
        "path": "HealthcareService.serviceProvisionCode",
        "max": "0"
      },
      {
        "id": "HealthcareService.eligibility",
        "path": "HealthcareService.eligibility",
        "max": "0"
      },
      {
        "id": "HealthcareService.program",
        "path": "HealthcareService.program",
        "max": "0"
      },
      {
        "id": "HealthcareService.characteristic",
        "path": "HealthcareService.characteristic",
        "max": "0"
      },
      {
        "id": "HealthcareService.communication",
        "path": "HealthcareService.communication",
        "max": "0"
      },
      {
        "id": "HealthcareService.referralMethod",
        "path": "HealthcareService.referralMethod",
        "max": "0"
      },
      {
        "id": "HealthcareService.appointmentRequired",
        "path": "HealthcareService.appointmentRequired",
        "max": "0"
      },
      {
        "id": "HealthcareService.availableTime",
        "path": "HealthcareService.availableTime",
        "max": "0"
      },
      {
        "id": "HealthcareService.notAvailable",
        "path": "HealthcareService.notAvailable",
        "max": "0"
      },
      {
        "id": "HealthcareService.availabilityExceptions",
        "path": "HealthcareService.availabilityExceptions",
        "max": "0"
      },
      {
        "id": "HealthcareService.endpoint",
        "path": "HealthcareService.endpoint",
        "max": "0"
      }
    ]
  }
}