---
title: "visual_acuity"
description: "A test to quantify an individual's visual acuity as a measure of the ability to detect, resolve or recognize visual details."
---

A test to quantify an individual's visual acuity as a measure of the ability to detect, resolve or recognize visual details.

**Purpose.** To record the results of visual acuity assessments, which are typically performed by quantifying the individual's ability to detect, resolve or identify visual differences or symbols.

## Source

| Model | Leg | Role |
|---|---|---|
| `openEHR-EHR-OBSERVATION.visual_acuity.v0` | 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. | — |
| `eye_examined`<br />`eye_examined_code`<br />`eye_examined_system`<br />`eye_examined_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Eye examined | `/data[at0001]/events[at0134]/data[at0003]/items[at0007]` |
| `result_log_mar_result_magnitude`<br />`result_log_mar_result_units` | quantity<br />`numeric`, `text` | yes | logMAR result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0297]` |
| `result_metre_ratio_result_numerator`<br />`result_metre_ratio_result_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Metre ratio result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0295]` |
| `result_feet_ratio_result_numerator`<br />`result_feet_ratio_result_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Feet ratio result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0296]` |
| `result_decimal_notation_result_magnitude`<br />`result_decimal_notation_result_units` | quantity<br />`numeric`, `text` | yes | Decimal notation result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0294]` |
| `result_etdrs_letter_score` | `integer` | yes | ETDRS letter score | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0356]` |
| `result__5_score_notation_result_magnitude`<br />`result__5_score_notation_result_units` | quantity<br />`numeric`, `text` | yes | 5-Score notation result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0355]` |
| `result_n_point_font_size_notation_result`<br />`result_n_point_font_size_notation_result_code`<br />`result_n_point_font_size_notation_result_system`<br />`result_n_point_font_size_notation_result_numeric`<br />`result_n_point_font_size_notation_result_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | N point font size notation result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0299]` |
| `result_jaeger_font_size_notation_result`<br />`result_jaeger_font_size_notation_result_code`<br />`result_jaeger_font_size_notation_result_system`<br />`result_jaeger_font_size_notation_result_numeric`<br />`result_jaeger_font_size_notation_result_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Jaeger font size notation result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0302]` |
| `result_cycles_per_centimetre_result_magnitude`<br />`result_cycles_per_centimetre_result_units` | quantity<br />`numeric`, `text` | yes | Cycles per centimetre result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0491]` |
| `result_cycles_per_degree_result_magnitude`<br />`result_cycles_per_degree_result_units` | quantity<br />`numeric`, `text` | yes | Cycles per degree result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0492]` |
| `result_best_qualitative_result`<br />`result_best_qualitative_result_code`<br />`result_best_qualitative_result_system`<br />`result_best_qualitative_result_numeric`<br />`result_best_qualitative_result_valueset_id` | coded text<br />`text`, `text`, `text`, `numeric`, `text` | yes | Best qualitative result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0151]` |
| `result_missed_or_additional_optotypes_count`<br />`result_missed_or_additional_optotypes_coded_text`<br />`result_missed_or_additional_optotypes_coded_text_code`<br />`result_missed_or_additional_optotypes_coded_text_system`<br />`result_missed_or_additional_optotypes_coded_text_valueset_id` | coded text<br />`integer`, `text`, `text`, `text`, `text` | yes | Missed or additional optotypes | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0410]` |
| `result_derived_result_derived_log_mar_result_magnitude`<br />`result_derived_result_derived_log_mar_result_units` | quantity<br />`numeric`, `text` | yes | Derived logMAR result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0322]` |
| `result_derived_result_derived_meter_ratio_result_numerator`<br />`result_derived_result_derived_meter_ratio_result_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Derived meter ratio result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0320]` |
| `result_derived_result_derived_feet_ratio_result_numerator`<br />`result_derived_result_derived_feet_ratio_result_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Derived feet ratio result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0321]` |
| `result_derived_result_derived_decimal_notation_result_magnitude`<br />`result_derived_result_derived_decimal_notation_result_units` | quantity<br />`numeric`, `text` | yes | Derived decimal notation result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0319]` |
| `result_derived_result_derived_etdrs_letter_score_result` | `integer` | yes | Derived ETDRS letter score result | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0357]` |
| `result_derived_result_derived_cycles_per_degree_magnitude`<br />`result_derived_result_derived_cycles_per_degree_units` | quantity<br />`numeric`, `text` | yes | Derived cycles per degree | `/data[at0001]/events[at0134]/data[at0003]/items[at0461]/items[at0193]/items[at0493]` |
| `testing_distance_category`<br />`testing_distance_category_code`<br />`testing_distance_category_system`<br />`testing_distance_category_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Testing distance category | `/data[at0001]/events[at0134]/data[at0003]/items[at0081]` |
| `testing_distance_magnitude`<br />`testing_distance_units` | quantity<br />`numeric`, `text` | yes | Testing distance | `/data[at0001]/events[at0134]/data[at0003]/items[at0412]` |
| `perceptual_task`<br />`perceptual_task_code`<br />`perceptual_task_system`<br />`perceptual_task_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Perceptual task | `/data[at0001]/events[at0134]/data[at0003]/items[at0586]` |
| `stimulus_method`<br />`stimulus_method_code`<br />`stimulus_method_system`<br />`stimulus_method_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Stimulus method | `/data[at0001]/events[at0134]/data[at0003]/items[at0226]` |
| `chart_or_stimulus_type`<br />`chart_or_stimulus_type_code`<br />`chart_or_stimulus_type_system`<br />`chart_or_stimulus_type_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Chart or Stimulus type | `/data[at0001]/events[at0134]/data[at0003]/items[at0023]` |
| `optotype`<br />`optotype_code`<br />`optotype_system`<br />`optotype_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Optotype | `/data[at0001]/events[at0134]/data[at0003]/items[at0021]` |
| `crowdedness`<br />`crowdedness_code`<br />`crowdedness_system`<br />`crowdedness_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Crowdedness | `/data[at0001]/events[at0134]/data[at0003]/items[at0558]` |
| `contrast_category`<br />`contrast_category_code`<br />`contrast_category_system`<br />`contrast_category_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Contrast category | `/data[at0001]/events[at0134]/data[at0003]/items[at0513]` |
| `weber_contrast_numerator`<br />`weber_contrast_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Weber contrast | `/data[at0001]/events[at0134]/data[at0003]/items[at0245]` |
| `michelson_contrast_numerator`<br />`michelson_contrast_denominator` | numeric, numeric<br />`numeric`, `numeric` | yes | Michelson contrast | `/data[at0001]/events[at0134]/data[at0003]/items[at0248]` |
| `no_improvement_note`<br />`no_improvement_note_code`<br />`no_improvement_note_system`<br />`no_improvement_note_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | No improvement note | `/data[at0001]/events[at0134]/data[at0003]/items[at0415]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/events[at0134]/data[at0003]/items[at0040]` |
| `interpretation` | `text` | yes | Interpretation | `/data[at0001]/events[at0134]/data[at0003]/items[at0333]` |
| `comparative_label`<br />`comparative_label_code`<br />`comparative_label_system`<br />`comparative_label_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Comparative label | `/data[at0001]/events[at0134]/data[at0003]/items[at0370]` |
| `pupil_state`<br />`pupil_state_code`<br />`pupil_state_system`<br />`pupil_state_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Pupil state | `/data[at0001]/events[at0134]/state[at0041]/items[at0418]` |
| `type_of_ancillary_lighting_used`<br />`type_of_ancillary_lighting_used_code`<br />`type_of_ancillary_lighting_used_system`<br />`type_of_ancillary_lighting_used_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Type of ancillary lighting used | `/data[at0001]/events[at0134]/state[at0041]/items[at0562]` |
| `light_adaptation_state`<br />`light_adaptation_state_code`<br />`light_adaptation_state_system`<br />`light_adaptation_state_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Light adaptation state | `/data[at0001]/events[at0134]/state[at0041]/items[at0589]` |
| `ambient_illuminance_magnitude`<br />`ambient_illuminance_units` | quantity<br />`numeric`, `text` | yes | Ambient illuminance | `/data[at0001]/events[at0134]/state[at0041]/items[at0256]` |
| `background_luminance_magnitude`<br />`background_luminance_units` | quantity<br />`numeric`, `text` | yes | Background luminance | `/data[at0001]/events[at0134]/state[at0041]/items[at0244]` |
| `confounding_factors` | `text` | yes | Confounding factors | `/data[at0001]/events[at0134]/state[at0041]/items[at0112]` |

## Constraints

```sql
check ((eye_examined_code is null and eye_examined_system is null and eye_examined_valueset_id is null and eye_examined is null) or (eye_examined is not null and eye_examined_code is not null and eye_examined_system is not null and eye_examined_valueset_id is not null))
check ((result_log_mar_result_magnitude is null and result_log_mar_result_units is null) or (result_log_mar_result_magnitude is not null and result_log_mar_result_units is not null))
check (result_log_mar_result_magnitude is null or (result_log_mar_result_units = '1{logMAR}' and result_log_mar_result_magnitude between -10 and 10))
check ((result_metre_ratio_result_numerator is null and result_metre_ratio_result_denominator is null) or (result_metre_ratio_result_numerator is not null and result_metre_ratio_result_denominator is not null))
check (result_metre_ratio_result_denominator is null or result_metre_ratio_result_denominator <> 0)
check (result_metre_ratio_result_numerator is null or result_metre_ratio_result_numerator between 0 and 100)
check ((result_feet_ratio_result_numerator is null and result_feet_ratio_result_denominator is null) or (result_feet_ratio_result_numerator is not null and result_feet_ratio_result_denominator is not null))
check (result_feet_ratio_result_denominator is null or result_feet_ratio_result_denominator <> 0)
check (result_feet_ratio_result_numerator is null or result_feet_ratio_result_numerator between 0 and 1000)
check ((result_decimal_notation_result_magnitude is null and result_decimal_notation_result_units is null) or (result_decimal_notation_result_magnitude is not null and result_decimal_notation_result_units is not null))
check (result_decimal_notation_result_magnitude is null or (result_decimal_notation_result_units = '1{decimal VA}' and result_decimal_notation_result_magnitude between 0 and 10))
check (result_etdrs_letter_score is null or result_etdrs_letter_score between 0 and 1000)
check ((result__5_score_notation_result_magnitude is null and result__5_score_notation_result_units is null) or (result__5_score_notation_result_magnitude is not null and result__5_score_notation_result_units is not null))
check (result__5_score_notation_result_magnitude is null or (result__5_score_notation_result_units = '1{5PointVA}' and result__5_score_notation_result_magnitude between 0 and 10))
check ((result_n_point_font_size_notation_result_code is null and result_n_point_font_size_notation_result_system is null and result_n_point_font_size_notation_result_numeric is null and result_n_point_font_size_notation_result is null) or (result_n_point_font_size_notation_result_valueset_id is not null and result_n_point_font_size_notation_result_code is not null and result_n_point_font_size_notation_result_system is not null and result_n_point_font_size_notation_result_numeric is not null and result_n_point_font_size_notation_result is not null))
check ((result_jaeger_font_size_notation_result_code is null and result_jaeger_font_size_notation_result_system is null and result_jaeger_font_size_notation_result_numeric is null and result_jaeger_font_size_notation_result is null) or (result_jaeger_font_size_notation_result_valueset_id is not null and result_jaeger_font_size_notation_result_code is not null and result_jaeger_font_size_notation_result_system is not null and result_jaeger_font_size_notation_result_numeric is not null and result_jaeger_font_size_notation_result is not null))
check ((result_cycles_per_centimetre_result_magnitude is null and result_cycles_per_centimetre_result_units is null) or (result_cycles_per_centimetre_result_magnitude is not null and result_cycles_per_centimetre_result_units is not null))
check (result_cycles_per_centimetre_result_magnitude is null or (result_cycles_per_centimetre_result_units = '1/cm' and result_cycles_per_centimetre_result_magnitude between 0 and 1000))
check ((result_cycles_per_degree_result_magnitude is null and result_cycles_per_degree_result_units is null) or (result_cycles_per_degree_result_magnitude is not null and result_cycles_per_degree_result_units is not null))
check (result_cycles_per_degree_result_magnitude is null or (result_cycles_per_degree_result_units = '1/deg' and result_cycles_per_degree_result_magnitude between 0 and 10000))
check ((result_best_qualitative_result_code is null and result_best_qualitative_result_system is null and result_best_qualitative_result_numeric is null and result_best_qualitative_result is null) or (result_best_qualitative_result_valueset_id is not null and result_best_qualitative_result_code is not null and result_best_qualitative_result_system is not null and result_best_qualitative_result_numeric is not null and result_best_qualitative_result is not null))
check (result_missed_or_additional_optotypes_count is null or result_missed_or_additional_optotypes_count between -9 and 9)
check ((result_missed_or_additional_optotypes_coded_text_code is null and result_missed_or_additional_optotypes_coded_text_system is null and result_missed_or_additional_optotypes_coded_text_valueset_id is null and result_missed_or_additional_optotypes_coded_text is null) or (result_missed_or_additional_optotypes_coded_text is not null and result_missed_or_additional_optotypes_coded_text_code is not null and result_missed_or_additional_optotypes_coded_text_system is not null and result_missed_or_additional_optotypes_coded_text_valueset_id is not null))
check (num_nonnulls(result_missed_or_additional_optotypes_count, result_missed_or_additional_optotypes_coded_text) <= 1)
check ((result_derived_result_derived_log_mar_result_magnitude is null and result_derived_result_derived_log_mar_result_units is null) or (result_derived_result_derived_log_mar_result_magnitude is not null and result_derived_result_derived_log_mar_result_units is not null))
check (result_derived_result_derived_log_mar_result_magnitude is null or (result_derived_result_derived_log_mar_result_units = '1{logMAR}' and result_derived_result_derived_log_mar_result_magnitude between -10 and 10))
check ((result_derived_result_derived_meter_ratio_result_numerator is null and result_derived_result_derived_meter_ratio_result_denominator is null) or (result_derived_result_derived_meter_ratio_result_numerator is not null and result_derived_result_derived_meter_ratio_result_denominator is not null))
check (result_derived_result_derived_meter_ratio_result_denominator is null or result_derived_result_derived_meter_ratio_result_denominator <> 0)
check (result_derived_result_derived_meter_ratio_result_numerator is null or result_derived_result_derived_meter_ratio_result_numerator between 0 and 100)
check ((result_derived_result_derived_feet_ratio_result_numerator is null and result_derived_result_derived_feet_ratio_result_denominator is null) or (result_derived_result_derived_feet_ratio_result_numerator is not null and result_derived_result_derived_feet_ratio_result_denominator is not null))
check (result_derived_result_derived_feet_ratio_result_denominator is null or result_derived_result_derived_feet_ratio_result_denominator <> 0)
check (result_derived_result_derived_feet_ratio_result_numerator is null or result_derived_result_derived_feet_ratio_result_numerator between 0 and 1000)
check ((result_derived_result_derived_decimal_notation_result_magnitude is null and result_derived_result_derived_decimal_notation_result_units is null) or (result_derived_result_derived_decimal_notation_result_magnitude is not null and result_derived_result_derived_decimal_notation_result_units is not null))
check (result_derived_result_derived_decimal_notation_result_magnitude is null or (result_derived_result_derived_decimal_notation_result_units = '1{decimal VA}' and result_derived_result_derived_decimal_notation_result_magnitude between 0 and 10))
check (result_derived_result_derived_etdrs_letter_score_result is null or result_derived_result_derived_etdrs_letter_score_result between 0 and 1000)
check ((result_derived_result_derived_cycles_per_degree_magnitude is null and result_derived_result_derived_cycles_per_degree_units is null) or (result_derived_result_derived_cycles_per_degree_magnitude is not null and result_derived_result_derived_cycles_per_degree_units is not null))
check (result_derived_result_derived_cycles_per_degree_magnitude is null or (result_derived_result_derived_cycles_per_degree_units = '1/deg' and result_derived_result_derived_cycles_per_degree_magnitude between 0 and 10000))
check ((testing_distance_category_code is null and testing_distance_category_system is null and testing_distance_category_valueset_id is null and testing_distance_category is null) or (testing_distance_category is not null and testing_distance_category_code is not null and testing_distance_category_system is not null and testing_distance_category_valueset_id is not null))
check ((testing_distance_magnitude is null and testing_distance_units is null) or (testing_distance_magnitude is not null and testing_distance_units is not null))
check (testing_distance_magnitude is null or (testing_distance_units = 'm' and testing_distance_magnitude between 0 and 1000) or (testing_distance_units = 'cm' and testing_distance_magnitude between 0 and 10000) or (testing_distance_units = '[in_i]' and testing_distance_magnitude between 0 and 10000) or (testing_distance_units = '[ft_i]' and testing_distance_magnitude between 0 and 10000))
check ((perceptual_task_code is null and perceptual_task_system is null and perceptual_task_valueset_id is null and perceptual_task is null) or (perceptual_task is not null and perceptual_task_code is not null and perceptual_task_system is not null and perceptual_task_valueset_id is not null))
check ((stimulus_method_code is null and stimulus_method_system is null and stimulus_method_valueset_id is null and stimulus_method is null) or (stimulus_method is not null and stimulus_method_code is not null and stimulus_method_system is not null and stimulus_method_valueset_id is not null))
check ((chart_or_stimulus_type_code is null and chart_or_stimulus_type_system is null and chart_or_stimulus_type_valueset_id is null) or (chart_or_stimulus_type is not null and chart_or_stimulus_type_code is not null and chart_or_stimulus_type_system is not null and chart_or_stimulus_type_valueset_id is not null))
check ((optotype_code is null and optotype_system is null and optotype_valueset_id is null) or (optotype is not null and optotype_code is not null and optotype_system is not null and optotype_valueset_id is not null))
check ((crowdedness_code is null and crowdedness_system is null and crowdedness_valueset_id is null and crowdedness is null) or (crowdedness is not null and crowdedness_code is not null and crowdedness_system is not null and crowdedness_valueset_id is not null))
check ((contrast_category_code is null and contrast_category_system is null and contrast_category_valueset_id is null and contrast_category is null) or (contrast_category is not null and contrast_category_code is not null and contrast_category_system is not null and contrast_category_valueset_id is not null))
check ((weber_contrast_numerator is null and weber_contrast_denominator is null) or (weber_contrast_numerator is not null and weber_contrast_denominator is not null))
check (weber_contrast_denominator is null or weber_contrast_denominator <> 0)
check (weber_contrast_denominator is null or weber_contrast_denominator = 1)
check ((michelson_contrast_numerator is null and michelson_contrast_denominator is null) or (michelson_contrast_numerator is not null and michelson_contrast_denominator is not null))
check (michelson_contrast_denominator is null or michelson_contrast_denominator <> 0)
check (michelson_contrast_denominator is null or michelson_contrast_denominator = 1)
check ((no_improvement_note_code is null and no_improvement_note_system is null and no_improvement_note_valueset_id is null) or (no_improvement_note is not null and no_improvement_note_code is not null and no_improvement_note_system is not null and no_improvement_note_valueset_id is not null))
check ((comparative_label_code is null and comparative_label_system is null and comparative_label_valueset_id is null) or (comparative_label is not null and comparative_label_code is not null and comparative_label_system is not null and comparative_label_valueset_id is not null))
check ((pupil_state_code is null and pupil_state_system is null and pupil_state_valueset_id is null) or (pupil_state is not null and pupil_state_code is not null and pupil_state_system is not null and pupil_state_valueset_id is not null))
check ((type_of_ancillary_lighting_used_code is null and type_of_ancillary_lighting_used_system is null and type_of_ancillary_lighting_used_valueset_id is null and type_of_ancillary_lighting_used is null) or (type_of_ancillary_lighting_used is not null and type_of_ancillary_lighting_used_code is not null and type_of_ancillary_lighting_used_system is not null and type_of_ancillary_lighting_used_valueset_id is not null))
check ((light_adaptation_state_code is null and light_adaptation_state_system is null and light_adaptation_state_valueset_id is null and light_adaptation_state is null) or (light_adaptation_state is not null and light_adaptation_state_code is not null and light_adaptation_state_system is not null and light_adaptation_state_valueset_id is not null))
check ((ambient_illuminance_magnitude is null and ambient_illuminance_units is null) or (ambient_illuminance_magnitude is not null and ambient_illuminance_units is not null))
check ((background_luminance_magnitude is null and background_luminance_units is null) or (background_luminance_magnitude is not null and background_luminance_units 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 |
| `eye_examined_valueset_id, eye_examined_code, eye_examined_system, eye_examined` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `result_n_point_font_size_notation_result_valueset_id, result_n_point_font_size_notation_result_code, result_n_point_font_size_notation_result_system, result_n_point_font_size_notation_result, result_n_point_font_size_notation_result_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `result_jaeger_font_size_notation_result_valueset_id, result_jaeger_font_size_notation_result_code, result_jaeger_font_size_notation_result_system, result_jaeger_font_size_notation_result, result_jaeger_font_size_notation_result_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `result_best_qualitative_result_valueset_id, result_best_qualitative_result_code, result_best_qualitative_result_system, result_best_qualitative_result, result_best_qualitative_result_numeric` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `result_missed_or_additional_optotypes_coded_text_valueset_id, result_missed_or_additional_optotypes_coded_text_code, result_missed_or_additional_optotypes_coded_text_system, result_missed_or_additional_optotypes_coded_text` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `testing_distance_category_valueset_id, testing_distance_category_code, testing_distance_category_system, testing_distance_category` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `perceptual_task_valueset_id, perceptual_task_code, perceptual_task_system, perceptual_task` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `stimulus_method_valueset_id, stimulus_method_code, stimulus_method_system, stimulus_method` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `chart_or_stimulus_type_valueset_id, chart_or_stimulus_type_code, chart_or_stimulus_type_system, chart_or_stimulus_type` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `optotype_valueset_id, optotype_code, optotype_system, optotype` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `crowdedness_valueset_id, crowdedness_code, crowdedness_system, crowdedness` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `contrast_category_valueset_id, contrast_category_code, contrast_category_system, contrast_category` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `no_improvement_note_valueset_id, no_improvement_note_code, no_improvement_note_system, no_improvement_note` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `comparative_label_valueset_id, comparative_label_code, comparative_label_system, comparative_label` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `pupil_state_valueset_id, pupil_state_code, pupil_state_system, pupil_state` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `type_of_ancillary_lighting_used_valueset_id, type_of_ancillary_lighting_used_code, type_of_ancillary_lighting_used_system, type_of_ancillary_lighting_used` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `light_adaptation_state_valueset_id, light_adaptation_state_code, light_adaptation_state_system, light_adaptation_state` | [`valueset_code`](/docs/tables/valueset_code) | restrict |

## Referenced by

- [`visual_acuity_chart_or_stimulus_device_details`](/docs/tables/visual_acuity_chart_or_stimulus_device_details) via `visual_acuity_id`
- [`visual_acuity_test_not_done`](/docs/tables/visual_acuity_test_not_done) via `visual_acuity_id`
- [`visual_acuity_visual_aid_per_eye`](/docs/tables/visual_acuity_visual_aid_per_eye) via `visual_acuity_id`

## Indexes

- `visual_acuity_form_id_idx` on `form_id`

## Child tables

3 tables hang off `visual_acuity`, one row per repetition.

### `visual_acuity_chart_or_stimulus_device_details`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `visual_acuity_id` | `uuid` → [`visual_acuity`](/docs/tables/visual_acuity) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `device_id` | `uuid` | no | Chart or stimulus device details | `/data[at0001]/events[at0134]/data[at0003]/items[at0025]` |

#### Unique

- `visual_acuity_id, position`
- `visual_acuity_id, device_id`

#### References

| Columns | Target | On delete |
|---|---|---|
| `visual_acuity_id` | [`visual_acuity`](/docs/tables/visual_acuity) | cascade |
| `device_id` | [`device`](/docs/tables/device) | no action |

#### Indexes

- `visual_acuity_chart_or_stimulus_device_details_device_id_idx` on `device_id`

### `visual_acuity_test_not_done`

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

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

#### Unique

- `visual_acuity_id, position`
- `visual_acuity_id, exclusion_exam_id`

#### References

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

#### Indexes

- `visual_acuity_test_not_done_exclusion_exam_id_idx` on `exclusion_exam_id`

### `visual_acuity_visual_aid_per_eye`

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

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `uuid primary key` | no | Primary key. | — |
| `visual_acuity_id` | `uuid` → [`visual_acuity`](/docs/tables/visual_acuity) | no | — | — |
| `position` | `integer` | no | Order of this row within its parent, from zero. | — |
| `aided_eye`<br />`aided_eye_code`<br />`aided_eye_system`<br />`aided_eye_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Aided eye | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0405]` |
| `visual_aid_type`<br />`visual_aid_type_code`<br />`visual_aid_type_system`<br />`visual_aid_type_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Visual aid type | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0373]` |
| `cycloplegia_during_refraction`<br />`cycloplegia_during_refraction_code`<br />`cycloplegia_during_refraction_system`<br />`cycloplegia_during_refraction_valueset_id` | coded text<br />`text`, `text`, `text`, `text` | yes | Cycloplegia during refraction | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0500]` |
| `power_of_sphere_magnitude`<br />`power_of_sphere_units` | quantity<br />`numeric`, `text` | yes | Power of sphere | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0464]` |
| `power_of_cylinder_magnitude`<br />`power_of_cylinder_units` | quantity<br />`numeric`, `text` | yes | Power of cylinder | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0466]` |
| `axis_of_cylinder_magnitude`<br />`axis_of_cylinder_units` | quantity<br />`numeric`, `text` | yes | Axis of cylinder | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0467]` |
| `near_addition_magnitude`<br />`near_addition_units` | quantity<br />`numeric`, `text` | yes | Near addition | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0468]` |
| `visual_aid_details` | `uuid` | yes | Visual aid details | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0465]` |
| `comment` | `text` | yes | Comment | `/data[at0001]/events[at0134]/state[at0041]/items[at0262]/items[at0565]` |

