Schema reference / Tables / view MDX source
person
Demographics and administrative information about a person independent of a specific health-related context.
Demographics and administrative information about a person independent of a specific health-related context.
Source
| Model | Leg | Role |
|---|---|---|
Person | FHIR | defines this table |
openEHR-EHR-CLUSTER.address.v1 | openEHR | merged in — Address |
openEHR-EHR-CLUSTER.electronic_communication.v1 | openEHR | merged in — Electronic communication |
openEHR-EHR-CLUSTER.person.v1 | openEHR | merged in — Person |
This table is the union of 4 source models. Columns carrying a From value came from a model that merged into it, so the same row satisfies both specifications.
Columns
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Person.id | — | — |
created_at | timestamptz | no | Row creation timestamp. | — | — |
updated_at | timestamptz | no | Row update timestamp; maintained by the application. | — | — |
created_by | text | no | Actor who created the row. | — | — |
updated_by | text | no | Actor who last updated the row. | — | — |
identifier_valueidentifier_system | text, texttext, text | yes | A human identifier for this person | — | Person.identifier |
name_textname_prefixname_familyname_givenname_suffix | text, text, text, text, texttext, text, text, text, text | yes | A name associated with the person | — | Person.name |
phone_numberphone_use_codeemailemail_use_code | text, text, text, texttext, text, text, text | yes | A contact detail for the person | — | Person.telecom |
gender | text | yes | male | female | other | unknown | — | Person.gender |
birth_date | date | yes | The date on which the person was born | — | Person.birthDate |
address_lineaddress_cityaddress_districtaddress_stateaddress_postal_codeaddress_countryaddress_use_codeaddress_type_code | text, text, text, text, text, text, text, texttext, text, text, text, text, text, text, text | yes | One or more addresses for the person | — | Person.address |
photo | uuid → attachment | yes | Image of the person | — | Person.photo |
managing_organization_id | uuid | yes | The organization that is the custodian of the person record | — | Person.managingOrganization |
active | boolean | yes | This person's record is in active use | — | Person.active |
address_latitude_magnitudeaddress_latitude_units | quantitynumeric, text | yes | Latitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0007] |
address_longitude_magnitudeaddress_longitude_units | quantitynumeric, text | yes | Longitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0008] |
address_altitude_magnitudeaddress_altitude_units | quantitynumeric, text | yes | Altitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0009] |
address_comment | text | yes | Comment | openEHR-EHR-CLUSTER.address.v1 | /items[at0018] |
address_map_url | text | yes | Map URL | openEHR-EHR-CLUSTER.address.v1 | /items[at0019] |
address_geolocation_code | text | yes | Geolocation code | openEHR-EHR-CLUSTER.address.v1 | /items[at0021] |
phone_commentemail_comment | text, texttext, text | yes | Comment | openEHR-EHR-CLUSTER.electronic_communication.v1 | /items[at0004] |
role | text | yes | Role | openEHR-EHR-CLUSTER.person.v1 | /items[at0004] |
comment | text | yes | Comment | openEHR-EHR-CLUSTER.person.v1 | /items[at0010] |
label | text | yes | Label | openEHR-EHR-CLUSTER.person.v1 | /items[at0011] |
Constraints
check (identifier_system is null or identifier_value is not null)
check ((address_latitude_magnitude is null and address_latitude_units is null) or (address_latitude_magnitude is not null and address_latitude_units is not null))
check (address_latitude_magnitude is null or (address_latitude_units = 'deg' and address_latitude_magnitude between -90 and 90))
check ((address_longitude_magnitude is null and address_longitude_units is null) or (address_longitude_magnitude is not null and address_longitude_units is not null))
check (address_longitude_magnitude is null or (address_longitude_units = 'deg' and address_longitude_magnitude between -180 and 180))
check ((address_altitude_magnitude is null and address_altitude_units is null) or (address_altitude_magnitude is not null and address_altitude_units is not null))References
| Columns | Target | On delete |
|---|---|---|
photo | attachment | restrict |
managing_organization_id | organization | no action |
Referenced by
24 tables reference person, via person_id. The first 15 alphabetically:
advance_care_directive_witnessviaperson_idadvance_care_directive_directive_locationviacopy_holderadverse_reaction_event_information_sourceviaperson_idexposure_screening_specific_exposure_additional_detailsviaperson_idfamily_history_per_family_member_family_member_detailsviaperson_idfunctional_support_requirements_support_person_detailsviaperson_idimaging_exam_resultviadistribution_list_personimaging_exam_result_examination_request_details_requesterviaperson_idlaboratory_test_result_test_request_detailsviarequesterperson_other_identifierviaperson_idperson_other_nameviaperson_idperson_other_telecomviaperson_idperson_other_addressviaperson_idperson_linkviaperson_idperson_linkviatarget_person_id
Indexes
person_photo_idxonphotoperson_managing_organization_id_idxonmanaging_organization_id
Child tables
5 tables hang off person, one row per repetition.
person_other_identifier
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
person_id | uuid → person | no | — | — | — |
identifier_value | text | no | — | — | — |
identifier_system | text | yes | — | — | — |
identifier_use | text | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
Unique
person_id, identifier_system, identifier_value
References
| Columns | Target | On delete |
|---|---|---|
person_id | person | cascade |
person_other_name
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
person_id | uuid → person | no | — | — | — |
use_code | text | yes | — | — | — |
name_text | text | yes | — | — | — |
name_prefix | text | yes | — | — | — |
name_family | text | yes | — | — | — |
name_given | text | yes | — | — | — |
name_suffix | text | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
References
| Columns | Target | On delete |
|---|---|---|
person_id | person | cascade |
Indexes
person_other_name_person_id_idxonperson_id
person_other_telecom
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
person_id | uuid → person | no | — | — | — |
system | text | no | — | — | — |
value | text | no | — | — | — |
use_code | text | yes | — | — | — |
rank | integer | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
comment | text | yes | Comment | openEHR-EHR-CLUSTER.electronic_communication.v1 | /items[at0004] |
References
| Columns | Target | On delete |
|---|---|---|
person_id | person | cascade |
Indexes
person_other_telecom_person_id_idxonperson_id
person_other_address
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
person_id | uuid → person | no | — | — | — |
address_line | text | yes | newline-delimited for multiple lines | — | — |
address_city | text | yes | — | — | — |
address_district | text | yes | — | — | — |
address_state | text | yes | — | — | — |
address_postal_code | text | yes | — | — | — |
address_country | text | yes | — | — | — |
use_code | text | yes | — | — | — |
type_code | text | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
address_latitude_magnitudeaddress_latitude_units | quantitynumeric, text | yes | Latitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0007] |
address_longitude_magnitudeaddress_longitude_units | quantitynumeric, text | yes | Longitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0008] |
address_altitude_magnitudeaddress_altitude_units | quantitynumeric, text | yes | Altitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0009] |
address_comment | text | yes | Comment | openEHR-EHR-CLUSTER.address.v1 | /items[at0018] |
address_map_url | text | yes | Map URL | openEHR-EHR-CLUSTER.address.v1 | /items[at0019] |
address_geolocation_code | text | yes | Geolocation code | openEHR-EHR-CLUSTER.address.v1 | /items[at0021] |
Constraints
check ((address_latitude_magnitude is null and address_latitude_units is null) or (address_latitude_magnitude is not null and address_latitude_units is not null))
check (address_latitude_magnitude is null or (address_latitude_units = 'deg' and address_latitude_magnitude between -90 and 90))
check ((address_longitude_magnitude is null and address_longitude_units is null) or (address_longitude_magnitude is not null and address_longitude_units is not null))
check (address_longitude_magnitude is null or (address_longitude_units = 'deg' and address_longitude_magnitude between -180 and 180))
check ((address_altitude_magnitude is null and address_altitude_units is null) or (address_altitude_magnitude is not null and address_altitude_units is not null))References
| Columns | Target | On delete |
|---|---|---|
person_id | person | cascade |
Indexes
person_other_address_person_id_idxonperson_id
person_link
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
person_id | uuid → person | no | — | — | — |
target_patient_idtarget_person_idtarget_practitioner_idtarget_related_person_id | uuid, uuid, uuid, uuiduuid, uuid, uuid, uuid | yes | The resource to which this actual person is associated | — | Person.link.target |
assurance | text | yes | level1 | level2 | level3 | level4 | — | Person.link.assurance |
Constraints
check (num_nonnulls(target_patient_id, target_person_id, target_practitioner_id, target_related_person_id) <= 1)References
| Columns | Target | On delete |
|---|---|---|
person_id | person | cascade |
target_patient_id | patient | no action |
target_person_id | person | no action |
target_practitioner_id | practitioner | no action |
target_related_person_id | related_person | no action |
Indexes
person_link_person_id_idxonperson_idperson_link_target_patient_id_idxontarget_patient_idperson_link_target_person_id_idxontarget_person_idperson_link_target_practitioner_id_idxontarget_practitioner_idperson_link_target_related_person_id_idxontarget_related_person_id