Clinical tidy-up: Services call button, A to Z lists, Forms Clock and Act tabs, Safety plan header, Therapy

Merged
BI
1mo ago
+2059-236

User description

Requested by Josh · project thread

Summary

Before: Services result cards showed no phone number; browsing DSM, Specifiers, Formulation, Therapy and Forms with nothing typed showed an "All" list with "Top match" labels; Forms had no tabs and the MHA clock lived only under Psychiatry; Safety plan had no app header; every Therapy pathway showed "Incomplete" with no explanation.

After: each Services card leads with "Call " (only when the record holds a dialable number; Review referral and Add to shortlist move behind More); browsing lists are titled by section and run A to Z, and DSM groups by chapter; Forms has Forms, Clock and Act tabs, the clock has "Copy for handover" and a Clinical blue Start button; Safety plan sits in the normal shell under Psychiatry with one home on the Psychiatry page; Pathways explains Incomplete in one line and desktop therapy cards use small buttons.

How: usefulness and layout audit (11 Oct 2026) items 6 (browse part), 7, 9 and the Therapy and Safety plan items of 8. Display and navigation only. The side menu regroup, one Compare and desktop layouts wait for the owner's yes on mockups and are not in this PR.

Areas touched: App experience, Knowledge and records, Design system, Clinical reference content.

Verification

  • npx tsc --noEmit: exit 0 on the combined branch.
  • npx eslint on changed source and tests: exit 0. Prettier: "All matched files use Prettier code style!"
  • npx vitest run on all changed and related unit/DOM tests: "Test Files 15 passed (15), Tests 245 passed (245)".
  • check:diff-integrity: "PASS — 18 changed test file(s), 350 -> 376 test case(s)".
  • Browser specs edited (ui-smoke, ui-tools, ui-overlap, ui-accessibility, ui-mode-nav-density) but not run locally; left to CI.

Clinical Governance Preflight

  • No clinical wording, criteria, comparison content, sign-off or review status changed. "Incomplete" and "Needs source review" statuses unchanged.
  • New explanatory line on Pathways is taken from the data's own definition ("Marked incomplete until clinician review confirms sequencing").
  • MHA clock handover copy reuses only time limits the page already computes and shows; it adds no new legal calculation. Copied text omits the Act quotes shown beside each limit on screen and ends with the existing "Reference only" line: needs the owner's clinical sign-off before going live.
  • Services call numbers come from each record's existing phone field; nothing is invented, and records with no dialable number get no button.
  • No patient data, no storage changes: Safety plan still stores nothing; clocks stay on device.

Risk and rollout

  • Risk: navigation and display only; no database, provider, ranking or service-worker change.
  • Rollback: revert this PR.
  • Provider or production effects: None.

Notes

  • Stays DRAFT: clinical content area; the owner sends it live.
  • RAG impact: no retrieval behaviour change — no ranking-protected file touched; empty-query sorting happens in the UI only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N5U9yjzHumprWGGZ4R3hBj

Generated by Claude Code


Summary by cubic

A display-and-navigation tidy-up of the clinical areas: Services cards gain a dial button, empty browse lists run A to Z under the section name instead of "All", Clinical Forms gets Forms/Clock/Act tabs, the safety plan moves under the normal app header in Psychiatry, and Therapy explains its "Incomplete" tags.

Navigation and lists

  • Each Services result card leads with "Call <number>" taken from the record's own phone field (no button when the record has none; unbracketed extensions are not folded into the dialled number); Review referral and Add to shortlist move behind a "More" toggle.
  • Browsing with nothing typed shows the section name and a plain A to Z list with no "Top match"/"Why matched"; DSM groups by chapter, and Therapy treats punctuation-only input as browsing.
  • Clinical Forms gains Forms, Clock and Act tabs; the Clock is the same MHA clock the Psychiatry hub links to, now also at /forms/clock, with "Copy for handover" — each time limit carrying its Act citation, condition and repeat interval — and the primary blue Start button; switching tabs keeps the list's filters and sort selection. Neither the Clock nor the Act tab is recorded as a visit or counted among the hub's most-opened forms.
  • The safety plan now renders inside the PsychSift shell under Psychiatry with the normal header and no search composer; the URL and store-nothing behaviour are unchanged.
  • Header mode-menu, option links and shell navigations ask for confirmation before leaving an unfinished safety plan, since client-side navigation skips the browser's unload warning; declining keeps the mode menu open and focused, reloading keeps you on the plan, and a sentinel left by a reload is stepped back off to reach the previous page while a confirmed leave still skips both plan entries.

Therapy and safety-plan display

  • Pathways state once what "Incomplete" means (clinician review has not yet confirmed the step order) and count only steps linked to a therapy record.
  • Desktop therapy result cards shrink their actions to the row end since the whole card already opens the record; phone layout is unchanged.

Display and navigation only — no search or ranking change, clocks stay on device, and no numbers or legal text are invented. DRAFT: the new clock handover copy awaits the owner's clinical sign-off.


CodeAnt-AI Description

Make clinical browsing clearer and surface key actions across services, forms, and safety planning

What Changed

  • Service results show a call button with the record’s dialable number when available; referral review and shortlisting are under More.
  • Browsing DSM, Specifiers, Formulation, Therapy, and Forms with no query now shows the section name and an A-to-Z list. DSM diagnoses are grouped by chapter; typed searches keep their ranked results.
  • Clinical Forms now has Forms, Clock, and Act tabs. Handover copies include form names and the time limits shown on the clock, with their conditions and Act references.
  • The safety plan uses the Psychiatry app header and prompts before navigation or Back can discard entries. Its Psychiatry home link is its single entry point.
  • Therapy pathways explain what “Incomplete” means, and desktop therapy cards use more compact action buttons.

Impact

✅ One-tap calls from service results
✅ A-to-Z browsing without misleading match labels
✅ Forms, clock and Act one tap apart
✅ Fewer lost safety-plan entries

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.