# Model: DiabetesScreening

**Table**: `clinic_diabetes_screenings` (new, Phase 7)

## Purpose

Periodic diabetes-complication screening checklist — the standard clinical checks (eye, kidney,
nerve, foot) that must be tracked over time for a diabetic patient, distinct from a single lab
value. Optional 1:1 extension of `Encounter`.

## Fields

| Column | Type | Constraints | Notes |
|---|---|---|---|
| `id` | bigint | PK | |
| `encounter_id` | bigint | `foreignId('encounter_id')->constrained('clinic_encounters')->cascadeOnDelete()` unique | 1:1, optional — not every encounter has one |
| `retinopathy_screened_at` | date | nullable | eye exam date |
| `retinopathy_result` | string | nullable | `normal` / `abnormal` / free text |
| `nephropathy_screened_at` | date | nullable | |
| `microalbumin_result` | string | nullable | mirrors/links conceptually to a `LabResult` once Phase 9 ships, but kept as a summary field here for quick chart review |
| `egfr_value` | decimal(5,1) | nullable | |
| `neuropathy_screened_at` | date | nullable | |
| `monofilament_result` | string | nullable | `normal` / `reduced sensation` / free text |
| `foot_exam_result` | text | nullable | ulcers, deformities, pulses |
| `cardiovascular_risk_notes` | text | nullable | |
| `next_screening_due_at` | date | nullable | drives a "screening overdue" flag on the patient list |
| `created_at` / `updated_at` | timestamp | | |

## Relationships

| Relation | Type | Target |
|---|---|---|
| `encounter()` | `belongsTo` | `Encounter` |

## Decisions

- Stored as one wide row per screening event rather than four separate tables (retinopathy,
  nephropathy, neuropathy, foot) — these four are always reviewed together in one screening visit
  clinically, so splitting them into separate tables would just require four joins to render one
  screen with no query benefit.
- `next_screening_due_at` is a plain column, not computed — the doctor sets it explicitly (typical
  cadence is annual) so the "overdue screening" list is a simple date comparison, no scheduling
  logic needed in this phase.
