{
  "resourceType": "StructureDefinition",
  "id": "pcm-system-authorization-contract",
  "url": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-system-authorization-contract",
  "version": "0.4.2",
  "name": "PCMSystemAuthorizationContract",
  "title": "PCM System Authorization Contract",
  "status": "active",
  "description": "PCM-managed grant to the PCM system organization for one self-contained system workflow. Presence check, patient authentication and dependent discovery use separate grant instances of this profile. Contract.subType selects the workflow and purpose; the Contract lists the permitted sources and effective period. Participants have read/search access only.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Contract",
  "baseDefinition": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-data-access-authorization-contract",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Contract.meta.profile",
        "path": "Contract.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "comment": "PCM includes the applicable server-return profile URL; additional compatible profile URLs are allowed.",
        "min": 1
      },
      {
        "id": "Contract.meta.profile:pcmProfile",
        "path": "Contract.meta.profile",
        "sliceName": "pcmProfile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-system-authorization-contract"
      },
      {
        "id": "Contract.implicitRules",
        "path": "Contract.implicitRules",
        "max": "0"
      },
      {
        "id": "Contract.contained",
        "path": "Contract.contained",
        "max": "0"
      },
      {
        "id": "Contract.extension",
        "path": "Contract.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "min": 1
      },
      {
        "id": "Contract.extension:exampleQuery",
        "path": "Contract.extension",
        "sliceName": "exampleQuery",
        "min": 1
      },
      {
        "id": "Contract.modifierExtension",
        "path": "Contract.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.url",
        "path": "Contract.url",
        "max": "0"
      },
      {
        "id": "Contract.version",
        "path": "Contract.version",
        "max": "0"
      },
      {
        "id": "Contract.status",
        "path": "Contract.status",
        "comment": "PCM publishes executed grants after its authorized policy-approval process has formally established them. This is PCM's mapping of formal execution for unilateral system grants; it does not assert bilateral signatures in this resource. No draft or negotiation lifecycle is exposed."
      },
      {
        "id": "Contract.legalState",
        "path": "Contract.legalState",
        "max": "0"
      },
      {
        "id": "Contract.instantiatesCanonical",
        "path": "Contract.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "Contract.contentDerivative",
        "path": "Contract.contentDerivative",
        "max": "0"
      },
      {
        "id": "Contract.expirationType",
        "path": "Contract.expirationType",
        "max": "0"
      },
      {
        "id": "Contract.subject",
        "path": "Contract.subject",
        "max": "0"
      },
      {
        "id": "Contract.authority",
        "path": "Contract.authority",
        "max": "0"
      },
      {
        "id": "Contract.domain",
        "path": "Contract.domain",
        "max": "0"
      },
      {
        "id": "Contract.site",
        "path": "Contract.site",
        "max": "0"
      },
      {
        "id": "Contract.name",
        "path": "Contract.name",
        "max": "0"
      },
      {
        "id": "Contract.title",
        "path": "Contract.title",
        "min": 1
      },
      {
        "id": "Contract.subtitle",
        "path": "Contract.subtitle",
        "max": "0"
      },
      {
        "id": "Contract.alias",
        "path": "Contract.alias",
        "max": "0"
      },
      {
        "id": "Contract.author",
        "path": "Contract.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-organization-system"
            ]
          }
        ]
      },
      {
        "id": "Contract.scope",
        "path": "Contract.scope",
        "max": "0"
      },
      {
        "id": "Contract.topic[x]",
        "path": "Contract.topic[x]",
        "max": "0"
      },
      {
        "id": "Contract.subType",
        "path": "Contract.subType",
        "comment": "PCM derives purpose, effective scopes and disclosure restrictions from this immutable workflow code using the normative PCM workflow rules. Unknown workflow codes are rejected. The grant has no HealthcareService dependency. Authentication/discovery additionally require current HMO workflow enrollment; authentication targets the verified home HMO. Future commercial grants are not enabled by this profile.",
        "binding": {
          "strength": "required",
          "valueSet": "http://pcm.fhir.health.gov.il/ValueSet/pcm-authorization-scenario"
        }
      },
      {
        "id": "Contract.subType.coding.system",
        "path": "Contract.subType.coding.system",
        "fixedUri": "http://pcm.fhir.health.gov.il/cs/pcm-authorization-scenario"
      },
      {
        "id": "Contract.contentDefinition",
        "path": "Contract.contentDefinition",
        "max": "0"
      },
      {
        "id": "Contract.term.modifierExtension",
        "path": "Contract.term.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.term.identifier",
        "path": "Contract.term.identifier",
        "max": "0"
      },
      {
        "id": "Contract.term.issued",
        "path": "Contract.term.issued",
        "max": "0"
      },
      {
        "id": "Contract.term.applies",
        "path": "Contract.term.applies",
        "max": "0"
      },
      {
        "id": "Contract.term.topic[x]",
        "path": "Contract.term.topic[x]",
        "max": "0"
      },
      {
        "id": "Contract.term.type",
        "path": "Contract.term.type",
        "max": "0"
      },
      {
        "id": "Contract.term.subType",
        "path": "Contract.term.subType",
        "max": "0"
      },
      {
        "id": "Contract.term.text",
        "path": "Contract.term.text",
        "min": 1
      },
      {
        "id": "Contract.term.securityLabel",
        "path": "Contract.term.securityLabel",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.modifierExtension",
        "path": "Contract.term.offer.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.identifier",
        "path": "Contract.term.offer.identifier",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.party.modifierExtension",
        "path": "Contract.term.offer.party.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.party.reference",
        "path": "Contract.term.offer.party.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://pcm.fhir.health.gov.il/StructureDefinition/pcm-organization-system"
            ]
          }
        ]
      },
      {
        "id": "Contract.term.offer.topic",
        "path": "Contract.term.offer.topic",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.type",
        "path": "Contract.term.offer.type",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.decision",
        "path": "Contract.term.offer.decision",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.decisionMode",
        "path": "Contract.term.offer.decisionMode",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.answer",
        "path": "Contract.term.offer.answer",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.text",
        "path": "Contract.term.offer.text",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.linkId",
        "path": "Contract.term.offer.linkId",
        "max": "0"
      },
      {
        "id": "Contract.term.offer.securityLabelNumber",
        "path": "Contract.term.offer.securityLabelNumber",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.modifierExtension",
        "path": "Contract.term.asset.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.scope",
        "path": "Contract.term.asset.scope",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.type",
        "path": "Contract.term.asset.type",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.typeReference",
        "path": "Contract.term.asset.typeReference",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.subtype",
        "path": "Contract.term.asset.subtype",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.relationship",
        "path": "Contract.term.asset.relationship",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.context.modifierExtension",
        "path": "Contract.term.asset.context.modifierExtension",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.context.code",
        "path": "Contract.term.asset.context.code",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.context.text",
        "path": "Contract.term.asset.context.text",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.condition",
        "path": "Contract.term.asset.condition",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.periodType",
        "path": "Contract.term.asset.periodType",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.period",
        "path": "Contract.term.asset.period",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.usePeriod",
        "path": "Contract.term.asset.usePeriod",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.text",
        "path": "Contract.term.asset.text",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.linkId",
        "path": "Contract.term.asset.linkId",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.answer",
        "path": "Contract.term.asset.answer",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.securityLabelNumber",
        "path": "Contract.term.asset.securityLabelNumber",
        "max": "0"
      },
      {
        "id": "Contract.term.asset.valuedItem",
        "path": "Contract.term.asset.valuedItem",
        "max": "0"
      },
      {
        "id": "Contract.term.action",
        "path": "Contract.term.action",
        "max": "0"
      },
      {
        "id": "Contract.term.group",
        "path": "Contract.term.group",
        "max": "0"
      },
      {
        "id": "Contract.supportingInfo",
        "path": "Contract.supportingInfo",
        "max": "0"
      },
      {
        "id": "Contract.relevantHistory",
        "path": "Contract.relevantHistory",
        "max": "0"
      },
      {
        "id": "Contract.signer",
        "path": "Contract.signer",
        "max": "0"
      },
      {
        "id": "Contract.friendly",
        "path": "Contract.friendly",
        "max": "0"
      },
      {
        "id": "Contract.legal",
        "path": "Contract.legal",
        "max": "0"
      },
      {
        "id": "Contract.rule",
        "path": "Contract.rule",
        "max": "0"
      },
      {
        "id": "Contract.legallyBinding[x]",
        "path": "Contract.legallyBinding[x]",
        "max": "0"
      }
    ]
  }
}