#### Constraints

```sql
check ((aided_eye_code is null and aided_eye_system is null and aided_eye_valueset_id is null and aided_eye is null) or (aided_eye is not null and aided_eye_code is not null and aided_eye_system is not null and aided_eye_valueset_id is not null))
check ((visual_aid_type_code is null and visual_aid_type_system is null and visual_aid_type_valueset_id is null) or (visual_aid_type is not null and visual_aid_type_code is not null and visual_aid_type_system is not null and visual_aid_type_valueset_id is not null))
check ((cycloplegia_during_refraction_code is null and cycloplegia_during_refraction_system is null and cycloplegia_during_refraction_valueset_id is null and cycloplegia_during_refraction is null) or (cycloplegia_during_refraction is not null and cycloplegia_during_refraction_code is not null and cycloplegia_during_refraction_system is not null and cycloplegia_during_refraction_valueset_id is not null))
check ((power_of_sphere_magnitude is null and power_of_sphere_units is null) or (power_of_sphere_magnitude is not null and power_of_sphere_units is not null))
check ((power_of_cylinder_magnitude is null and power_of_cylinder_units is null) or (power_of_cylinder_magnitude is not null and power_of_cylinder_units is not null))
check ((axis_of_cylinder_magnitude is null and axis_of_cylinder_units is null) or (axis_of_cylinder_magnitude is not null and axis_of_cylinder_units is not null))
check ((near_addition_magnitude is null and near_addition_units is null) or (near_addition_magnitude is not null and near_addition_units is not null))
```

