Back to Openemr

contact_relation

Documentation/EHI_Export/docs/tables/contact_relation.html

latest2.3 KB
Original Source

Columns

ColumnTypeSizeNullsAutoDefaultChildrenParentsComments
idBIGINT19null

|

| | | 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 NameTypeSortColumn(s)
PRIMARYPrimary keyAscid
contact_idPerformanceAsccontact_id
idx_contact_target_tablePerformanceAsc/Asctarget_table + target_id

Relationships

Close relationships within degrees of separation