mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
Add a new "Medical history" (Anamnese) Settings section that hosts the two
structured-record managers — allergies and family history — each a
list + add/edit sheet + delete-with-confirm built on the shared query-key
factory and the ResponsiveSheet pattern. It sits between the illness journal
and the preventive-care reminders and is always shown (not module-gated, like
Vorsorge), since these are foundational health-profile records.
The section carries a plain non-diagnostic note ("your own records, not a
medical diagnosis"). Full i18n across all six locales (de/en/es/fr/it/pl).
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
"use client";
|
|
|
|
/**
|
|
* v1.25 (W-RECORDS) — Settings → Anamnese (medical history).
|
|
*
|
|
* The home for the structured health records: allergies / intolerances and
|
|
* family history. Each is a self-contained CRUD manager rendered in its own
|
|
* card. These are patient-reported reference records — not a time-series
|
|
* signal and not a clinical diagnosis — surfaced alongside the existing
|
|
* tracking-domain settings sections (Labs / Illness / Vorsorge).
|
|
*/
|
|
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { useTranslations } from "@/lib/i18n/context";
|
|
|
|
import { AllergyManager } from "@/components/records/allergy-manager";
|
|
import { FamilyHistoryManager } from "@/components/records/family-history-manager";
|
|
|
|
export function AnamnesisSection() {
|
|
const { t } = useTranslations();
|
|
return (
|
|
<div className="space-y-6">
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>{t("records.allergies.cardTitle")}</CardTitle>
|
|
<CardDescription>
|
|
{t("records.allergies.cardDescription")}
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<AllergyManager />
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>{t("records.family.cardTitle")}</CardTitle>
|
|
<CardDescription>
|
|
{t("records.family.cardDescription")}
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<FamilyHistoryManager />
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<p className="text-muted-foreground text-xs">{t("records.disclaimer")}</p>
|
|
</div>
|
|
);
|
|
}
|