From 22eda3040e1939830e19564a1309e75e8354a3b2 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 14 Jul 2026 06:07:59 -0400 Subject: [PATCH] feat(drug-reference): co-locate a persistent safety note with affirmative remedy guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add RemedySafetyNote at the head of every natural-remedy section — the two on Drug Reference and the one on "When to use what" — so the "informational only, not medical advice, seek real medical care in an emergency" framing appears with the guidance itself, not only in the page-top banner. Replaces the terse per-section caveat with the same amber alert language as SafetyBanner. Addresses the upstream #1040 review request that the disclaimer be unmistakable and present wherever affirmative self-care guidance appears, not a one-time banner. Co-Authored-By: Claude Opus 4.8 --- .../conditions/RemedySafetyNote.tsx | 38 +++++++++++++++++++ admin/inertia/pages/conditions/show.tsx | 11 +++--- admin/inertia/pages/drug-reference/index.tsx | 15 ++++---- 3 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 admin/inertia/components/conditions/RemedySafetyNote.tsx diff --git a/admin/inertia/components/conditions/RemedySafetyNote.tsx b/admin/inertia/components/conditions/RemedySafetyNote.tsx new file mode 100644 index 0000000..6e55124 --- /dev/null +++ b/admin/inertia/components/conditions/RemedySafetyNote.tsx @@ -0,0 +1,38 @@ +import { IconAlertTriangle } from '@tabler/icons-react' + +/** + * Co-located safety note for AFFIRMATIVE self-care / natural-remedy guidance. + * + * Distinct from {@link SafetyBanner}, which leads a page and frames FDA + * label-indication *matches*. This note sits at the head of every block that + * offers affirmative remedy guidance (the natural-remedy sections on the Drug + * Reference and "When to use what" pages), so the "informational only, not + * medical advice, seek real care in an emergency" framing appears WITH the + * guidance itself — not only in a one-time banner the reader may have scrolled + * past. Same amber alert language as SafetyBanner so the two read as one system. + */ +export default function RemedySafetyNote() { + return ( +
+
+ ) +} diff --git a/admin/inertia/pages/conditions/show.tsx b/admin/inertia/pages/conditions/show.tsx index 965f167..95153b2 100644 --- a/admin/inertia/pages/conditions/show.tsx +++ b/admin/inertia/pages/conditions/show.tsx @@ -2,6 +2,7 @@ import { Head, Link } from '@inertiajs/react' import { IconArrowLeft, IconLeaf } from '@tabler/icons-react' import AppLayout from '~/layouts/AppLayout' import SafetyBanner from '~/components/conditions/SafetyBanner' +import RemedySafetyNote from '~/components/conditions/RemedySafetyNote' import DrugResultRow from '~/components/drug-reference/DrugResultRow' import type { ConditionSummary, NaturalRemedy } from '../../../types/conditions' import { remedySourceName } from '../../../util/conditions' @@ -106,11 +107,11 @@ export default function ConditionsShow({ condition, drugs, remedies, drugRowCoun - {/* Caveat — prominent, before the cards. */} -

- Complementary remedies — limited or mixed evidence, not FDA-evaluated. - These are not substitutes for medical treatment. Talk to a clinician before use. -

+ {/* Safety note — co-located with the affirmative remedy guidance, + not just the page-top banner (upstream PR #1040 requirement). */} +
+ +
{remedies.map((r) => ( diff --git a/admin/inertia/pages/drug-reference/index.tsx b/admin/inertia/pages/drug-reference/index.tsx index 2ab9ae4..5fb5ed9 100644 --- a/admin/inertia/pages/drug-reference/index.tsx +++ b/admin/inertia/pages/drug-reference/index.tsx @@ -5,6 +5,7 @@ import StyledButton from '~/components/StyledButton' import DrugResultRow from '~/components/drug-reference/DrugResultRow' import IngestStatus from '~/components/drug-reference/IngestStatus' import SafetyBanner from '~/components/conditions/SafetyBanner' +import RemedySafetyNote from '~/components/conditions/RemedySafetyNote' import { IconSearch, IconFirstAidKit, IconLeaf } from '@tabler/icons-react' import type { DrugSearchResult, @@ -668,10 +669,9 @@ export default function DrugReferenceIndex({ ingestStatus, rowCount, conditions, Natural remedies
-

- Complementary remedies — limited evidence, not FDA-evaluated. Talk to a - clinician before use. -

+
+ +
{visibleSituationRemedies.map((r) => ( @@ -722,10 +722,9 @@ export default function DrugReferenceIndex({ ingestStatus, rowCount, conditions, {remedyMatches.length} match{remedyMatches.length !== 1 ? 'es' : ''}
-

- Complementary remedies — limited evidence, not FDA-evaluated. Talk to a - clinician before use. -

+
+ +
{remedyMatches.map((r) => (