---
title: "differential_diagnoses"
description: "One or more possible conditions, problems or diagnoses that may be responsible for a clinical presentation, examination findings and/or test results."
---

One or more possible conditions, problems or diagnoses that may be responsible for a clinical presentation, examination findings and/or test results.

**Purpose.** To record details about one or more differential diagnoses that may be responsible for a single clinical presentation, examination findings and/or test results.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-EVALUATION.differential_diagnoses.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. | — |
| `overall_description` | `text` | yes | Overall description | `/data[at0001]/items[at0002]` |
| `last_updated` | `timestamptz` | yes | Last updated | `/protocol[at0013]/items[at0015]` |

## 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 |

## Referenced by

- [`differential_diagnoses_per_differential`](/docs/tables/differential_diagnoses_per_differential) via `differential_diagnoses_id`

## Indexes

- `differential_diagnoses_form_id_idx` on `form_id`

## Child tables

2 tables hang off `differential_diagnoses`, one row per repetition.

### `differential_diagnoses_per_differential`

Child table — one row per repetition, deleted with its parent.

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `differential_diagnoses_id` | `uuid` → [`differential_diagnoses`](/docs/tables/differential_diagnoses) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `diagnosis_name`<br />`diagnosis_name_code`<br />`diagnosis_name_system`<br />`diagnosis_name_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Diagnosis name | `/data[at0001]/items[at0003]/items[at0004]` |
| `status`<br />`status_code`<br />`status_system`<br />`status_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Status | `/data[at0001]/items[at0003]/items[at0005]` |
| `rationale` | `text` | yes | Rationale | `/data[at0001]/items[at0003]/items[at0009]` |
| `order_value` | `integer` | yes | Order | `/data[at0001]/items[at0003]/items[at0011]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/items[at0003]/items[at0012]` |

#### Constraints

```sql
check ((diagnosis_name_code is null and diagnosis_name_system is null and diagnosis_name_valueset_id is null) or (diagnosis_name is not null and diagnosis_name_code is not null and diagnosis_name_system is not null and diagnosis_name_valueset_id is not null))
check ((status_code is null and status_system is null and status_valueset_id is null) or (status is not null and status_code is not null and status_system is not null and status_valueset_id is not null))
```

#### Unique

- `differential_diagnoses_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `differential_diagnoses_id` | [`differential_diagnoses`](/docs/tables/differential_diagnoses) | cascade |
| `diagnosis_name_valueset_id, diagnosis_name_code, diagnosis_name_system, diagnosis_name` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `status_valueset_id, status_code, status_system, status` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

### Referenced by

- [`differential_diagnoses_per_differential_clinical_evidence`](/docs/tables/differential_diagnoses_per_differential_clinical_evidence) via `differential_diagnoses_per_differential_id`

### `differential_diagnoses_per_differential_clinical_evidence`

Child table — one row per repetition, deleted with its parent.

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `differential_diagnoses_per_differential_id` | `uuid` → [`differential_diagnoses_per_differential`](/docs/tables/differential_diagnoses_per_differential) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `clinical_evidence_id` | `uuid` | no | Clinical evidence | `/data[at0001]/items[at0003]/items[at0010]` |

#### Unique

- `differential_diagnoses_per_differential_id, position`
- `differential_diagnoses_per_differential_id, clinical_evidence_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `differential_diagnoses_per_differential_id` | [`differential_diagnoses_per_differential`](/docs/tables/differential_diagnoses_per_differential) | cascade |
| `clinical_evidence_id` | [`clinical_evidence`](/docs/tables/clinical_evidence) | no action |

#### Indexes

- `differential_diagnoses_per_differential_clinical_evidenc_722d0a` on `clinical_evidence_id`

## Value sets

| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-EVALUATION.differential_diagnoses.v1/status` | 3 |

