---
title: "menstrual_diary"
description: "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`](/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. | — |
| `event_type` | `text` | yes | null represents any_event | — |
| `flow`<br />`flow_code`<br />`flow_system`<br />`flow_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Flow | `/data[at0001]/events[at0002]/data[at0003]/items[at0004]` |
| `volume_magnitude`<br />`volume_units` | quantity<br />`numeric`, `text` | yes | Volume | `/data[at0001]/events[at0002]/data[at0003]/items[at0010]` |
| `blood_clots`<br />`blood_clots_code`<br />`blood_clots_system`<br />`blood_clots_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Blood clots | `/data[at0001]/events[at0002]/data[at0003]/items[at0014]` |
| `color`<br />`color_code`<br />`color_system`<br />`color_valueset_id` | coded text<br />`text`, `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

```sql
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`](/docs/tables/form) | cascade |
| `form_id, form_block_id` | [`form_block`](/docs/tables/form_block) | cascade |
| `flow_valueset_id, flow_code, flow_system, flow` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `blood_clots_valueset_id, blood_clots_code, blood_clots_system, blood_clots` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `color_valueset_id, color_code, color_system, color` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Indexes

- `menstrual_diary_form_id_idx` on `form_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 |

