Schema reference / Tables / view MDX source
gender
Details about the gender of an individual.
Details about the gender of an individual.
Purpose. To record details about the gender of an individual.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-EVALUATION.gender.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. | — |
administrative_genderadministrative_gender_codeadministrative_gender_systemadministrative_gender_valueset_id | coded texttext, text, text, text | yes | Administrative gender | /data[at0002]/items[at0022] |
legal_genderlegal_gender_codelegal_gender_systemlegal_gender_valueset_id | coded texttext, text, text, text | yes | Legal gender | /data[at0002]/items[at0026] |
sex_assigned_at_birthsex_assigned_at_birth_codesex_assigned_at_birth_systemsex_assigned_at_birth_valueset_id | coded texttext, text, text, text | yes | Sex assigned at birth | /data[at0002]/items[at0019] |
gender_expressiongender_expression_codegender_expression_systemgender_expression_valueset_id | coded texttext, text, text, text | yes | Gender expression | /data[at0002]/items[at0025] |
gender_identitygender_identity_codegender_identity_systemgender_identity_valueset_id | coded texttext, text, text, text | yes | Gender identity | /data[at0002]/items[at0001] |
preferred_pronounpreferred_pronoun_codepreferred_pronoun_systempreferred_pronoun_valueset_id | coded texttext, text, text, text | yes | Preferred pronoun | /data[at0002]/items[at0020] |
gender_categorygender_category_codegender_category_systemgender_category_valueset_id | coded texttext, text, text, text | yes | Gender category | /data[at0002]/items[at0027] |
comment | text | yes | Comment | /data[at0002]/items[at0014] |
last_updated | timestamptz | yes | Last updated | /protocol[at0003]/items[at0004] |
Constraints
check ((administrative_gender_code is null and administrative_gender_system is null and administrative_gender_valueset_id is null) or (administrative_gender is not null and administrative_gender_code is not null and administrative_gender_system is not null and administrative_gender_valueset_id is not null))
check ((legal_gender_code is null and legal_gender_system is null and legal_gender_valueset_id is null) or (legal_gender is not null and legal_gender_code is not null and legal_gender_system is not null and legal_gender_valueset_id is not null))
check ((sex_assigned_at_birth_code is null and sex_assigned_at_birth_system is null and sex_assigned_at_birth_valueset_id is null) or (sex_assigned_at_birth is not null and sex_assigned_at_birth_code is not null and sex_assigned_at_birth_system is not null and sex_assigned_at_birth_valueset_id is not null))
check ((gender_expression_code is null and gender_expression_system is null and gender_expression_valueset_id is null) or (gender_expression is not null and gender_expression_code is not null and gender_expression_system is not null and gender_expression_valueset_id is not null))
check ((gender_identity_code is null and gender_identity_system is null and gender_identity_valueset_id is null) or (gender_identity is not null and gender_identity_code is not null and gender_identity_system is not null and gender_identity_valueset_id is not null))
check ((preferred_pronoun_code is null and preferred_pronoun_system is null and preferred_pronoun_valueset_id is null) or (preferred_pronoun is not null and preferred_pronoun_code is not null and preferred_pronoun_system is not null and preferred_pronoun_valueset_id is not null))
check ((gender_category_code is null and gender_category_system is null and gender_category_valueset_id is null) or (gender_category is not null and gender_category_code is not null and gender_category_system is not null and gender_category_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 |
administrative_gender_valueset_id, administrative_gender_code, administrative_gender_system, administrative_gender | valueset_code | restrict |
legal_gender_valueset_id, legal_gender_code, legal_gender_system, legal_gender | valueset_code | restrict |
sex_assigned_at_birth_valueset_id, sex_assigned_at_birth_code, sex_assigned_at_birth_system, sex_assigned_at_birth | valueset_code | restrict |
gender_expression_valueset_id, gender_expression_code, gender_expression_system, gender_expression | valueset_code | restrict |
gender_identity_valueset_id, gender_identity_code, gender_identity_system, gender_identity | valueset_code | restrict |
preferred_pronoun_valueset_id, preferred_pronoun_code, preferred_pronoun_system, preferred_pronoun | valueset_code | restrict |
gender_category_valueset_id, gender_category_code, gender_category_system, gender_category | valueset_code | restrict |
Indexes
gender_form_id_idxonform_id