Schema reference / Tables / view MDX source
timing_daily
Structured information about the intended timing of a therapeutic or diagnostic activity within any 24 hour period.
Structured information about the intended timing of a therapeutic or diagnostic activity within any 24 hour period.
Purpose. To record structured information about the intended timing of a therapeutic or diagnostic activity within any 24 hour period.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-CLUSTER.timing_daily.v1 | openEHR | defines this table |
Columns
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
frequency_magnitudefrequency_units | quantitynumeric, text | yes | Frequency | /items[at0003] |
interval | interval | yes | Interval | /items[at0014] |
timing_description | text | yes | Timing description | /items[at0027] |
exact_timing_critical | boolean | yes | Exact timing critical? | /items[at0023] |
as_required | boolean | yes | As required | /items[at0024] |
as_required_criterion | text | yes | 'As required' criterion | /items[at0025] |
Constraints
check ((frequency_magnitude is null and frequency_units is null) or (frequency_magnitude is not null and frequency_units is not null))
check (frequency_magnitude is null or (frequency_units = '1/d' and frequency_magnitude >= 1) or (frequency_units = '1/min' and frequency_magnitude >= 1) or (frequency_units = '1/s' and frequency_magnitude >= 1) or (frequency_units = '1/h' and frequency_magnitude >= 1))Referenced by
dosage_daily_timingviatiming_daily_idservice_direction_activity_intraday_timingviatiming_daily_idservice_request_complex_timingviatiming_daily_idtiming_daily_specific_timeviatiming_daily_idtiming_daily_specific_eventviatiming_daily_idtiming_daily_on_off_cycleviatiming_daily_id
Child tables
3 tables hang off timing_daily, one row per repetition.
timing_daily_specific_time
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
timing_daily_id | uuid → timing_daily | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
specific_time | timetz | yes | Specific time | /items[at0004] |
Unique
timing_daily_id, position
References
| Columns | Target | On delete |
|---|---|---|
timing_daily_id | timing_daily | cascade |
timing_daily_specific_event
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
timing_daily_id | uuid → timing_daily | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
event_nameevent_name_codeevent_name_systemevent_name_valueset_id | coded texttext, text, text, text | yes | Event name | /items[at0039]/items[at0026] |
time_offset | interval | yes | Time offset | /items[at0039]/items[at0040] |
Constraints
check ((event_name_code is null and event_name_system is null and event_name_valueset_id is null) or (event_name is not null and event_name_code is not null and event_name_system is not null and event_name_valueset_id is not null))Unique
timing_daily_id, position
References
| Columns | Target | On delete |
|---|---|---|
timing_daily_id | timing_daily | cascade |
event_name_valueset_id, event_name_code, event_name_system, event_name | valueset_code | restrict |
timing_daily_on_off_cycle
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
timing_daily_id | uuid → timing_daily | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
on_value | interval | yes | On | /items[at0035]/items[at0036] |
off | interval | yes | Off | /items[at0035]/items[at0037] |
repetitions | integer | yes | Repetitions | /items[at0035]/items[at0038] |
Constraints
check (repetitions is null or repetitions >= 0)Unique
timing_daily_id, position
References
| Columns | Target | On delete |
|---|---|---|
timing_daily_id | timing_daily | cascade |