feat(vaccinations): mint the booster reminder a logged dose suggests

- rung 2: a prefilled, user-confirmed, editable, declinable prompt writes an
  ordinary VORSORGE reminder keyed on the dose's primary antigen; the
  published origin enum and reminder DTO are unchanged
- idempotent by antigen — a second confirmation re-anchors the existing
  reminder rather than minting a second (WR-9 seen red on the reminder count,
  reverted by content hash)
- rolling day cadence so logging the next dose re-anchors the due date through
  the Phase 1 satisfy matcher; the whole loop proven through real routes
- booster prompt copy in six locales, plural-aware
This commit is contained in:
Marc-André Bombeck committed 2026-08-08 21:01:25 +02:00
1 parent f540298521
commit b5ce44628a
14 files changed
+849

No files matched your search

+22
View File
@@ -209,3 +209,25 @@ export const vaccinationLinkSchema = z
.strict();
export type VaccinationLinkInput = z.infer<typeof vaccinationLinkSchema>;
/* ── booster mint (rung 2) ────────────────────────────────────────── */
/**
* The confirm body for a booster reminder.
*
* Every value is the user's — accepted or edited from the catalogue's
* prefill. `intervalMonths` is bounded generously (a decade booster is 120)
* and the label is composed client-side so its locale is the person's own. No
* `vaccinationAntigen` field: the server reads the antigen from the dose's
* catalogue entry, never from the request, so a client cannot key a reminder
* onto an antigen the dose does not contain.
*/
export const vaccinationBoosterSchema = z
.object({
intervalMonths: z.number().int().min(1).max(600),
label: z.string().trim().min(1).max(120),
notifyHour: z.number().int().min(0).max(23).optional(),
})
.strict();
export type VaccinationBoosterInput = z.infer<typeof vaccinationBoosterSchema>;