feat(rabbits): medical/health record tracking #22

Closed
opened 2026-09-11 00:58:11 +01:00 by Hermes · 0 comments
Collaborator

Summary

There is currently no tracking for vet visits, medications, vaccinations, weight, or other health events — only static neutered_spayed status exists on the rabbit record.

Data model

New table HealthRecord:

  • rabbit_id FK
  • date — when it happened
  • record_type — fixed enum (not free text, for consistent filtering/reporting): Vet Visit, Medication, Vaccination, Weight Check, Nail Clip, Other
  • notes — free text (symptoms, diagnosis, dosage, etc.)
  • weight_kg — nullable float, broken out as its own column (not buried in notes) since it's the one field worth tracking as a trend later
  • next_due_date — nullable, for recurring care (booster vaccination, next nail clip)
  • created_at, user_id (who logged it, mirrors the audit log pattern)

UI

  • Rabbit detail page gets a "Health" section: reverse-chronological list of records, add/edit/delete inline via HTMX — same pattern as the existing timesheets-on-employee rows (app/routers/timesheets.py / timesheets/_row.html).
  • Editable/deletable after creation by staff and admin (matches existing rabbit-edit permission level — not append-only, not admin-restricted).
  • weight_kg is stored now; a weight-over-time chart is explicitly out of scope for this issue (future enhancement once there's enough data logged to be useful).

Dependency

  • Records with a next_due_date in the past or due soon should feed into the dashboard "needs attention" widget (#21) once that exists — flag as a follow-on, not a blocker for this issue.

Permissions

  • Add/edit/delete: staff and admin (same as rabbit edit today).
  • View: viewer and above, same as rabbit detail page.
## Summary There is currently no tracking for vet visits, medications, vaccinations, weight, or other health events — only static `neutered_spayed` status exists on the rabbit record. ## Data model New table `HealthRecord`: - `rabbit_id` FK - `date` — when it happened - `record_type` — fixed enum (not free text, for consistent filtering/reporting): `Vet Visit`, `Medication`, `Vaccination`, `Weight Check`, `Nail Clip`, `Other` - `notes` — free text (symptoms, diagnosis, dosage, etc.) - `weight_kg` — nullable float, broken out as its own column (not buried in notes) since it's the one field worth tracking as a trend later - `next_due_date` — nullable, for recurring care (booster vaccination, next nail clip) - `created_at`, `user_id` (who logged it, mirrors the audit log pattern) ## UI - Rabbit detail page gets a "Health" section: reverse-chronological list of records, add/edit/delete inline via HTMX — same pattern as the existing timesheets-on-employee rows (`app/routers/timesheets.py` / `timesheets/_row.html`). - Editable/deletable after creation by staff and admin (matches existing rabbit-edit permission level — not append-only, not admin-restricted). - `weight_kg` is stored now; a weight-over-time chart is explicitly out of scope for this issue (future enhancement once there's enough data logged to be useful). ## Dependency - Records with a `next_due_date` in the past or due soon should feed into the dashboard "needs attention" widget (#21) once that exists — flag as a follow-on, not a blocker for this issue. ## Permissions - Add/edit/delete: staff and admin (same as rabbit edit today). - View: viewer and above, same as rabbit detail page.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cpressland/rabbitdb#22
No description provided.