mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
A medication can declare itself as-needed: no schedules, never due, never reminded, excluded from every compliance rate — but intakes log ad-hoc, consume inventory exactly like scheduled doses, and the history stays. The wizard offers it as a cadence choice and round- trips it on edit; card, table and detail show a calm marker where the next dose normally sits, the take-all dialog never collects one, and the supply runway stays unknowable by construction. (#316)
10 lines
476 B
SQL
10 lines
476 B
SQL
-- v1.16.11 (#316) — as-needed (PRN) medications.
|
|
--
|
|
-- `as_needed = true` marks a medication taken only when the user needs
|
|
-- it: no fixed schedule (zero medication_schedules rows — enforced at
|
|
-- the route layer), never due, never reminded, excluded from
|
|
-- compliance, active indefinitely. Intakes still log, inventory still
|
|
-- consumes. Additive: every existing row backfills `false`.
|
|
|
|
ALTER TABLE "medications" ADD COLUMN "as_needed" BOOLEAN NOT NULL DEFAULT false;
|