Schema reference / Tables / view MDX source
ethnicity
Affiliation, kinship or connection with one or more groupings of people, according to common origins or background.
Affiliation, kinship or connection with one or more groupings of people, according to common origins or background.
Purpose. To record the affiliation, kinship or connection of an individual with one or more groupings of people, usually self-identified.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-EVALUATION.ethnicity.v1 | openEHR | defines this table |
Columns
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
form_id | uuid → form | no | The form this entry was recorded on. | — |
form_block_id | uuid | yes | The block within the form, when the entry is bound to one. | — |
description | text | yes | Description | /data[at0001]/items[at0002] |
ethnicityethnicity_codeethnicity_systemethnicity_valueset_id | coded texttext, text, text, text | yes | Ethnicity | /data[at0001]/items[at0003] |
ancestryancestry_codeancestry_systemancestry_valueset_id | coded texttext, text, text, text | yes | Ancestry | /data[at0001]/items[at0004] |
national_identity | text | yes | National identity | /data[at0001]/items[at0010] |
comment | text | yes | Comment | /data[at0001]/items[at0005] |
last_updated | timestamptz | yes | Last updated | /protocol[at0006]/items[at0008] |
Constraints
check ((ethnicity_code is null and ethnicity_system is null and ethnicity_valueset_id is null) or (ethnicity is not null and ethnicity_code is not null and ethnicity_system is not null and ethnicity_valueset_id is not null))
check ((ancestry_code is null and ancestry_system is null and ancestry_valueset_id is null) or (ancestry is not null and ancestry_code is not null and ancestry_system is not null and ancestry_valueset_id is not null))Unique
form_block_id
References
| Columns | Target | On delete |
|---|---|---|
form_id | form | cascade |
form_id, form_block_id | form_block | cascade |
ethnicity_valueset_id, ethnicity_code, ethnicity_system, ethnicity | valueset_code | restrict |
ancestry_valueset_id, ancestry_code, ancestry_system, ancestry | valueset_code | restrict |
Indexes
ethnicity_form_id_idxonform_id