feat(anamnesis): carry life circumstances into the coach context, the doctor report and FHIR

This commit is contained in:
Marc-André Bombeck committed 2026-10-16 00:58:34 +02:00
1 parent f2be772eaf
commit db750ef246
10 files changed
+746 -52

No files matched your search

+7 -1
View File
@@ -280,7 +280,13 @@ export function ClinicianView({
{/* ── the fenced tier, as the owner chose it ───────────── */}
<FamilyHistorySection t={t} report={report} scope={scope} />
<AnamnesisSection t={t} report={report} scope={scope} />
<AnamnesisSection
t={t}
report={report}
scope={scope}
fmtNum={fmtNum}
fmtDate={fmtDate}
/>
<MoodSection t={t} report={report} scope={scope} fmtNum={fmtNum} />
<CycleSection
t={t}
@@ -13,6 +13,7 @@
* A pure server component: no client hooks, no session, no markdown — every
* value renders as escaped React text.
*/
import { lifeReportRows } from "@/lib/profile/life-report-rows";
import { Fragment } from "react";
import { dateOnlyAtNoonUtc } from "@/lib/tz/date-only";
@@ -473,10 +474,14 @@ export function AnamnesisSection({
t,
report,
scope,
fmtNum,
fmtDate,
}: {
t: Translate;
report: DoctorReportData;
scope: LeafScope;
fmtNum: (n: number) => string;
fmtDate: (iso: string) => string;
}) {
const anamnesis = report.anamnesis ?? null;
@@ -518,6 +523,11 @@ export function AnamnesisSection({
label={t("doctorReport.anamnesisShiftSchedule")}
value={factValue("SHIFT_SCHEDULE", anamnesis?.shiftSchedule ?? null)}
/>
{lifeReportRows(anamnesis?.life, t, fmtNum, fmtDate).map(
([label, value]) => (
<StatRow key={label} label={label} value={value} />
),
)}
</LeafSection>
);
}