---
title: "urinalysis"
description: "Qualitative and semi-quantitative test array using reagent test strips to indicate possible abnormalities in a sample of urine, often performed as part of Point of Care Testing (P…"
---

Qualitative and semi-quantitative test array using reagent test strips to indicate possible abnormalities in a sample of urine, often performed as part of Point of Care Testing (POCT).

**Purpose.** To record the results of a qualitative and semi-quantitative test array using reagent test strips to indicate possible abnormalities in a sample of urine.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-OBSERVATION.urinalysis.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. | — |
| `glucose`<br />`glucose_code`<br />`glucose_system`<br />`glucose_numeric`<br />`glucose_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Glucose | `/data[at0001]/events[at0002]/data[at0003]/items[at0050]` |
| `bilirubin`<br />`bilirubin_code`<br />`bilirubin_system`<br />`bilirubin_numeric`<br />`bilirubin_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Bilirubin | `/data[at0001]/events[at0002]/data[at0003]/items[at0062]` |
| `ketones`<br />`ketones_code`<br />`ketones_system`<br />`ketones_numeric`<br />`ketones_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Ketones | `/data[at0001]/events[at0002]/data[at0003]/items[at0037]` |
| `specific_gravity`<br />`specific_gravity_code`<br />`specific_gravity_system`<br />`specific_gravity_numeric`<br />`specific_gravity_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Specific gravity | `/data[at0001]/events[at0002]/data[at0003]/items[at0151]` |
| `blood`<br />`blood_code`<br />`blood_system`<br />`blood_numeric`<br />`blood_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Blood | `/data[at0001]/events[at0002]/data[at0003]/items[at0032]` |
| `p_h`<br />`p_h_code`<br />`p_h_system`<br />`p_h_numeric`<br />`p_h_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | pH | `/data[at0001]/events[at0002]/data[at0003]/items[at0126]` |
| `protein`<br />`protein_code`<br />`protein_system`<br />`protein_numeric`<br />`protein_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Protein | `/data[at0001]/events[at0002]/data[at0003]/items[at0095]` |
| `urobilinogen`<br />`urobilinogen_code`<br />`urobilinogen_system`<br />`urobilinogen_numeric`<br />`urobilinogen_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Urobilinogen | `/data[at0001]/events[at0002]/data[at0003]/items[at0056]` |
| `nitrite`<br />`nitrite_code`<br />`nitrite_system`<br />`nitrite_numeric`<br />`nitrite_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Nitrite | `/data[at0001]/events[at0002]/data[at0003]/items[at0043]` |
| `leukocytes`<br />`leukocytes_code`<br />`leukocytes_system`<br />`leukocytes_numeric`<br />`leukocytes_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Leukocytes | `/data[at0001]/events[at0002]/data[at0003]/items[at0068]` |
| `clinical_interpretation`<br />`clinical_interpretation_code`<br />`clinical_interpretation_system`<br />`clinical_interpretation_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Clinical interpretation | `/data[at0001]/events[at0002]/data[at0003]/items[at0181]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/events[at0002]/data[at0003]/items[at0030]` |
| `reagent_strips` | `uuid` | yes | Reagent Strips | `/protocol[at0079]/items[at0180]` |
| `method`<br />`method_code`<br />`method_system`<br />`method_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Method | `/protocol[at0079]/items[at0186]` |
| `device` | `uuid` | yes | Device | `/protocol[at0079]/items[at0183]` |

## Constraints

