diff --git a/src/components/therapy-compass/bindings.tsx b/src/components/therapy-compass/bindings.tsx index 9e95fc6db..31dc2dac4 100644 --- a/src/components/therapy-compass/bindings.tsx +++ b/src/components/therapy-compass/bindings.tsx @@ -16,7 +16,7 @@ import { import type { Pathway, ReferenceData, Therapy } from "./data/types"; const KNOWN_SCREENS = ["search", "detail", "compare", "recommend", "pathways", "brief", "home", "sheets"] as const; -const MAX_COMPARE = 4; +export const MAX_COMPARE = 4; type SheetSectionKey = "about" | "steps" | "practice" | "coping" | "contacts"; diff --git a/src/components/therapy-compass/icons.tsx b/src/components/therapy-compass/icons.tsx index 0b2606e7f..400fb504e 100644 --- a/src/components/therapy-compass/icons.tsx +++ b/src/components/therapy-compass/icons.tsx @@ -135,6 +135,7 @@ export const CopyIcon = makeIcon( , ); +export const CheckIcon = makeIcon(, 2); export const PrinterIcon = makeIcon( , ); diff --git a/src/components/therapy-compass/screens/brief-screen.tsx b/src/components/therapy-compass/screens/brief-screen.tsx index a624f6128..738a500a1 100644 --- a/src/components/therapy-compass/screens/brief-screen.tsx +++ b/src/components/therapy-compass/screens/brief-screen.tsx @@ -5,9 +5,10 @@ import { useMemo, useState } from "react"; import { useTcBindings } from "../bindings"; import { commandControl, outlineControl } from "../controls"; import { parseSteps, summarise } from "../data/select"; -import { AlertIcon, CopyIcon, ExternalLinkIcon, FileTextIcon, SaveIcon, SearchIcon } from "../icons"; +import { AlertIcon, CheckIcon, CopyIcon, ExternalLinkIcon, FileTextIcon, SearchIcon } from "../icons"; import { s } from "../style-utils"; import { LoadingState } from "../ui"; +import { useClipboard } from "../use-clipboard"; const CHECKLIST = [ "Confirm the primary problem", @@ -20,6 +21,7 @@ export function BriefScreen() { const b = useTcBindings(); const t = b.selectedTherapy; const [filter, setFilter] = useState(""); + const { copied, copy } = useClipboard(); const briefTherapies = useMemo( () => @@ -41,6 +43,20 @@ export function BriefScreen() { t.briefVersion : t.briefVersion; const steps = parseSteps(durationText, 6); + const interventionText = [ + `${t.name} — ${durationLabel} intervention`, + "", + ...steps.map((st, i) => `${i + 1}. ${st}`), + ...(t.clinicianScripts.length + ? [ + "", + "Clinician script:", + ...t.clinicianScripts + .slice(0, 2) + .map((c) => (c.scriptType ? `${c.scriptType}: ${c.body ?? ""}` : (c.body ?? ""))), + ] + : []), + ].join("\n"); return (
@@ -231,12 +247,13 @@ export function BriefScreen() { @@ -315,13 +332,14 @@ export function BriefScreen() {
- -
-
diff --git a/src/components/therapy-compass/screens/sheets-screen.tsx b/src/components/therapy-compass/screens/sheets-screen.tsx index 07a6d7593..7e9aad567 100644 --- a/src/components/therapy-compass/screens/sheets-screen.tsx +++ b/src/components/therapy-compass/screens/sheets-screen.tsx @@ -1,11 +1,10 @@ "use client"; -import { useMemo, useState } from "react"; +import { useMemo, useState, type ReactNode } from "react"; import { useTcBindings } from "../bindings"; -import { outlineControl } from "../controls"; import { parseSteps, searchTherapies } from "../data/select"; -import { ChevronDownIcon, PrinterIcon, SaveIcon, ScaleIcon, SearchIcon } from "../icons"; +import { ChevronDownIcon, PrinterIcon, ScaleIcon, SearchIcon } from "../icons"; import { s } from "../style-utils"; import { LoadingState } from "../ui"; @@ -44,10 +43,6 @@ export function SheetsScreen() {

-