Schema reference / Tables / view MDX source
menstrual_diary
Details about menstrual bleeding and associated symptoms within a specified day.
Details about menstrual bleeding and associated symptoms within a specified day.
Purpose. To record details about menstrual bleeding and associated symptoms within a specified day.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-OBSERVATION.menstrual_diary.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. | — |
event_type | text | yes | null represents any_event | — |
flowflow_codeflow_systemflow_valueset_id | coded texttext, text, text, text | yes | Flow | /data[at0001]/events[at0002]/data[at0003]/items[at0004] |
volume_magnitudevolume_units | quantitynumeric, text | yes | Volume | /data[at0001]/events[at0002]/data[at0003]/items[at0010] |
blood_clotsblood_clots_codeblood_clots_systemblood_clots_valueset_id | coded texttext, text, text, text | yes | Blood clots | /data[at0001]/events[at0002]/data[at0003]/items[at0014] |
colorcolor_codecolor_systemcolor_valueset_id | coded texttext, text, text, text | yes | Color | /data[at0001]/events[at0002]/data[at0003]/items[at0017] |
description | text | yes | Description | /data[at0001]/events[at0002]/data[at0003]/items[at0018] |
comment | text | yes | Comment | /data[at0001]/events[at0002]/data[at0003]/items[at0021] |
Constraints
check ((flow_code is null and flow_system is null and flow_valueset_id is null) or (flow is not null and flow_code is not null and flow_system is not null and flow_valueset_id is not null))
check ((volume_magnitude is null and volume_units is null) or (volume_magnitude is not null and volume_units is not null))
check ((blood_clots_code is null and blood_clots_system is null and blood_clots_valueset_id is null and blood_clots is null) or (blood_clots is not null and blood_clots_code is not null and blood_clots_system is not null and blood_clots_valueset_id is not null))
check ((color_code is null and color_system is null and color_valueset_id is null) or (color is not null and color_code is not null and color_system is not null and color_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 |
flow_valueset_id, flow_code, flow_system, flow | valueset_code | restrict |
blood_clots_valueset_id, blood_clots_code, blood_clots_system, blood_clots | valueset_code | restrict |
color_valueset_id, color_code, color_system, color | valueset_code | restrict |
Indexes
menstrual_diary_form_id_idxonform_id
Value sets
| Value set | Codes |
|---|---|
org.openehr::openEHR-EHR-OBSERVATION.menstrual_diary.v1/blood_clots | 2 |
org.openehr::openEHR-EHR-OBSERVATION.menstrual_diary.v1/flow | 6 |