```sql
check ((glucose_code is null and glucose_system is null and glucose_numeric is null and glucose is null) or (glucose_valueset_id is not null and glucose_code is not null and glucose_system is not null and glucose_numeric is not null and glucose is not null))
check ((bilirubin_code is null and bilirubin_system is null and bilirubin_numeric is null and bilirubin is null) or (bilirubin_valueset_id is not null and bilirubin_code is not null and bilirubin_system is not null and bilirubin_numeric is not null and bilirubin is not null))
check ((ketones_code is null and ketones_system is null and ketones_numeric is null and ketones is null) or (ketones_valueset_id is not null and ketones_code is not null and ketones_system is not null and ketones_numeric is not null and ketones is not null))
check ((specific_gravity_code is null and specific_gravity_system is null and specific_gravity_numeric is null and specific_gravity is null) or (specific_gravity_valueset_id is not null and specific_gravity_code is not null and specific_gravity_system is not null and specific_gravity_numeric is not null and specific_gravity is not null))
check ((blood_code is null and blood_system is null and blood_numeric is null and blood is null) or (blood_valueset_id is not null and blood_code is not null and blood_system is not null and blood_numeric is not null and blood is not null))
check ((p_h_code is null and p_h_system is null and p_h_numeric is null and p_h is null) or (p_h_valueset_id is not null and p_h_code is not null and p_h_system is not null and p_h_numeric is not null and p_h is not null))
check ((protein_code is null and protein_system is null and protein_numeric is null and protein is null) or (protein_valueset_id is not null and protein_code is not null and protein_system is not null and protein_numeric is not null and protein is not null))
check ((urobilinogen_code is null and urobilinogen_system is null and urobilinogen_numeric is null and urobilinogen is null) or (urobilinogen_valueset_id is not null and urobilinogen_code is not null and urobilinogen_system is not null and urobilinogen_numeric is not null and urobilinogen is not null))
check ((nitrite_code is null and nitrite_system is null and nitrite_numeric is null and nitrite is null) or (nitrite_valueset_id is not null and nitrite_code is not null and nitrite_system is not null and nitrite_numeric is not null and nitrite is not null))
check ((leukocytes_code is null and leukocytes_system is null and leukocytes_numeric is null and leukocytes is null) or (leukocytes_valueset_id is not null and leukocytes_code is not null and leukocytes_system is not null and leukocytes_numeric is not null and leukocytes is not null))
check ((clinical_interpretation_code is null and clinical_interpretation_system is null and clinical_interpretation_valueset_id is null) or (clinical_interpretation is not null and clinical_interpretation_code is not null and clinical_interpretation_system is not null and clinical_interpretation_valueset_id is not null))
check ((method_code is null and method_system is null and method_valueset_id is null and method is null) or (method is not null and method_code is not null and method_system is not null and method_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 |
| `glucose_valueset_id, glucose_code, glucose_system, glucose, glucose_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `bilirubin_valueset_id, bilirubin_code, bilirubin_system, bilirubin, bilirubin_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `ketones_valueset_id, ketones_code, ketones_system, ketones, ketones_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `specific_gravity_valueset_id, specific_gravity_code, specific_gravity_system, specific_gravity, specific_gravity_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `blood_valueset_id, blood_code, blood_system, blood, blood_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `p_h_valueset_id, p_h_code, p_h_system, p_h, p_h_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `protein_valueset_id, protein_code, protein_system, protein, protein_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `urobilinogen_valueset_id, urobilinogen_code, urobilinogen_system, urobilinogen, urobilinogen_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `nitrite_valueset_id, nitrite_code, nitrite_system, nitrite, nitrite_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `leukocytes_valueset_id, leukocytes_code, leukocytes_system, leukocytes, leukocytes_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `clinical_interpretation_valueset_id, clinical_interpretation_code, clinical_interpretation_system, clinical_interpretation` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `method_valueset_id, method_code, method_system, method` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `reagent_strips` | [`device`](/docs/tables/device) | no action |
| `device` | [`device`](/docs/tables/device) | no action |

## Referenced by

- [`urinalysis_exam_not_done`](/docs/tables/urinalysis_exam_not_done) via `urinalysis_id`

## Indexes

- `urinalysis_form_id_idx` on `form_id`
- `urinalysis_reagent_strips_idx` on `reagent_strips`
- `urinalysis_device_idx` on `device`

## Child tables

1 table hang off `urinalysis`, one row per repetition.

### `urinalysis_exam_not_done`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `urinalysis_id` | `uuid` → [`urinalysis`](/docs/tables/urinalysis) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `exclusion_exam_id` | `uuid` | no | Exam not done | `/data[at0001]/events[at0002]/data[at0003]/items[at0185]` |

#### Unique

- `urinalysis_id, position`
- `urinalysis_id, exclusion_exam_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `urinalysis_id` | [`urinalysis`](/docs/tables/urinalysis) | cascade |
| `exclusion_exam_id` | [`exclusion_exam`](/docs/tables/exclusion_exam) | no action |

#### Indexes

- `urinalysis_exam_not_done_exclusion_exam_id_idx` on `exclusion_exam_id`

## Value sets

| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/bilirubin` | 4 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/blood` | 7 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/glucose` | 6 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/ketones` | 6 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/leukocytes` | 5 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/method` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/nitrite` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/p_h` | 11 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/protein` | 6 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/specific_gravity` | 7 |
| `org.openehr::openEHR-EHR-OBSERVATION.urinalysis.v1/urobilinogen` | 5 |

