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