mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 15:02:04 +00:00
Merge branch 'fix/meds-ended-and-mental-health' into release/v1.39.4
This commit is contained in:
commit
206da07e8c
42 files changed
+1075
-34
No files matched your search
@@ -358,6 +358,11 @@ const medicationSchema = z
|
||||
// v1.39.1 (#1033) — absent in a backup written before the field existed;
|
||||
// the restore defaults it to tracking on, the behaviour those had.
|
||||
trackIntake: z.boolean().optional(),
|
||||
// v1.39.4 — the clinical category. Absent in older files. A string, not
|
||||
// the enum: a file from a newer server may name a category this one does
|
||||
// not know, and the restore reads that as OTHER rather than refusing the
|
||||
// whole file.
|
||||
category: z.string().max(64).optional(),
|
||||
deliveryForm: z.enum(MedicationDeliveryForm).optional(),
|
||||
trackInjectionSites: z.boolean().optional(),
|
||||
allowedInjectionSites: z.array(z.enum(InjectionSite)).optional(),
|
||||
|
||||
@@ -68,7 +68,9 @@ export const rxNormCodeField = z
|
||||
* wizard's Step 2 taxonomy can write a first-class bucket for those
|
||||
* two rows instead of collapsing them into `OTHER`. The column is a
|
||||
* plain TEXT field — no Prisma enum exists to migrate; the Zod values
|
||||
* list is the only enforcement layer.
|
||||
* list is the only enforcement layer. v1.39.4 adds `MENTAL_HEALTH`
|
||||
* (antidepressants, anxiolytics, mood stabilisers, ADHD medication), again
|
||||
* without a migration.
|
||||
*/
|
||||
export const MEDICATION_CATEGORY_VALUES = [
|
||||
"BLOOD_PRESSURE",
|
||||
@@ -83,6 +85,7 @@ export const MEDICATION_CATEGORY_VALUES = [
|
||||
"SLEEP_AID",
|
||||
"DIABETES",
|
||||
"ANTIBIOTIC",
|
||||
"MENTAL_HEALTH",
|
||||
"OTHER",
|
||||
] as const;
|
||||
export type MedicationCategoryValue =
|
||||
|
||||
Reference in new issue
Block a user