{
  "resourceType": "StructureDefinition",
  "id": "useraccountprofile",
  "url": "http://fhir.xt.dev/StructureDefinition/UserAccount",
  "version": "3.1.0",
  "name": "UserAccount",
  "status": "active",
  "experimental": false,
  "date": "2026-06-16T14:38:01.1306839+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This Person resource represents the user account and carries the up-to-date demographic and contact information. Users with user account may be non-professionals, like patients and representatives, or professionals, like nurses, admission staff, doctors, or therapists, whether they are internal or external to the customer.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Person",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Person",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Person.meta",
        "path": "Person.meta"
      },
      {
        "id": "Person.meta.tag",
        "path": "Person.meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable",
        "path": "Person.meta.tag",
        "sliceName": "matrixEncryptionKeysAvailable",
        "max": "1",
        "patternCoding": {
          "code": "matrix_encryption_keys_available"
        }
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable.system",
        "path": "Person.meta.tag.system",
        "max": "0"
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable.version",
        "path": "Person.meta.tag.version",
        "max": "0"
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable.code",
        "path": "Person.meta.tag.code",
        "min": 1,
        "fixedCode": "matrix_encryption_keys_available"
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable.display",
        "path": "Person.meta.tag.display",
        "max": "0"
      },
      {
        "id": "Person.meta.tag:matrixEncryptionKeysAvailable.userSelected",
        "path": "Person.meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "Person.language",
        "path": "Person.language",
        "max": "0"
      },
      {
        "id": "Person.extension:preferredLanguage",
        "path": "Person.extension",
        "sliceName": "preferredLanguage",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/PreferredLanguage"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.extension:userCategory",
        "path": "Person.extension",
        "sliceName": "userCategory",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/UserCategory"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.extension:assignedDigitalService",
        "path": "Person.extension",
        "sliceName": "assignedDigitalService",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssignedDigitalService"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.identifier",
        "path": "Person.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Person.identifier:otherUserIds",
        "path": "Person.identifier",
        "sliceName": "otherUserIds",
        "patternIdentifier": {
          "type": {
            "coding": [
              {
                "system": "http://fhir.xt.dev/CodeSystem/IdentifierType",
                "code": "OUID"
              }
            ]
          }
        }
      },
      {
        "id": "Person.identifier:otherUserIds.use",
        "path": "Person.identifier.use",
        "max": "0"
      },
      {
        "id": "Person.identifier:otherUserIds.type",
        "path": "Person.identifier.type",
        "min": 1
      },
      {
        "id": "Person.identifier:otherUserIds.type.coding",
        "path": "Person.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Person.identifier:otherUserIds.type.coding.system",
        "path": "Person.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "Person.identifier:otherUserIds.type.coding.version",
        "path": "Person.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Person.identifier:otherUserIds.type.coding.code",
        "path": "Person.identifier.type.coding.code",
        "short": "Other UserIds",
        "min": 1,
        "fixedCode": "OUID"
      },
      {
        "id": "Person.identifier:otherUserIds.type.coding.userSelected",
        "path": "Person.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Person.identifier:otherUserIds.type.text",
        "path": "Person.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Person.identifier:otherUserIds.system",
        "path": "Person.identifier.system",
        "short": "Issuer of the userId",
        "definition": "The issuer of this userId, as communicated in the \"iss\" token attribute.",
        "min": 1
      },
      {
        "id": "Person.identifier:otherUserIds.value",
        "path": "Person.identifier.value",
        "short": "userId Subject",
        "definition": "The \"sub\" token attribute of this userId.",
        "min": 1
      },
      {
        "id": "Person.identifier:otherUserIds.period",
        "path": "Person.identifier.period",
        "max": "0"
      },
      {
        "id": "Person.identifier:otherUserIds.assigner",
        "path": "Person.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId",
        "path": "Person.identifier",
        "sliceName": "userId",
        "short": "Internal userId",
        "definition": "UserId issued by Orchestra eHealth Suite Onboarding components. Other IdPs additionally have their own UserIds, which are stored in the otherUserIds slice.",
        "min": 1,
        "max": "1",
        "patternIdentifier": {
          "type": {
            "coding": [
              {
                "system": "http://fhir.xt.dev/CodeSystem/IdentifierType",
                "code": "USID"
              }
            ]
          }
        }
      },
      {
        "id": "Person.identifier:userId.use",
        "path": "Person.identifier.use",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId.type",
        "path": "Person.identifier.type",
        "min": 1
      },
      {
        "id": "Person.identifier:userId.type.coding",
        "path": "Person.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Person.identifier:userId.type.coding.system",
        "path": "Person.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "Person.identifier:userId.type.coding.version",
        "path": "Person.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId.type.coding.code",
        "path": "Person.identifier.type.coding.code",
        "short": "Onboarding UserId",
        "min": 1,
        "fixedCode": "USID"
      },
      {
        "id": "Person.identifier:userId.type.coding.userSelected",
        "path": "Person.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId.type.text",
        "path": "Person.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId.system",
        "path": "Person.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "Person.identifier:userId.value",
        "path": "Person.identifier.value",
        "definition": "Must be a URN-encoded UUID",
        "min": 1
      },
      {
        "id": "Person.identifier:userId.period",
        "path": "Person.identifier.period",
        "max": "0"
      },
      {
        "id": "Person.identifier:userId.assigner",
        "path": "Person.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Person.name",
        "path": "Person.name",
        "max": "1"
      },
      {
        "id": "Person.name.extension",
        "path": "Person.name.extension",
        "min": 1
      },
      {
        "id": "Person.name.extension:assuranceLevel",
        "path": "Person.name.extension",
        "sliceName": "assuranceLevel",
        "short": "Assurance Level for Name",
        "definition": "The assurance level for the person's name. The verification process must cover all included attributes of the name, including prefix and suffix.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.name.use",
        "path": "Person.name.use",
        "max": "0"
      },
      {
        "id": "Person.name.period",
        "path": "Person.name.period",
        "max": "0"
      },
      {
        "id": "Person.telecom",
        "path": "Person.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.telecom:phone",
        "path": "Person.telecom",
        "sliceName": "phone",
        "short": "A phone number",
        "definition": "There may be up to two phone numbers, a mobile and a landline, distinguishable by use.",
        "max": "2"
      },
      {
        "id": "Person.telecom:phone.extension",
        "path": "Person.telecom.extension",
        "min": 1
      },
      {
        "id": "Person.telecom:phone.extension:assuranceLevel",
        "path": "Person.telecom.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.telecom:phone.system",
        "path": "Person.telecom.system",
        "min": 1,
        "fixedCode": "phone"
      },
      {
        "id": "Person.telecom:phone.value",
        "path": "Person.telecom.value",
        "short": "The mobile phone number",
        "min": 1
      },
      {
        "id": "Person.telecom:phone.use",
        "path": "Person.telecom.use",
        "short": "home | mobile - purpose of this contact point",
        "definition": "Identifies the purpose for the contact point. Should be one of home or mobile.",
        "min": 1
      },
      {
        "id": "Person.telecom:phone.period",
        "path": "Person.telecom.period",
        "max": "0"
      },
      {
        "id": "Person.telecom:email",
        "path": "Person.telecom",
        "sliceName": "email",
        "short": "The email address"
      },
      {
        "id": "Person.telecom:email.extension",
        "path": "Person.telecom.extension",
        "min": 1
      },
      {
        "id": "Person.telecom:email.extension:assuranceLevel",
        "path": "Person.telecom.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.telecom:email.system",
        "path": "Person.telecom.system",
        "min": 1,
        "fixedCode": "email"
      },
      {
        "id": "Person.telecom:email.value",
        "path": "Person.telecom.value",
        "short": "The email address",
        "min": 1
      },
      {
        "id": "Person.telecom:email.period",
        "path": "Person.telecom.period",
        "max": "0"
      },
      {
        "id": "Person.telecom:matrixId",
        "path": "Person.telecom",
        "sliceName": "matrixId",
        "short": "The matrix ID"
      },
      {
        "id": "Person.telecom:matrixId.extension:matrixEncryptionKeysAvailable",
        "path": "Person.telecom.extension",
        "sliceName": "matrixEncryptionKeysAvailable",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/MatrixEncryptionKeysAvailable"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.telecom:matrixId.system",
        "path": "Person.telecom.system",
        "min": 1,
        "fixedCode": "url"
      },
      {
        "id": "Person.telecom:matrixId.value",
        "path": "Person.telecom.value",
        "short": "The matrix ID",
        "definition": "The matrix ID as a URL in the form \"matrix:u/@\" followed by the local part, a colon and the server name",
        "min": 1,
        "constraint": [
          {
            "key": "uap-1",
            "severity": "error",
            "human": "Must start with matrix:",
            "expression": "startsWith('matrix:')"
          }
        ]
      },
      {
        "id": "Person.telecom:matrixId.period",
        "path": "Person.telecom.period",
        "max": "0"
      },
      {
        "id": "Person.gender.extension",
        "path": "Person.gender.extension",
        "min": 1
      },
      {
        "id": "Person.gender.extension:assuranceLevel",
        "path": "Person.gender.extension",
        "sliceName": "assuranceLevel",
        "short": "Assurance level for gender",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.birthDate.extension",
        "path": "Person.birthDate.extension",
        "min": 1
      },
      {
        "id": "Person.birthDate.extension:assuranceLevel",
        "path": "Person.birthDate.extension",
        "sliceName": "assuranceLevel",
        "short": "Assurance level for birth date",
        "definition": "The assurance level applies to the whole birth date.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.address",
        "path": "Person.address",
        "max": "1"
      },
      {
        "id": "Person.address.extension",
        "path": "Person.address.extension",
        "min": 1
      },
      {
        "id": "Person.address.extension:assuranceLevel",
        "path": "Person.address.extension",
        "sliceName": "assuranceLevel",
        "short": "Assurance Level for the address",
        "definition": "The assurance level applies to all elements of the address, including district and state.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Person.address.use",
        "path": "Person.address.use",
        "short": "home - fixed",
        "definition": "Fixed to home. For a professional's work address, use the PractitionerRole or Organization resource.",
        "min": 1,
        "fixedCode": "home"
      },
      {
        "id": "Person.address.type",
        "path": "Person.address.type",
        "max": "0"
      },
      {
        "id": "Person.address.text",
        "path": "Person.address.text",
        "max": "0"
      },
      {
        "id": "Person.address.line",
        "path": "Person.address.line",
        "max": "1"
      },
      {
        "id": "Person.address.period",
        "path": "Person.address.period",
        "max": "0"
      },
      {
        "id": "Person.managingOrganization",
        "path": "Person.managingOrganization",
        "short": "The level 0 organization that is the custodian",
        "definition": "The level 0 organization (\"Träger\") that is the custodian of a professional user account. Not applicable for non-professional user accounts."
      },
      {
        "id": "Person.active",
        "path": "Person.active",
        "min": 1
      },
      {
        "id": "Person.link",
        "path": "Person.link",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "target.type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.link:patient",
        "path": "Person.link",
        "sliceName": "patient",
        "short": "Link to the patient resource of this person",
        "definition": "Link to a patient resource that concerns the same actual person.",
        "max": "1"
      },
      {
        "id": "Person.link:patient.target",
        "path": "Person.link.target",
        "short": "The patient resource to which this actual person is associated",
        "definition": "The patient resource to which this actual person is associated, using a literal reference.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Person.link:patient.target.reference",
        "path": "Person.link.target.reference",
        "min": 1
      },
      {
        "id": "Person.link:patient.target.type",
        "path": "Person.link.target.type",
        "min": 1,
        "fixedUri": "Patient"
      },
      {
        "id": "Person.link:patient.target.identifier",
        "path": "Person.link.target.identifier",
        "max": "0"
      },
      {
        "id": "Person.link:patient.target.display",
        "path": "Person.link.target.display",
        "max": "0"
      },
      {
        "id": "Person.link:patient.assurance",
        "path": "Person.link.assurance",
        "definition": "Level of assurance that this link is associated with the target resource. Use Level 1 to 4 as equivalents to http://fhir.xt.dev/CodeSystem/AssuranceLevelsXtEu",
        "min": 1
      },
      {
        "id": "Person.link:representative",
        "path": "Person.link",
        "sliceName": "representative",
        "short": "Link to a relatedPerson resource that concerns the same actual person",
        "definition": "Link to a relatedPerson resource that concerns the same actual person."
      },
      {
        "id": "Person.link:representative.target",
        "path": "Person.link.target",
        "short": "The relatedPerson resource to which this actual person is associated",
        "definition": "The relatedPerson resource to which this actual person is associated. Please note that multiple representation relationships will lead to multiple relatedPerson resources for one actual person.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Person.link:representative.target.reference",
        "path": "Person.link.target.reference",
        "min": 1
      },
      {
        "id": "Person.link:representative.target.type",
        "path": "Person.link.target.type",
        "min": 1,
        "fixedUri": "RelatedPerson"
      },
      {
        "id": "Person.link:representative.target.identifier",
        "path": "Person.link.target.identifier",
        "max": "0"
      },
      {
        "id": "Person.link:representative.assurance",
        "path": "Person.link.assurance",
        "definition": "Level of assurance that this link is associated with the target resource. Use Level 1 to 4 as equivalents to http://fhir.xt.dev/CodeSystem/AssuranceLevelsXtEu",
        "min": 1
      },
      {
        "id": "Person.link:practitioner",
        "path": "Person.link",
        "sliceName": "practitioner",
        "max": "1"
      },
      {
        "id": "Person.link:practitioner.target",
        "path": "Person.link.target",
        "short": "The practitioner resource to which this actual person is associated",
        "definition": "The practitioner  resource to which this actual person is associated.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Person.link:practitioner.target.reference",
        "path": "Person.link.target.reference",
        "min": 1
      },
      {
        "id": "Person.link:practitioner.target.type",
        "path": "Person.link.target.type",
        "min": 1,
        "fixedUri": "Practitioner"
      },
      {
        "id": "Person.link:practitioner.target.identifier",
        "path": "Person.link.target.identifier",
        "max": "0"
      },
      {
        "id": "Person.link:practitioner.assurance",
        "path": "Person.link.assurance",
        "definition": "Level of assurance that this link is associated with the target resource. Use Level 1 to 4 as equivalents to http://fhir.xt.dev/CodeSystem/AssuranceLevelsXtEu",
        "min": 1
      }
    ]
  }
}