Files
HealthLog/src/components/settings/anamnesis-section.tsx
T
Marc-André Bombeck a37883e3f8 feat(records): surface allergies + family history in Settings
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).
2026-06-28 16:03:25 +02:00

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>
);
}