{
  "resourceType": "StructureDefinition",
  "id": "timerbeetenant-profile",
  "url": "http://fhir.xt.dev/StructureDefinition/TimerbeeTenant",
  "version": "2.2.1",
  "name": "TimerbeeTenant",
  "status": "active",
  "date": "2025-04-18T14:05:32.2089798+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "description": "The goal of this profile is to identify an organization that also acts as a tenant in Timerbee. These organizations must have a specific type of identifier.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Organization",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Organization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Organization.identifier",
        "path": "Organization.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            },
            {
              "type": "value",
              "path": "type.coding.system"
            }
          ],
          "rules": "open"
        },
        "requirements": "The goal of this profile is to identify an organization that also acts as a tenant in Timerbee. These organizations must have a specific type of identifier."
      },
      {
        "id": "Organization.identifier:tenantIdentifier",
        "path": "Organization.identifier",
        "sliceName": "tenantIdentifier",
        "short": "Identifies this organization as a Timerbee Tenant",
        "definition": "UUID for the organization used by Timerbee to identify the tenant. Either this or the tenantSystemId must be set.",
        "max": "1",
        "mustSupport": false
      },
      {
        "id": "Organization.identifier:tenantIdentifier.use",
        "path": "Organization.identifier.use",
        "max": "0"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type",
        "path": "Organization.identifier.type",
        "min": 1
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.coding",
        "path": "Organization.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.coding.system",
        "path": "Organization.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/ProviderIdentifierType"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.coding.version",
        "path": "Organization.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.coding.code",
        "path": "Organization.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "TBT"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.coding.userSelected",
        "path": "Organization.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.type.text",
        "path": "Organization.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.system",
        "path": "Organization.identifier.system",
        "min": 1,
        "fixedUri": "http://namespace.xt.dev/timerbee-tenant"
      },
      {
        "id": "Organization.identifier:tenantIdentifier.value",
        "path": "Organization.identifier.value",
        "short": "Tenant UUID",
        "definition": "UUID for the organization used by Timerbee to identify the tenant",
        "min": 1
      },
      {
        "id": "Organization.identifier:tenantIdentifier.period",
        "path": "Organization.identifier.period",
        "max": "0"
      },
      {
        "id": "Organization.identifier:tenantSystemId",
        "path": "Organization.identifier",
        "sliceName": "tenantSystemId",
        "short": "Identifies this organization as a Timerbee Tenant across multiple deployments",
        "definition": "Deployment-independent, stable identifier used by Timerbee to identify the tenant. Either this or the tenantIdentifier must be set.",
        "max": "1"
      },
      {
        "id": "Organization.identifier:tenantSystemId.type",
        "path": "Organization.identifier.type",
        "min": 1
      },
      {
        "id": "Organization.identifier:tenantSystemId.type.coding",
        "path": "Organization.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.identifier:tenantSystemId.type.coding.system",
        "path": "Organization.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/ProviderIdentifierType"
      },
      {
        "id": "Organization.identifier:tenantSystemId.type.coding.code",
        "path": "Organization.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "timerbee-tenant-system-id"
      },
      {
        "id": "Organization.identifier:tenantSystemId.system",
        "path": "Organization.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "Organization.identifier:tenantSystemId.value",
        "path": "Organization.identifier.value",
        "short": "Tenant System ID",
        "definition": "URI for the organization used by Timerbee to identify the tenant. This must be a URL or a urn-encoded OID, a urn-encoded UUID or another form of URN.",
        "min": 1
      }
    ]
  }
}