{
  "resourceType": "StructureDefinition",
  "id": "representative-profile",
  "url": "http://fhir.xt.dev/StructureDefinition/Representative",
  "version": "1.1.1",
  "name": "Representative",
  "status": "active",
  "experimental": false,
  "date": "2024-10-04T10:09:48.7183187+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The resource describes the representative only in relation to the patient. An actual user may have multiple Representative resources that each symbolize an relationship to exactly one patient. The demographic and contact data is the data recorded and verified when the relationship was established. The user may be a professional or a non-professional.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "RelatedPerson",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "RelatedPerson.language",
        "path": "RelatedPerson.language",
        "max": "0"
      },
      {
        "id": "RelatedPerson.extension:ConsentDocumentId",
        "path": "RelatedPerson.extension",
        "sliceName": "ConsentDocumentId",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/ConsentDocument"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.identifier",
        "path": "RelatedPerson.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.system"
            },
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:userId",
        "path": "RelatedPerson.identifier",
        "sliceName": "userId",
        "short": "Internal userId",
        "definition": "UserId issued by Orchestra eHealth Suite Onboarding components. Not used for external userIds from other IdPs.",
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:userId.use",
        "path": "RelatedPerson.identifier.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:userId.type",
        "path": "RelatedPerson.identifier.type",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:userId.type.coding",
        "path": "RelatedPerson.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:userId.type.coding.system",
        "path": "RelatedPerson.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "RelatedPerson.identifier:userId.type.coding.version",
        "path": "RelatedPerson.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:userId.type.coding.code",
        "path": "RelatedPerson.identifier.type.coding.code",
        "short": "Onboarding UserId",
        "min": 1,
        "fixedCode": "USID"
      },
      {
        "id": "RelatedPerson.identifier:userId.type.coding.userSelected",
        "path": "RelatedPerson.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:userId.type.text",
        "path": "RelatedPerson.identifier.type.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:userId.system",
        "path": "RelatedPerson.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "RelatedPerson.identifier:userId.value",
        "path": "RelatedPerson.identifier.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:userId.period",
        "path": "RelatedPerson.identifier.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:userId.assigner",
        "path": "RelatedPerson.identifier.assigner",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId",
        "path": "RelatedPerson.identifier",
        "sliceName": "otherUserId",
        "short": "Other UserIds",
        "definition": "UserId issued by an external IdP, i.e. not issued by the Orchestra eHealth Suite Onboarding component."
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.use",
        "path": "RelatedPerson.identifier.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type",
        "path": "RelatedPerson.identifier.type",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.coding",
        "path": "RelatedPerson.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.coding.system",
        "path": "RelatedPerson.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.coding.version",
        "path": "RelatedPerson.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.coding.code",
        "path": "RelatedPerson.identifier.type.coding.code",
        "short": "Other UserIds",
        "min": 1,
        "fixedCode": "OUID"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.coding.userSelected",
        "path": "RelatedPerson.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.type.text",
        "path": "RelatedPerson.identifier.type.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.system",
        "path": "RelatedPerson.identifier.system",
        "short": "Issuer of the userId",
        "definition": "The issuer of this userId, as communicated in the \"iss\" token attribute.",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.value",
        "path": "RelatedPerson.identifier.value",
        "short": "userId Subject",
        "definition": "The \"sub\" token attribute of this userId.",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.period",
        "path": "RelatedPerson.identifier.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:otherUserId.assigner",
        "path": "RelatedPerson.identifier.assigner",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId",
        "path": "RelatedPerson.identifier",
        "sliceName": "verificationId",
        "short": "Verification ID",
        "definition": "Unique identifier of the verification process.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.use",
        "path": "RelatedPerson.identifier.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type",
        "path": "RelatedPerson.identifier.type",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.coding",
        "path": "RelatedPerson.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.coding.system",
        "path": "RelatedPerson.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.coding.version",
        "path": "RelatedPerson.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.coding.code",
        "path": "RelatedPerson.identifier.type.coding.code",
        "short": "Verification ID",
        "min": 1,
        "fixedCode": "VPID"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.coding.userSelected",
        "path": "RelatedPerson.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.type.text",
        "path": "RelatedPerson.identifier.type.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.system",
        "path": "RelatedPerson.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.value",
        "path": "RelatedPerson.identifier.value",
        "short": "Verification ID",
        "definition": "Unique identifier of the verification process. Communicated in the representativeVerified Event as \"verifiedRepresentationData.verificationId\".",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:verificationId.period",
        "path": "RelatedPerson.identifier.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:verificationId.assigner",
        "path": "RelatedPerson.identifier.assigner",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId",
        "path": "RelatedPerson.identifier",
        "sliceName": "representativeAccountPatientId",
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.use",
        "path": "RelatedPerson.identifier.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type",
        "path": "RelatedPerson.identifier.type",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.coding",
        "path": "RelatedPerson.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.coding.system",
        "path": "RelatedPerson.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/IdentifierType"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.coding.version",
        "path": "RelatedPerson.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.coding.code",
        "path": "RelatedPerson.identifier.type.coding.code",
        "short": "Representative Account Patient",
        "definition": "This represents a patient identifier for the verified patient in the representative context",
        "min": 1,
        "fixedCode": "RPN"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.coding.userSelected",
        "path": "RelatedPerson.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.type.text",
        "path": "RelatedPerson.identifier.type.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.system",
        "path": "RelatedPerson.identifier.system",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.value",
        "path": "RelatedPerson.identifier.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.period",
        "path": "RelatedPerson.identifier.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier:representativeAccountPatientId.assigner",
        "path": "RelatedPerson.identifier.assigner",
        "max": "0"
      },
      {
        "id": "RelatedPerson.active",
        "path": "RelatedPerson.active",
        "min": 1
      },
      {
        "id": "RelatedPerson.patient",
        "path": "RelatedPerson.patient",
        "definition": "The patient this person is related to. Must have an identifier or reference set."
      },
      {
        "id": "RelatedPerson.patient.reference",
        "path": "RelatedPerson.patient.reference",
        "short": "Literal reference",
        "definition": "A reference to a location at which the other resource is found. The reference MUST be a relative reference to the service base URL."
      },
      {
        "id": "RelatedPerson.patient.type",
        "path": "RelatedPerson.patient.type",
        "min": 1,
        "fixedUri": "Patient"
      },
      {
        "id": "RelatedPerson.patient.identifier",
        "path": "RelatedPerson.patient.identifier",
        "short": "Facility patient identifier",
        "definition": "This represents a patient identifier for the verified patient in the representative context. Other systems SHALL use this identifier to reference the (local/ facility) patient."
      },
      {
        "id": "RelatedPerson.patient.identifier.use",
        "path": "RelatedPerson.patient.identifier.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.identifier.system",
        "path": "RelatedPerson.patient.identifier.system",
        "min": 1
      },
      {
        "id": "RelatedPerson.patient.identifier.value",
        "path": "RelatedPerson.patient.identifier.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.patient.identifier.period",
        "path": "RelatedPerson.patient.identifier.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.identifier.assigner",
        "path": "RelatedPerson.patient.identifier.assigner",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship",
        "path": "RelatedPerson.relationship",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.relationship.coding",
        "path": "RelatedPerson.relationship.coding",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "Accepted Guardian Types",
          "valueSet": "http://fhir.xt.dev/ValueSet/GuardianTypes"
        }
      },
      {
        "id": "RelatedPerson.relationship.coding.system",
        "path": "RelatedPerson.relationship.coding.system",
        "min": 1
      },
      {
        "id": "RelatedPerson.relationship.coding.version",
        "path": "RelatedPerson.relationship.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.coding.code",
        "path": "RelatedPerson.relationship.coding.code",
        "min": 1
      },
      {
        "id": "RelatedPerson.relationship.coding.userSelected",
        "path": "RelatedPerson.relationship.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.text",
        "path": "RelatedPerson.relationship.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.extension",
        "path": "RelatedPerson.name.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.name.extension:assuranceLevel",
        "path": "RelatedPerson.name.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.telecom",
        "path": "RelatedPerson.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "RelatedPerson.telecom:mobile",
        "path": "RelatedPerson.telecom",
        "sliceName": "mobile"
      },
      {
        "id": "RelatedPerson.telecom:mobile.extension",
        "path": "RelatedPerson.telecom.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:mobile.extension:assuranceLevel",
        "path": "RelatedPerson.telecom.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.telecom:mobile.system",
        "path": "RelatedPerson.telecom.system",
        "min": 1,
        "fixedCode": "phone"
      },
      {
        "id": "RelatedPerson.telecom:mobile.value",
        "path": "RelatedPerson.telecom.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:mobile.use",
        "path": "RelatedPerson.telecom.use",
        "min": 1,
        "fixedCode": "mobile"
      },
      {
        "id": "RelatedPerson.telecom:mobile.period",
        "path": "RelatedPerson.telecom.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.telecom:landline",
        "path": "RelatedPerson.telecom",
        "sliceName": "landline"
      },
      {
        "id": "RelatedPerson.telecom:landline.extension",
        "path": "RelatedPerson.telecom.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:landline.extension:assuranceLevel",
        "path": "RelatedPerson.telecom.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.telecom:landline.system",
        "path": "RelatedPerson.telecom.system",
        "min": 1,
        "fixedCode": "phone"
      },
      {
        "id": "RelatedPerson.telecom:landline.value",
        "path": "RelatedPerson.telecom.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:landline.use",
        "path": "RelatedPerson.telecom.use",
        "min": 1,
        "fixedCode": "home"
      },
      {
        "id": "RelatedPerson.telecom:landline.period",
        "path": "RelatedPerson.telecom.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.telecom:email",
        "path": "RelatedPerson.telecom",
        "sliceName": "email"
      },
      {
        "id": "RelatedPerson.telecom:email.extension",
        "path": "RelatedPerson.telecom.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:email.extension:assuranceLevel",
        "path": "RelatedPerson.telecom.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.telecom:email.system",
        "path": "RelatedPerson.telecom.system",
        "min": 1,
        "fixedCode": "email"
      },
      {
        "id": "RelatedPerson.telecom:email.value",
        "path": "RelatedPerson.telecom.value",
        "min": 1
      },
      {
        "id": "RelatedPerson.telecom:email.period",
        "path": "RelatedPerson.telecom.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.gender.extension",
        "path": "RelatedPerson.gender.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.gender.extension:assuranceLevel",
        "path": "RelatedPerson.gender.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.birthDate.extension",
        "path": "RelatedPerson.birthDate.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.birthDate.extension:assuranceLevel",
        "path": "RelatedPerson.birthDate.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.address.extension",
        "path": "RelatedPerson.address.extension",
        "min": 1
      },
      {
        "id": "RelatedPerson.address.extension:assuranceLevel",
        "path": "RelatedPerson.address.extension",
        "sliceName": "assuranceLevel",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/AssuranceLevel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "RelatedPerson.period",
        "path": "RelatedPerson.period",
        "min": 1
      },
      {
        "id": "RelatedPerson.period.start",
        "path": "RelatedPerson.period.start",
        "definition": "The start of the representation, must be consistent with the context period of the linked consent document.",
        "min": 1
      },
      {
        "id": "RelatedPerson.period.end",
        "path": "RelatedPerson.period.end",
        "definition": "The end of the representation, must be consistent with the context period of the linked consent document."
      },
      {
        "id": "RelatedPerson.communication",
        "path": "RelatedPerson.communication",
        "max": "0"
      }
    ]
  }
}