Commit graph

4 commits

Author SHA1 Message Date
d81a4fd926 Seasonal (yearly) dosing for allergy/pollen meds
Add a recurring month-day season window to DoseTime (seasonStartMmdd/
seasonEndMmdd): a med rests outside its window and re-arms automatically
every year. The pure ScheduleEngine gains a season filter plus one-year
overrides -- startEpochDay/endEpochDay act as early-start/extend brackets
for seasonal rows while staying hard bounds for tapers.

- Daily SupplyCheck nudges before a season opens (Start naa) and before it
  closes (Forleng), handled by the new SeasonActionReceiver.
- Med list lists resting seasonal meds in a "Sesong (hviler)" section.
- Dose-time editor gains a season block and a "scroll for more" hint so
  cyclic/season below the time picker are discoverable.
- Room migration v3->v4 (additive), backup DTO extended, engine/text tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 11:09:46 +02:00
eeed098b1a Cyclic and tapering dose schedules (schema v3)
Extends DoseTime with two orthogonal filters, as the brief foresaw
('cyclic/taper extend from the same model'):
- Cyclic (cycleActiveDays/cycleLengthDays from anchor): N-on/M-off, e.g.
  21/28 contraception. occursOn gains a cycle-window check; nextOccurrence
  is now a uniform day-by-day scan over occursOn (replacing the interval
  fast-path) so weekly/interval/cyclic/windowed all fall out of one
  correct path.
- Validity window (startEpochDay/endEpochDay, inclusive): a taper is
  several daily rows with descending amount and adjacent windows.
dailyConsumption now takes : cyclic scales by active/length, and
rows outside their window contribute 0 so a finished taper step stops
inflating days-of-supply.

UI: dose-time dialog gains a Syklisk section (på/av days) and is now
scrollable; a 'Lag nedtrapping' generator creates the windowed rows from
start dose / step-down / days-per-step / step-count. ScheduleText renders
'· syklus 21/28' and '· 11. juni–13. juni'.

Migration 2→3 is additive ADD COLUMNs with defaults matching the entity
(@ColumnInfo defaultValue), proven by an instrumented MigrationTestHelper
test. Backup DTO extended with defaults so v2 files still parse. 9 new
engine unit tests; versionCode 3 / 0.3.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 22:09:51 +02:00
9b99f2cf62 Typography: Manrope headings, Inter body — plus norsk dag/dager pluralization
Manrope (variable wght, instanced at 600/700/800) for display/headline/
title roles; Inter static Regular/Medium/SemiBold for body/label. M3
baseline metrics retained — only family and weight change, so component
layouts and accessibility text scaling are untouched. Both fonts are
OFL (THIRD_PARTY_LICENSES.md added) with full æøå/µ coverage, verified
by emulator screenshot. ScheduleText.daysCount fixes 'lager for 1
dager' spotted in that screenshot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:09:07 +02:00
e9a6679242 Doctor summary: one-page PDF via PdfDocument + FileProvider share
Milestone 7. Human-readable A4 summary (meds, schedule, supply days,
rx expiry/reit, 30-day adherence, notes) — deliberately distinct from
the machine-readable JSON backup, zero PDF dependencies. The Norwegian
schedule phrasing (ScheduleText) and adherence math are pure and
unit-tested; a wrong schedule line on a doctor's desk is a clinical
communication error, so it gets engine-grade testing. FileProvider
exposes only cacheDir/summaries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 14:02:34 +02:00