--- 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`
`glucose_code`
`glucose_system`
`glucose_numeric`
`glucose_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Glucose | `/data[at0001]/events[at0002]/data[at0003]/items[at0050]` | | `bilirubin`
`bilirubin_code`
`bilirubin_system`
`bilirubin_numeric`
`bilirubin_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Bilirubin | `/data[at0001]/events[at0002]/data[at0003]/items[at0062]` | | `ketones`
`ketones_code`
`ketones_system`
`ketones_numeric`
`ketones_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Ketones | `/data[at0001]/events[at0002]/data[at0003]/items[at0037]` | | `specific_gravity`
`specific_gravity_code`
`specific_gravity_system`
`specific_gravity_numeric`
`specific_gravity_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Specific gravity | `/data[at0001]/events[at0002]/data[at0003]/items[at0151]` | | `blood`
`blood_code`
`blood_system`
`blood_numeric`
`blood_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Blood | `/data[at0001]/events[at0002]/data[at0003]/items[at0032]` | | `p_h`
`p_h_code`
`p_h_system`
`p_h_numeric`
`p_h_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | pH | `/data[at0001]/events[at0002]/data[at0003]/items[at0126]` | | `protein`
`protein_code`
`protein_system`
`protein_numeric`
`protein_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Protein | `/data[at0001]/events[at0002]/data[at0003]/items[at0095]` | | `urobilinogen`
`urobilinogen_code`
`urobilinogen_system`
`urobilinogen_numeric`
`urobilinogen_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Urobilinogen | `/data[at0001]/events[at0002]/data[at0003]/items[at0056]` | | `nitrite`
`nitrite_code`
`nitrite_system`
`nitrite_numeric`
`nitrite_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Nitrite | `/data[at0001]/events[at0002]/data[at0003]/items[at0043]` | | `leukocytes`
`leukocytes_code`
`leukocytes_system`
`leukocytes_numeric`
`leukocytes_valueset_id` | coded text
`text`, `text`, `text`, `numeric`, `text` | yes | Leukocytes | `/data[at0001]/events[at0002]/data[at0003]/items[at0068]` | | `clinical_interpretation`
`clinical_interpretation_code`
`clinical_interpretation_system`
`clinical_interpretation_valueset_id` | coded text
`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`
`method_code`
`method_system`
`method_valueset_id` | coded text
`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 |