contact_relation


If there is patient data for this table the file for this export will be found in the extracted zip folder location under the filename of contact_relation.csv

If there are non-patient data column elements that are not part of the designated record set they will be marked in the Comment's column for that data element

Description

Contains information about the relationship between a contact and another table such as person for relatedpersons

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id BIGINT 19 null
contact_id BIGINT 19 null
contact.id Defined in XML R

The id of the contact this relationship belongs to

target_table VARCHAR 255 ''
target_id BIGINT 19 null
active BOOLEAN 3 1

1 for active, 0 for inactive

role VARCHAR 63 NULL
list_options.option_id Defined in XML R

fk to list_options.option_id WHERE list_options.list_id=‘related_person_role’

relationship VARCHAR 63 NULL
list_options.option_id Defined in XML R

fk to list_options.option_id WHERE list_options.list_id=‘related_person_relationship’

contact_priority INT 10 1

1=highest priority

is_primary_contact BOOLEAN 3 0
is_emergency_contact BOOLEAN 3 0
can_make_medical_decisions BOOLEAN 3 0
can_receive_medical_info BOOLEAN 3 0
start_date DATE 10 NULL
end_date DATE 10 NULL
notes TEXT 65535 NULL
created_date DATETIME 19 current_timestamp()
created_by BIGINT 19 NULL
users.id Defined in XML R

The id of the user that initially created this record

updated_date DATETIME 19 current_timestamp()
updated_by BIGINT 19 NULL
users.id Defined in XML R

The id of the user that last updated this record

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
contact_id Performance Asc contact_id
idx_contact_target_table Performance Asc/Asc target_table + target_id

Relationships