diff --git a/src/pages/Encounters/tabs/EncounterNotesTab.tsx b/src/pages/Encounters/tabs/EncounterNotesTab.tsx index 6cbb7e47d98..3e2231c4115 100644 --- a/src/pages/Encounters/tabs/EncounterNotesTab.tsx +++ b/src/pages/Encounters/tabs/EncounterNotesTab.tsx @@ -418,6 +418,12 @@ export const EncounterNotesTab = ({ encounter }: EncounterTabProps) => { const handleCreateThread = (title: string) => { if (title.trim()) { + if ( + threadsData?.results.some((thread) => thread.title === title.trim()) + ) { + toast.error("Thread with this title already exists."); + return; + } createThreadMutation.mutate({ title: title.trim(), encounter: encounter.id,