person_patient_link


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 person_patient_link.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 the tracking of person records who are also patients in the system

Columns

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

The id of the person record

patient_id BIGINT 19 null
patient_data.id Defined in XML R

The id of the patient record

linked_date DATETIME 19 current_timestamp()

When the link was created

linked_by BIGINT 19 NULL
users.id Defined in XML R

The id of the user that created this record

link_method VARCHAR 50 'manual'

How link was created: manual, auto_detected, migrated, import

notes TEXT 65535 NULL

Optional notes about why/how they were linked

active BOOLEAN 3 1

Whether link is active (allows soft delete)

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
idx_ppl_active Performance Asc active
idx_ppl_linked_date Performance Asc linked_date
idx_ppl_method Performance Asc link_method
idx_ppl_patient Performance Asc patient_id
idx_ppl_person Performance Asc person_id
unique_active_link Must be unique Asc/Asc/Asc person_id + patient_id + active

Relationships