---
title: "problem_diagnosis"
description: "Details about a single identified health condition, injury, disability or any other issue which impacts on the physical, mental and/or social well-being of an individual."
---
Details about a single identified health condition, injury, disability or any other issue which impacts on the physical, mental and/or social well-being of an individual.
**Purpose.** For recording details about a single, identified health problem or diagnosis.
## Source
| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-EVALUATION.problem_diagnosis.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. | — |
| `problem_diagnosis_name`
`problem_diagnosis_name_code`
`problem_diagnosis_name_system`
`problem_diagnosis_name_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Problem/Diagnosis name | `/data[at0001]/items[at0002]` |
| `variant`
`variant_code`
`variant_system`
`variant_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Variant | `/data[at0001]/items[at0079]` |
| `clinical_description` | `text` | yes | Clinical description | `/data[at0001]/items[at0009]` |
| `body_site`
`body_site_code`
`body_site_system`
`body_site_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Body site | `/data[at0001]/items[at0012]` |
| `cause`
`cause_code`
`cause_system`
`cause_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Cause | `/data[at0001]/items[at0078]` |
| `date_time_of_onset` | `timestamptz` | yes | Date/time of onset | `/data[at0001]/items[at0077]` |
| `date_time_clinically_recognised` | `timestamptz` | yes | Date/time clinically recognised | `/data[at0001]/items[at0003]` |
| `severity`
`severity_code`
`severity_system`
`severity_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Severity | `/data[at0001]/items[at0005]` |
| `impact` | `text` | yes | Impact | `/data[at0001]/items[at0080]` |
| `course_description` | `text` | yes | Course description | `/data[at0001]/items[at0072]` |
| `date_time_of_resolution` | `timestamptz` | yes | Date/time of resolution | `/data[at0001]/items[at0030]` |
| `diagnostic_certainty`
`diagnostic_certainty_code`
`diagnostic_certainty_system`
`diagnostic_certainty_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Diagnostic certainty | `/data[at0001]/items[at0073]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/items[at0069]` |
| `last_updated` | `timestamptz` | yes | Last updated | `/protocol[at0032]/items[at0070]` |
## Constraints
```sql
check ((problem_diagnosis_name_code is null and problem_diagnosis_name_system is null and problem_diagnosis_name_valueset_id is null) or (problem_diagnosis_name is not null and problem_diagnosis_name_code is not null and problem_diagnosis_name_system is not null and problem_diagnosis_name_valueset_id is not null))
check ((variant_code is null and variant_system is null and variant_valueset_id is null) or (variant is not null and variant_code is not null and variant_system is not null and variant_valueset_id is not null))
check ((body_site_code is null and body_site_system is null and body_site_valueset_id is null) or (body_site is not null and body_site_code is not null and body_site_system is not null and body_site_valueset_id is not null))
check ((cause_code is null and cause_system is null and cause_valueset_id is null) or (cause is not null and cause_code is not null and cause_system is not null and cause_valueset_id is not null))
check ((severity_code is null and severity_system is null and severity_valueset_id is null) or (severity is not null and severity_code is not null and severity_system is not null and severity_valueset_id is not null))
check ((diagnostic_certainty_code is null and diagnostic_certainty_system is null and diagnostic_certainty_valueset_id is null) or (diagnostic_certainty is not null and diagnostic_certainty_code is not null and diagnostic_certainty_system is not null and diagnostic_certainty_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 |
| `problem_diagnosis_name_valueset_id, problem_diagnosis_name_code, problem_diagnosis_name_system, problem_diagnosis_name` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `variant_valueset_id, variant_code, variant_system, variant` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `body_site_valueset_id, body_site_code, body_site_system, body_site` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `cause_valueset_id, cause_code, cause_system, cause` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `severity_valueset_id, severity_code, severity_system, severity` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `diagnostic_certainty_valueset_id, diagnostic_certainty_code, diagnostic_certainty_system, diagnostic_certainty` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
## Referenced by
- [`problem_diagnosis_structured_body_site`](/docs/tables/problem_diagnosis_structured_body_site) via `problem_diagnosis_id`
- [`problem_diagnosis_status`](/docs/tables/problem_diagnosis_status) via `problem_diagnosis_id`
## Indexes
- `problem_diagnosis_form_id_idx` on `form_id`
## Child tables
2 tables hang off `problem_diagnosis`, one row per repetition.
### `problem_diagnosis_structured_body_site`
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `problem_diagnosis_id` | `uuid` → [`problem_diagnosis`](/docs/tables/problem_diagnosis) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `anatomical_location_id` | `uuid` | yes | — | — |
| `anatomical_location_circle_id` | `uuid` | yes | — | — |
| `anatomical_location_relative_id` | `uuid` | yes | — | — |
#### Constraints
```sql
check (num_nonnulls(anatomical_location_id, anatomical_location_circle_id, anatomical_location_relative_id) = 1)
```
#### Unique
- `problem_diagnosis_id, position`
#### References
| Columns | Target | On delete |
|---|---|---|
| `problem_diagnosis_id` | [`problem_diagnosis`](/docs/tables/problem_diagnosis) | cascade |
| `anatomical_location_id` | [`anatomical_location`](/docs/tables/anatomical_location) | no action |
| `anatomical_location_circle_id` | [`anatomical_location_circle`](/docs/tables/anatomical_location_circle) | no action |
| `anatomical_location_relative_id` | [`anatomical_location_relative`](/docs/tables/anatomical_location_relative) | no action |
#### Indexes
- `problem_diagnosis_structured_body_site_anatomical_locati_0e4c9d` on `anatomical_location_id`
- `problem_diagnosis_structured_body_site_anatomical_locati_f80316` on `anatomical_location_circle_id`
- `problem_diagnosis_structured_body_site_anatomical_locati_2cddcd` on `anatomical_location_relative_id`
### `problem_diagnosis_status`
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `problem_diagnosis_id` | `uuid` → [`problem_diagnosis`](/docs/tables/problem_diagnosis) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `problem_qualifier_id` | `uuid` | no | Status | `/data[at0001]/items[at0046]` |
#### Unique
- `problem_diagnosis_id, position`
- `problem_diagnosis_id, problem_qualifier_id`
#### References
| Columns | Target | On delete |
|---|---|---|
| `problem_diagnosis_id` | [`problem_diagnosis`](/docs/tables/problem_diagnosis) | cascade |
| `problem_qualifier_id` | [`problem_qualifier`](/docs/tables/problem_qualifier) | no action |
#### Indexes
- `problem_diagnosis_status_problem_qualifier_id_idx` on `problem_qualifier_id`
## Value sets
| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-EVALUATION.problem_diagnosis.v1/diagnostic_certainty` | 3 |
| `org.openehr::openEHR-EHR-EVALUATION.problem_diagnosis.v1/severity` | 3 |