# Model: NutritionPlan

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

## Purpose

Therapeutic-nutrition follow-up: calorie/macro targets and diet type set by a dietitian
(a `Doctor` row whose specialty is "Therapeutic Nutrition" — see
`06-overview-medical-center-expansion.md`'s reuse decision, no new provider model). 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 | |
| `diet_type` | string | nullable | e.g. `low_carb` / `mediterranean` / `post_bariatric_stage_2` / free text |
| `calorie_target_kcal` | unsignedSmallInteger | nullable | |
| `protein_target_g` | unsignedSmallInteger | nullable | |
| `carb_target_g` | unsignedSmallInteger | nullable | |
| `fat_target_g` | unsignedSmallInteger | nullable | |
| `follow_up_interval_days` | unsignedSmallInteger | nullable | drives the next-follow-up reminder |
| `dietitian_notes` | text | nullable | |
| `created_at` / `updated_at` | timestamp | | |

## Relationships

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

## Decisions

- Macro targets are plain nullable integer columns rather than a JSON blob — unlike
  `BariatricAssessment.comorbidities` (an open-ended checklist), macros are a fixed, always-the-same
  set of four numbers, so dedicated columns are simpler to query/aggregate (e.g. "average calorie
  target across active nutrition plans") than unpacking JSON.
- No separate "weigh-in" table — weight trend for a nutrition patient is read from `Vital` rows
  across their subsequent encounters (Phase 6), not duplicated here.
