{
  "resourceType": "StructureDefinition",
  "id": "organizationspecificconceptmap-cm",
  "url": "http://fhir.xt.dev/StructureDefinition/OrganizationSpecificConceptMap",
  "version": "1.1.0",
  "name": "OrganizationSpecificConceptMap",
  "status": "active",
  "date": "2026-07-13T16:00:55.8454792+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "A profile defining an organization specific concept map. Used when importing specific facility codes.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ConceptMap",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ConceptMap",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ConceptMap.meta",
        "path": "ConceptMap.meta"
      },
      {
        "id": "ConceptMap.meta.security",
        "path": "ConceptMap.meta.security",
        "definition": "Security labels applied to this resource. At least one security label should be included to identify the owner organization (usually a Level 1 org) with system \"urn:ietf:rfc:3986\" and the primary-org-id (prefixed with \"urn:oid:\") as code, consistent with the useContext organizationSlice."
      },
      {
        "id": "ConceptMap.url",
        "path": "ConceptMap.url",
        "short": "Canonical OID for this value set, represented as a URI",
        "min": 1
      },
      {
        "id": "ConceptMap.identifier",
        "path": "ConceptMap.identifier",
        "min": 1
      },
      {
        "id": "ConceptMap.identifier.system",
        "path": "ConceptMap.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "ConceptMap.identifier.value",
        "path": "ConceptMap.identifier.value",
        "min": 1
      },
      {
        "id": "ConceptMap.experimental",
        "path": "ConceptMap.experimental",
        "fixedBoolean": false
      },
      {
        "id": "ConceptMap.date",
        "path": "ConceptMap.date",
        "min": 1
      },
      {
        "id": "ConceptMap.publisher",
        "path": "ConceptMap.publisher",
        "min": 1
      },
      {
        "id": "ConceptMap.useContext",
        "path": "ConceptMap.useContext",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code.system"
            },
            {
              "type": "value",
              "path": "code.code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "ConceptMap.useContext:organizationSlice",
        "path": "ConceptMap.useContext",
        "sliceName": "organizationSlice",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.code.system",
        "path": "ConceptMap.useContext.code.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/TerminologyUseContexts"
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.code.version",
        "path": "ConceptMap.useContext.code.version",
        "max": "0"
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.code.code",
        "path": "ConceptMap.useContext.code.code",
        "min": 1,
        "fixedCode": "organization"
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.code.display",
        "path": "ConceptMap.useContext.code.display",
        "definition": "A representation of the meaning of the code in the system, following the rules of the system (e.g. Organization.name)."
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.code.userSelected",
        "path": "ConceptMap.useContext.code.userSelected",
        "max": "0"
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.value[x]",
        "path": "ConceptMap.useContext.value[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "ConceptMap.useContext:organizationSlice.value[x].display",
        "path": "ConceptMap.useContext.value[x].display",
        "min": 1
      },
      {
        "id": "ConceptMap.useContext:focusSlice",
        "path": "ConceptMap.useContext",
        "sliceName": "focusSlice",
        "max": "1"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.code.system",
        "path": "ConceptMap.useContext.code.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/usage-context-type"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.code.code",
        "path": "ConceptMap.useContext.code.code",
        "min": 1,
        "fixedCode": "focus"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x]",
        "path": "ConceptMap.useContext.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].coding",
        "path": "ConceptMap.useContext.value[x].coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].coding.system",
        "path": "ConceptMap.useContext.value[x].coding.system",
        "min": 1
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].coding.version",
        "path": "ConceptMap.useContext.value[x].coding.version",
        "max": "0"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].coding.code",
        "path": "ConceptMap.useContext.value[x].coding.code",
        "min": 1
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].coding.userSelected",
        "path": "ConceptMap.useContext.value[x].coding.userSelected",
        "max": "0"
      },
      {
        "id": "ConceptMap.useContext:focusSlice.value[x].text",
        "path": "ConceptMap.useContext.value[x].text",
        "max": "0"
      },
      {
        "id": "ConceptMap.group",
        "path": "ConceptMap.group",
        "min": 1
      },
      {
        "id": "ConceptMap.group.source",
        "path": "ConceptMap.group.source",
        "min": 1
      },
      {
        "id": "ConceptMap.group.target",
        "path": "ConceptMap.group.target",
        "min": 1
      },
      {
        "id": "ConceptMap.group.element.code",
        "path": "ConceptMap.group.element.code",
        "min": 1
      },
      {
        "id": "ConceptMap.group.element.target.code",
        "path": "ConceptMap.group.element.target.code",
        "min": 1
      },
      {
        "id": "ConceptMap.group.element.target.equivalence",
        "path": "ConceptMap.group.element.target.equivalence",
        "constraint": [
          {
            "key": "inv-equivalence-1",
            "severity": "error",
            "human": "The equivalence must be one of equivalent | equal | wider | narrower",
            "expression": "$this.exists() and ($this = 'equivalent' or $this = 'equal' or $this = 'wider' or $this = 'narrower')"
          }
        ]
      },
      {
        "id": "ConceptMap.group.unmapped.mode",
        "path": "ConceptMap.group.unmapped.mode",
        "fixedCode": "fixed"
      },
      {
        "id": "ConceptMap.group.unmapped.code",
        "path": "ConceptMap.group.unmapped.code",
        "min": 1
      }
    ]
  }
}