mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
feat(self-description): add the non-diagnostic / intended-purpose standard
Introduce one canonical "what this is / is not, not a medical device" statement plus a layered, calm disclaimer set, and apply it on the surfaces that earn a context note. - New shared `MedicalDisclaimer` component renders the copy as plain React text (no markdown renderer, per the XSS posture). Variants: intendedPurpose, coach, insights, labs, medications, emergency, dataPosture. - New `selfDescription` i18n namespace across all six locales: the intended-purpose line, the per-surface notes, the emergency note, and an explicit data-posture statement (self-hosted, data stays on your instance, encrypted at rest, BYOK / local model, no third-party analytics). - Apply once per surface, layered not plastered: a calm standing line on the Coach new-chat hero, one framing line in the Insights layout shell (covers the briefing and trends), a labs note (ranges vary, only a clinician interprets), a neutral medications note, and the data-posture line where the provider key is configured. Mental-wellbeing keeps its existing crisis copy; records keep their existing note. - Extend the Coach system prompt (EN + DE) with a self-description ground rule so the Coach answers "what are you / where does my data go" honestly and stays non-diagnostic. App-authored copy was already observational; the few diagnose/treat tokens are negations, idioms, or framed as the user's own self-reported statement, so no softening was required.
This commit is contained in:
1 parent
a27a1ee71d
commit
3bd52a322b
13 files changed
+195
-5
No files matched your search
@@ -6,6 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { Loader2, Pencil, Plus, ScanLine, Wrench } from "lucide-react";
|
||||
|
||||
import { MedicalDisclaimer } from "@/components/common/medical-disclaimer";
|
||||
import { LabForm } from "@/components/labs/lab-form";
|
||||
import { LabList } from "@/components/labs/lab-list";
|
||||
import { OcrReviewDialog } from "@/components/labs/ocr-review-dialog";
|
||||
@@ -173,6 +174,11 @@ export default function LabsPage() {
|
||||
) : null}
|
||||
|
||||
<LabList onAddFirst={() => setDialogOpen(true)} />
|
||||
|
||||
{/* v1.25 — calm, context-specific framing for lab values: your own
|
||||
records, ranges vary by lab and person, only a clinician interprets
|
||||
them. One footer line, not a per-row banner. */}
|
||||
<MedicalDisclaimer variant="labs" className="px-1 pt-2" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
import { queryKeys } from "@/lib/query-keys";
|
||||
import { MedicalDisclaimer } from "@/components/common/medical-disclaimer";
|
||||
import { MedicationWizardDialog } from "@/components/medications/wizard/medication-wizard-dialog";
|
||||
import { MedicationCard } from "@/components/medications/medication-card";
|
||||
import { Glp1MedicationCard } from "@/components/medications/glp1-medication-card";
|
||||
@@ -524,6 +525,12 @@ export default function MedicationsPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* v1.25 — calm framing for the medications surface: this tracks what
|
||||
you log and your own adherence, it doesn't assess dosing or
|
||||
interactions and isn't medical advice. One footer line, neutral —
|
||||
the med cards themselves stay un-tinted. */}
|
||||
<MedicalDisclaimer variant="medications" className="px-1 pt-2" />
|
||||
|
||||
{/* v1.5.5 — the per-card kebab triggers used to open inline
|
||||
IntakeImportDialog / ApiEndpointDialog mounts here, but both
|
||||
state slots were only ever set from inside the dialogs
|
||||
|
||||
Reference in new issue
Block a user