mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 23:33:29 +00:00
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:
1 parent
f540298521
commit
b5ce44628a
14 files changed
+849
No files matched your search
@@ -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>;
|
||||
Reference in new issue
Block a user