---
title: "ethnicity"
description: "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`](/docs/tables/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]` |
| `ethnicity`
`ethnicity_code`
`ethnicity_system`
`ethnicity_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Ethnicity | `/data[at0001]/items[at0003]` |
| `ancestry`
`ancestry_code`
`ancestry_system`
`ancestry_valueset_id` | coded text
`text`, `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
```sql
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`](/docs/tables/form) | cascade |
| `form_id, form_block_id` | [`form_block`](/docs/tables/form_block) | cascade |
| `ethnicity_valueset_id, ethnicity_code, ethnicity_system, ethnicity` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `ancestry_valueset_id, ancestry_code, ancestry_system, ancestry` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
## Indexes
- `ethnicity_form_id_idx` on `form_id`