#### Unique

- `visual_acuity_id, position`

#### References

| Columns | Target | On delete |
|---|---|---|
| `visual_acuity_id` | [`visual_acuity`](/docs/tables/visual_acuity) | cascade |
| `aided_eye_valueset_id, aided_eye_code, aided_eye_system, aided_eye` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `visual_aid_type_valueset_id, visual_aid_type_code, visual_aid_type_system, visual_aid_type` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `cycloplegia_during_refraction_valueset_id, cycloplegia_during_refraction_code, cycloplegia_during_refraction_system, cycloplegia_during_refraction` | [`valueset_code`](/docs/tables/valueset_code) | restrict |
| `visual_aid_details` | [`device`](/docs/tables/device) | no action |

#### Indexes

- `visual_acuity_visual_aid_per_eye_visual_aid_details_idx` on `visual_aid_details`

## Value sets

| Value set | Codes |
|---|---|
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/aided_eye` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/best_qualitative_result` | 4 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/chart_or_stimulus_type` | 22 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/comparative_label` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/contrast_category` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/crowdedness` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/cycloplegia_during_refraction` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/eye_examined` | 3 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/jaeger_font_size_notation_result` | 20 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/light_adaptation_state` | 3 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/missed_or_additional_optotypes` | 1 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/n_point_font_size_notation_result` | 41 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/no_improvement_note` | 8 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/optotype` | 19 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/perceptual_task` | 4 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/pupil_state` | 4 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/stimulus_method` | 5 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/testing_distance_category` | 3 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/type_of_ancillary_lighting_used` | 2 |
| `org.openehr::openEHR-EHR-OBSERVATION.visual_acuity.v0/visual_aid_type` | 12 |

