{
  "resourceType": "StructureDefinition",
  "id": "abstracthierarchicalorganizationprofile",
  "url": "http://fhir.xt.dev/StructureDefinition/AbstractHierarchicalOrganization",
  "version": "2.1.0",
  "name": "AbstractHierarchicalOrganization",
  "title": "Abstrakte Hierarchische Organisation",
  "status": "active",
  "experimental": false,
  "date": "2025-02-26T23:38:01.1306839+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Abstract base profile for all Organization profiles.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "DE"
        }
      ]
    }
  ],
  "purpose": "Common definition for all levels of the organization hierarchy.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": true,
  "type": "Organization",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Organization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Organization.meta",
        "path": "Organization.meta"
      },
      {
        "id": "Organization.meta.security",
        "path": "Organization.meta.security",
        "requirements": "There must be at least one security label to link the ressource to the Level 0 Organization.",
        "min": 1
      },
      {
        "id": "Organization.identifier",
        "path": "Organization.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Organization.identifier:primaryOrgId",
        "path": "Organization.identifier",
        "sliceName": "primaryOrgId",
        "short": "HPD Primary Org ID",
        "definition": "Primary ID of the organization in the x-tention Healthcare Provider Directory.",
        "min": 1,
        "max": "1",
        "patternIdentifier": {
          "type": {
            "coding": [
              {
                "system": "http://fhir.xt.dev/CodeSystem/ProviderIdentifierType",
                "code": "primary-org-id"
              }
            ]
          },
          "system": "urn:ietf:rfc:3986"
        }
      },
      {
        "id": "Organization.identifier:primaryOrgId.type",
        "path": "Organization.identifier.type",
        "min": 1
      },
      {
        "id": "Organization.identifier:primaryOrgId.type.coding",
        "path": "Organization.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.identifier:primaryOrgId.type.coding.system",
        "path": "Organization.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/ProviderIdentifierType"
      },
      {
        "id": "Organization.identifier:primaryOrgId.type.coding.code",
        "path": "Organization.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "primary-org-id"
      },
      {
        "id": "Organization.identifier:primaryOrgId.system",
        "path": "Organization.identifier.system",
        "requirements": "The identifier value must be globally unique, therefore the rfc 3986 system must be used.",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "Organization.identifier:primaryOrgId.value",
        "path": "Organization.identifier.value",
        "short": "URN-encoded OID of the Organization",
        "requirements": "The value must be an OID to provide better backwards-compatibility with older systems. The OID must be URN-encoded as defined by the FHIR spec (https://hl7.org/fhir/r4/datatypes.html#identifier).",
        "min": 1
      },
      {
        "id": "Organization.type",
        "path": "Organization.type",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "short": "Organisations-Typ",
        "definition": "Typ der Organisation aus dem IHE-Deutschland CodeSystem für die Einrichtungen der patientenbezogenen Gesundheitsversorgung oder aus dem x-tention CodeSystem für Organisationshierarchien.",
        "min": 1
      },
      {
        "id": "Organization.type:HierarchyElementType",
        "path": "Organization.type",
        "sliceName": "HierarchyElementType",
        "short": "Hierarchical Organization Type",
        "definition": "This slice identifies the type of organization. This type should be enough to determine the level of the organization hierarchy that this (sub-)organization is in. Examples for Germany are the \"IHE-Deutschland CodeSystem für die Einrichtungen der patientenbezogenen Gesundheitsversorgung\" or the \"x-tention CodeSystem für Organisationshierarchien\".",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.xt.dev/ValueSet/OrganizationHierarchy"
        }
      },
      {
        "id": "Organization.type:HierarchyElementType.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:HierarchyElementType.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1
      },
      {
        "id": "Organization.type:HierarchyElementType.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:HierarchyElementType.coding.userSelected",
        "path": "Organization.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Organization.type:HierarchyElementType.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.type:Flags",
        "path": "Organization.type",
        "sliceName": "Flags",
        "short": "Organization Type Flags",
        "definition": "Marks organizations as having certain properties, e.g. that they can be authorized to access a patient record..",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://fhir.xt.dev/CodeSystem/ProviderFlags"
            }
          ]
        },
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.xt.dev/ValueSet/ProviderOrganizationFlags"
        }
      },
      {
        "id": "Organization.type:Flags.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:Flags.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/ProviderFlags"
      },
      {
        "id": "Organization.type:Flags.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:Flags.coding.userSelected",
        "path": "Organization.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Organization.type:Flags.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.name",
        "path": "Organization.name",
        "min": 1
      },
      {
        "id": "Organization.telecom",
        "path": "Organization.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Organization.telecom:cmsLink",
        "path": "Organization.telecom",
        "sliceName": "cmsLink",
        "short": "Link to CMS page",
        "definition": "Link to the Organizations' CMS page",
        "max": "1"
      },
      {
        "id": "Organization.telecom:cmsLink.system",
        "path": "Organization.telecom.system",
        "min": 1,
        "fixedCode": "url"
      },
      {
        "id": "Organization.telecom:cmsLink.value",
        "path": "Organization.telecom.value",
        "min": 1
      },
      {
        "id": "Organization.telecom:cmsLink.use",
        "path": "Organization.telecom.use",
        "min": 1,
        "fixedCode": "work"
      }
    ]
  }
}