Physician Notetaker

Turns consultation transcripts into a summary, a SOAP note and a patient sentiment read. Three GPT tasks raced in parallel.

LLM / RAG2025All work

Fig. 01Physician Notetaker, transcript upload and processing surface.
Physician Notetaker, transcript upload and processing surface.

What it is

What it does

Drop in a physician-patient transcript (.txt or .docx) and get one combined JSON back: a structured medical summary, a sentiment/intent read of the patient, and a full SOAP note. Three independent GPT agents run simultaneously so total wait tracks the slowest task, not their sum.

Why it exists

I sat in on a few consult transcripts and saw how much time doctors spend rewriting what was already said. The extraction is easy. The hard part is keeping the output shape consistent and not making someone wait for three serial GPT calls.

3
Parallel agents
1
Combined JSON
SOAP
Clinical format

Repo Amit-kr26/Physician_NotetakerDemo physician-notetaker-amit-kr26s-projects.vercel.app/Stack Flask · GPT-4 Turbo · python-docx · JavaScript

Build5decisions

How it is built

Three specialised agents

agents/medical_summarizer.py extracts Patient_Name, Symptoms[], Diagnosis, Treatment, Current_Status, Prognosis; sentiment_analyzer.py constrains Sentiment to Anxious/Neutral/Reassured and Intent to four fixed classes; soap_generator.py fills Subjective/Objective/Assessment/Plan.

Thread-level fan-out

app.py holds a ThreadPoolExecutor(max_workers=3) and submits all three agents per request, collecting futures with .result() before responding.

Defensive JSON handling

Every agent strips ```json fences by regex before json.loads; parse failures surface as explicit error objects rather than half-formed notes.

Honest model wiring

utils.call_gpt4_mini drives chat.completions.create against GPT-4 Turbo with temperature 0.3 and a 1000-token ceiling per task.

Considered front-end

Drag-and-drop upload with icon swaps, simulated staged progress while awaiting fetch, recursive JSON renderer with staggered fade-ins, keyboard shortcuts (Ctrl+U upload, Ctrl+D download, Esc cancel) and Web Share support.

How the pieces connect

Upload and fan out Combine and deliver Transcript .txt or .docx Flask /process upload + extract Thread pool 3 workers Medical summary GPT-4 Turbo Sentiment + intent GPT-4 Turbo SOAP note GPT-4 Turbo JSON parse fences stripped Combiner one object Single JSON one response Browser render download, copy the same transcript, three prompts