POST /api/summarize-record/claude
Generate a comprehensive nurse-to-nurse handoff summary from patient data using Claude AI. Supports integration with image analysis and comparison with previous handoff notes.Requires
ANTHROPIC_API_KEY in environment variables.Request
Complete patient record data
Previous handoff notes for comparison. When provided, the AI will generate a “Changes Since Last Handoff” section highlighting differences.
Analysis from
/api/analyze-image/claude. When provided, the AI will integrate whiteboard/document information throughout the summary.Request Example
Response
AI-generated handoff summary with:
- Changes since last handoff (if
previousNotesprovided) - Patient overview and Shift-Level Forecast
- Current clinical status and vital signs
- Key lab/imaging findings with trends
- Active medications and treatments
- Task status (completed and outstanding by priority)
- Safety concerns
- Integration of image analysis data (if provided)
AI provider used. Always returns
"claude" for this endpoint.Response Example
Error Responses
Features
Task Analysis
The endpoint automatically analyzes tasks in the patient data:- Separates completed vs. pending tasks
- Organizes by priority: Critical → High → Medium → Low
- Highlights time-sensitive tasks
- Shows task completion metrics
time: Scheduled timedescription: Task descriptionpriority: critical, high, medium, lowtype: medication, lab, vitals, imaging, etc.completed: boolean
Integration with Image Analysis
WhenimageAnalysis is provided:
- Merges whiteboard data with electronic records
- Prioritizes recent information from images
- Prefixes conflicts with
**IMAGE UPDATE:** - Weaves naturally into appropriate sections (not separate)
- Cross-references between sources
Comparison with Previous Notes
WhenpreviousNotes is provided:
- Generates “Changes Since Last Handoff” section
- Highlights differences with prefixes:
**CHANGED:**- Modified information**NEW:**- New items**RESOLVED:**- Issues now resolved**COMPLETED:**- Tasks finished
Trend Highlighting
Emphasis on clinical trends:- Vital sign changes (↑ increasing, ↓ decreasing)
- Lab value trajectories
- Condition progression
- Response to treatments
Shift-Level Forecast
Includes workload prediction:- ⛈️ High workload periods with reasons
- ☀️ Stable periods for planning
- Clustered events: Meds + labs + vitals
- Timeline visualization concept
Best Practices
Comprehensive Patient Data
Comprehensive Patient Data
Include all available fields in
patientData:- Complete medication lists with dosages
- All known allergies
- Recent vital signs history (not just latest)
- Detailed task list with accurate priorities
- Admission date and diagnosis
Task Management
Task Management
Ensure tasks include:
- Accurate
completedstatus - Realistic priorities (critical, high, medium, low)
- Specific times (24-hour format)
- Clear descriptions
- Task type classification
Combining Features
Combining Features
For best results, combine all three parameters:
- First, call
/api/analyze-image/claudewith whiteboard photo - Retrieve
patientDatafrom your database - Get
previousNotesfrom last handoff - Send all three to
/api/summarize-record/claude
Handoff Workflow
Handoff Workflow
Typical integration flow:
Additional Notes
This application uses Claude Sonnet 4 exclusively. The implementation does not include OpenAI integration.
