Skip to main content

EyeExam

ComplexSpecialty<co-eye-exam>

EyeExam records right eye (OD) and left eye (OS) visual acuity, intraocular pressure and refraction in one place, with flags for reduced acuity, high pressure and pressure asymmetry.

import { EyeExam } from 'health-components';

Examples​

Glaucoma Follow Up​

Storybook

Child Screening​

Storybook

Usage​

<EyeExam exam={{ od: { vaCc: "20/25", iop: 16 }, os: { vaCc: "20/30", iop: 17 }, iopMethod: "Goldmann" }} refractions={[{ type: "Manifest", od: { sph: -2.25, cyl: -0.5, axis: 180, va: "20/20" }, os: { sph: -2, cyl: 0, va: "20/20" } }]} />

When to use​

  • Optometry and ophthalmology exams, diabetic eye screening, glaucoma follow-up.

When not to use​

  • Slit lamp and fundus findings: a structured exam note.
  • Contact lens fitting parameters.

Variants and states​

VariantWhat it is
acuitySnellen distance without (sc) and with (cc) correction, pinhole and near. Worse than 20/40 shows a warning; 20/200 or worse shows danger.
IOPmmHg, whole numbers, range 10 to 21. High above 21, critical at 30 or more with a same-day action.
asymmetryA 4 mmHg or larger difference between eyes raises a warning.
refractionManifest, cycloplegic, autorefraction or final Rx rows: sphere and cylinder to 0.25 D in signed form, axis in degrees, add and prism.
not testedMissing values say so in words.
readOnlyHides the actions.

Clinical values​

Every number goes through the shared clinical value rules (CareOS.fmt and ClinicalValue from the clinical-values card): tabular digits, the unit always shown, a fixed precision per measure, the reference range in the tooltip, and H, L or critical flags. Medication amounts follow the ISMP dose style through fmt.doseNumber: rounded to the stated precision, then shown with no trailing zero (5 mg, never 5.0 mg) and a leading zero (0.5 mL). The specialty measures this card adds sit in CareOS.specialty.MEAS with their precision: IOP 0 decimals mmHg, sphere, cylinder and add 2 decimals D with a sign, axis whole degrees. Ranges in the previews are sample values for the design system, not clinical guidance; a real deployment passes its own.

Accessibility​

  • Each eye is a row header with the abbreviation and its plain name.
  • Flags are words and icons, not just red text.
  • Signed lens powers read as plus or minus.

Do and don't​

  • Do: Always print a sign on sphere and cylinder.
  • Do: Record the IOP method and time; readings vary through the day.
  • Don't: Write OD/OS without the plain name the first time.
  • Don't: Show a blank where a test was not done.

Props​

PropTypeDefaultDescription
exam *EyeExamData—{od, os, iopMethod, iopTime}; required
refractionsReadonlyArray<Refraction>[]Refraction rows
titlestring'Eye exam'Card title
subtitlestringnoneLine under the title
readOnlybooleanfalseHides Copy Last Exam and Finalize Rx
onCopyLastExam() => voidnoneCopy Last Exam action
onFinalizeRx() => voidnoneFinalize Rx action
rangeContextRangeContextIdthe global context, else 'outpatient'Which shared reference range flags use; the lab range on a result still wins

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-eye-exam>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-eye-exam title="…" subtitle="…" [exam]="exam" (co-copy-last-exam)="onCopyLastExam($event.detail)"></co-eye-exam>
KindNameDescription
property / JSON attributeexam{od, os, iopMethod, iopTime}; required
property / JSON attributerefractionsRefraction rows; default []
attributetitleCard title; default 'Eye exam'
attributesubtitleLine under the title; default none
attributeread-only / readOnlyHides Copy Last Exam and Finalize Rx; default false
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default the global context, else 'outpatient'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-copy-last-examCopy Last Exam action; default none (React: onCopyLastExam)
eventco-finalize-rxFinalize Rx action; default none (React: onFinalizeRx)