Overview
The dictation system is the centerpiece of Paw & Care’s mobile-first veterinary workflow. Veterinarians can record clinical observations using voice, upload existing audio/documents, or type manually—then generate structured SOAP notes automatically using AI. Key Features:- Real-time voice recording with live transcription
- Multiple input methods (record, upload, type)
- AI-powered SOAP note generation
- Customizable clinical templates
- Clinical insights and recommendations
- Offline-capable with browser Speech API fallback
Input Methods
The dictation feature supports three input methods:Record
Live audio recording with real-time transcription preview
Upload
Upload audio files, PDFs, images, or text documents
Type
Manual text entry for quick notes or edits
Voice Recording
The recording system uses the MediaRecorder API with optimized audio settings:- Pause/resume during recording
- Visual recording timer (MM:SS format)
- Live waveform visualization
- Audio playback before transcription
- High-quality WebM/Opus encoding
src/sections/DictationSOAP.tsx:170-203.
Live Transcription
While recording, the app provides real-time transcription using the browser’s built-in Speech Recognition API:- Immediate feedback during dictation
- Catch errors while recording
- Works offline (browser-based)
- No API costs for real-time preview
src/sections/DictationSOAP.tsx:129-163.
AI Transcription
After recording, audio is transcribed using OpenAI’s Whisper model:Check for browser transcript
If live Speech Recognition captured text, use it directly (no API call needed).
src/sections/DictationSOAP.tsx:244-279 for the complete transcription flow.
File Upload Transcription
The app can extract text from various file formats:| File Type | Extraction Method | Supported Formats |
|---|---|---|
| Audio | Whisper API | MP3, WAV, M4A, WebM |
| OpenAI Vision/Text extraction | PDF documents | |
| Images | OCR via Vision API | JPEG, PNG, GIF |
| Text | Direct read | TXT, plain text |
src/sections/DictationSOAP.tsx:216-242.
SOAP Note Generation
Once transcription is complete, veterinarians can generate structured clinical notes:Template Selection
Choose from built-in or custom templates: Built-in Templates:- Standard SOAP (Subjective, Objective, Assessment, Plan)
- Specialist SOAP (extended sections)
- Dental - Canine
- Dental - Feline
- Radiograph Report
- Surgery Report
- Callback Notes
- Tech Appointment Notes
AI Generation Process
Select patient & template
Choose the patient and appropriate clinical template (e.g., Standard SOAP, Dental).
src/sections/DictationSOAP.tsx:282-329.
SOAP Mapping
The AI response is intelligently mapped to template sections:Clinical Insights
After generating SOAP notes, the system automatically analyzes content for clinical insights:Risk Factors
Potential complications or conditions requiring monitoring
Differential Diagnoses
Possible diagnoses based on symptoms and findings
Treatment Suggestions
Evidence-based treatment recommendations
Insight Generation
src/sections/DictationSOAP.tsx:332-350.
Insight Display
Insights are color-coded by priority:- High Priority: Red border, urgent attention required
- Medium Priority: Amber border, monitor closely
- Low Priority: Green border, informational
Advanced Features
Billing Extraction
Automatically extract billable items from SOAP notes:src/sections/DictationSOAP.tsx:450-479.
Export Options
PDF Export: Generate printable HTML and trigger browser print dialog:Saving Records
Save Workflow
Choose status
Select save status:
- Draft: Work in progress
- Pending Review: Ready for review by senior vet
- Finalized: Complete and locked
src/sections/DictationSOAP.tsx:369-447 for complete save implementation.
Offline Saving
When Supabase is not configured or offline, records save to localStorage:UI Components
Step Indicator
Visual progress through the dictation workflow:Recording UI
Circular recording indicator with pulse animation:Live Transcript Preview
Show real-time transcription while recording:Best Practices
Quiet Environment
Record in low-noise areas for best transcription accuracy.
Clear Speech
Speak clearly and at a moderate pace. Enunciate medical terms.
Review Transcript
Always review AI-generated transcription before generating SOAP notes.
Edit Notes
Treat AI-generated SOAP notes as drafts. Review and edit for accuracy.
Recording Tips
- Use headphones: Reduces echo and improves audio quality
- Hold device 6-12 inches away: Optimal microphone distance
- Pause for complex terms: Spell out drug names or unusual terms
- Use templates: Select appropriate template before dictating
- Review insights: Consider AI suggestions but use clinical judgment
Troubleshooting
Microphone Access Denied
Solution:- Check browser permissions (Settings > Privacy > Microphone)
- Ensure HTTPS connection (required for getUserMedia)
- On iOS: Grant microphone permission in app settings
Poor Transcription Quality
Common Causes:- Background noise
- Low microphone quality
- Fast speech or mumbling
- Medical jargon not in training data
- Use external microphone for better audio
- Speak slowly and clearly
- Manually correct transcription before generating SOAP
- Add custom vocabulary to Speech Recognition
SOAP Generation Errors
Check:- Backend server is running (
npm run dev:server) - OpenAI API key is configured
- Transcription is not empty
- Template is properly selected
Next Steps
iOS App
Learn about iOS-specific features and deployment
Offline Mode
Understand offline dictation and sync strategies
Templates
Create and customize clinical note templates
AI Integration
Configure OpenAI for transcription and SOAP generation