Schema reference / Tables / view MDX source
body_segment_discrepancy
The difference in length or circumference between paired body segments.
The difference in length or circumference between paired body segments.
Purpose. To record the difference in length or circumference between paired body segments.
Source
| Model | Leg | Role |
|---|---|---|
openEHR-EHR-OBSERVATION.body_segment_discrepancy.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. | — |
body_segment_measurementbody_segment_measurement_codebody_segment_measurement_systembody_segment_measurement_valueset_id | coded texttext, text, text, text | yes | Body segment measurement | /data[at0001]/events[at0002]/data[at0003]/items[at0004] |
discrepancy_magnitudediscrepancy_units | quantitynumeric, text | yes | Discrepancy | /data[at0001]/events[at0002]/data[at0003]/items[at0008] |
longest_sidelongest_side_codelongest_side_systemlongest_side_valueset_id | coded texttext, text, text, text | yes | Longest side | /data[at0001]/events[at0002]/data[at0003]/items[at0046] |
comment | text | yes | Comment | /data[at0001]/events[at0002]/data[at0003]/items[at0009] |
measurement_method | text | yes | Measurement method | /protocol[at0014]/items[at0027] |
measurement_originmeasurement_origin_codemeasurement_origin_systemmeasurement_origin_valueset_id | coded texttext, text, text, text | yes | Measurement origin | /protocol[at0014]/items[at0029] |
measurement_endpointmeasurement_endpoint_codemeasurement_endpoint_systemmeasurement_endpoint_valueset_id | coded texttext, text, text, text | yes | Measurement endpoint | /protocol[at0014]/items[at0033] |
Constraints
check ((body_segment_measurement_code is null and body_segment_measurement_system is null and body_segment_measurement_valueset_id is null) or (body_segment_measurement is not null and body_segment_measurement_code is not null and body_segment_measurement_system is not null and body_segment_measurement_valueset_id is not null))
check ((discrepancy_magnitude is null and discrepancy_units is null) or (discrepancy_magnitude is not null and discrepancy_units is not null))
check (discrepancy_magnitude is null or (discrepancy_units = 'cm' and discrepancy_magnitude >= 0) or (discrepancy_units = '[in_i]' and discrepancy_magnitude >= 0) or (discrepancy_units = 'mm' and discrepancy_magnitude >= 0))
check ((longest_side_code is null and longest_side_system is null and longest_side_valueset_id is null) or (longest_side is not null and longest_side_code is not null and longest_side_system is not null and longest_side_valueset_id is not null))
check ((measurement_origin_code is null and measurement_origin_system is null and measurement_origin_valueset_id is null) or (measurement_origin is not null and measurement_origin_code is not null and measurement_origin_system is not null and measurement_origin_valueset_id is not null))
check ((measurement_endpoint_code is null and measurement_endpoint_system is null and measurement_endpoint_valueset_id is null) or (measurement_endpoint is not null and measurement_endpoint_code is not null and measurement_endpoint_system is not null and measurement_endpoint_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 |
body_segment_measurement_valueset_id, body_segment_measurement_code, body_segment_measurement_system, body_segment_measurement | valueset_code | restrict |
longest_side_valueset_id, longest_side_code, longest_side_system, longest_side | valueset_code | restrict |
measurement_origin_valueset_id, measurement_origin_code, measurement_origin_system, measurement_origin | valueset_code | restrict |
measurement_endpoint_valueset_id, measurement_endpoint_code, measurement_endpoint_system, measurement_endpoint | valueset_code | restrict |
Referenced by
body_segment_discrepancy_measuring_deviceviabody_segment_discrepancy_idbody_segment_discrepancy_structured_originviabody_segment_discrepancy_idbody_segment_discrepancy_structured_endpointviabody_segment_discrepancy_id
Indexes
body_segment_discrepancy_form_id_idxonform_id
Child tables
3 tables hang off body_segment_discrepancy, one row per repetition.
body_segment_discrepancy_measuring_device
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
body_segment_discrepancy_id | uuid → body_segment_discrepancy | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
device_id | uuid | no | Measuring device | /protocol[at0014]/items[at0015] |
Unique
body_segment_discrepancy_id, positionbody_segment_discrepancy_id, device_id
References
| Columns | Target | On delete |
|---|---|---|
body_segment_discrepancy_id | body_segment_discrepancy | cascade |
device_id | device | no action |
Indexes
body_segment_discrepancy_measuring_device_device_id_idxondevice_id
body_segment_discrepancy_structured_origin
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
body_segment_discrepancy_id | uuid → body_segment_discrepancy | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
anatomical_location_id | uuid | no | Structured origin | /protocol[at0014]/items[at0030] |
Unique
body_segment_discrepancy_id, positionbody_segment_discrepancy_id, anatomical_location_id
References
| Columns | Target | On delete |
|---|---|---|
body_segment_discrepancy_id | body_segment_discrepancy | cascade |
anatomical_location_id | anatomical_location | no action |
Indexes
body_segment_discrepancy_structured_origin_anatomical_lo_c12f44onanatomical_location_id
body_segment_discrepancy_structured_endpoint
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — |
body_segment_discrepancy_id | uuid → body_segment_discrepancy | no | — | — |
position | integer | no | Order of this row within its parent, from zero. | — |
anatomical_location_id | uuid | no | Structured endpoint | /protocol[at0014]/items[at0035] |
Unique
body_segment_discrepancy_id, positionbody_segment_discrepancy_id, anatomical_location_id
References
| Columns | Target | On delete |
|---|---|---|
body_segment_discrepancy_id | body_segment_discrepancy | cascade |
anatomical_location_id | anatomical_location | no action |
Indexes
body_segment_discrepancy_structured_endpoint_anatomical__3b94cfonanatomical_location_id
Value sets
| Value set | Codes |
|---|---|
org.openehr::openEHR-EHR-OBSERVATION.body_segment_discrepancy.v1/body_segment_measurement | 10 |
org.openehr::openEHR-EHR-OBSERVATION.body_segment_discrepancy.v1/longest_side | 2 |