41 lines
1.7 KiB
Plaintext
41 lines
1.7 KiB
Plaintext
---
|
|
|
|
description: Treatment workspace — preview vs form, history, load flow, lab dispatch
|
|
|
|
globs: frontend/src/components/ui/treatment/**,frontend/src/components/treatment/**,frontend/src/components/shared/treatmentSelection.ts,frontend/src/components/shared/scrollWithinMain.ts,backend/src/modules/treatments/**
|
|
|
|
alwaysApply: false
|
|
|
|
---
|
|
|
|
|
|
|
|
# Treatment workspace
|
|
|
|
|
|
|
|
- **Browse mode** (`selectedPreviewId` set): preview only; banner + **Load into workspace**; form unchanged until load.
|
|
|
|
- **Current draft** preview: heading “Current draft”; no load button while editing live.
|
|
|
|
- **Lab dispatch attention:** `LabDispatchAttentionPanel` — unsent lab-dependent details; quick jump to dispatch.
|
|
|
|
- **History API:** patient-scoped; non-owners filtered by provider on treatment or appointment; org owners see all.
|
|
|
|
- **History filters (client-side):** `PastTreatmentsPanel` — “Not shipped to lab” + single date; helpers in `treatmentHistoryFilters.ts`. No new fetch params.
|
|
|
|
- **Lab shipment block:** prosthesis/lab-dependent detail with no teeth saves but cannot ship — `LabShipmentBlockedNotice`, inline banner, toast on add shipment.
|
|
|
|
- **Lab case comments:** `DetailLabCaseCommentsSection` under detail when sent and lab tasks not all complete (`taskProgress` from API).
|
|
|
|
- **Today checkbox:** unchecked when viewing a non-today day; checking Today unlocks selection and auto-picks nearest appointment.
|
|
|
|
- **Lab search:** `LinkedOrganizationSearchCombobox` — select from results; invite lab via `/organizations?action=invite-lab` when permitted.
|
|
|
|
- **Scroll:** use `scrollWithinMainScrollContainer`; shared `Checkbox` only.
|
|
|
|
|
|
|
|
Full map: `.cursor/skills/treatment-workspace/SKILL.md`
|
|
|