
An AI-Powered Medical Scribe for Clinicians
MyScribe is a clinician-focused AI assistant that automatically transcribes and summarizes patient interactions into SOAP-format clinical notes. The platform reduces documentation time by approximately 70%, enabling healthcare providers to focus on patient care rather than paperwork.
Clinicians spend 30-50% of their work hours on documentation - a leading contributor to burnout. MyScribe listens to patient-clinician conversations in real-time, generates structured clinical notes using AI, and integrates into existing healthcare workflows without requiring changes to the clinician's routine.
The platform serves individual practitioners, small clinics, and telehealth providers across the United States. It was built with HIPAA compliance as a foundational requirement, ensuring patient data security throughout the transcription, processing, and storage pipeline.
Clinical documentation is one of the biggest contributors to physician burnout. Studies consistently show that for every hour spent with patients, clinicians spend two hours on documentation. This documentation burden reduces patient face-time, contributes to mental exhaustion, and ultimately affects the quality of care.
Existing solutions fell into two inadequate categories: manual transcription services that are expensive ($1,000+/month) and lag behind by 24-48 hours, or speech-to-text tools that produce unstructured text requiring the clinician to still manually organize into clinical notes.
Small clinics and solo practitioners are disproportionately affected - they cannot afford dedicated medical scribes ($30,000-50,000/year per scribe) or expensive enterprise EHR systems with built-in AI. They needed a solution that was affordable, accurate, and integrated seamlessly into their existing workflow without requiring them to change how they interact with patients.
The key constraint was accuracy: medical terminology is specialized, accents vary widely, and a transcription error could have clinical consequences. The solution needed to achieve >95% accuracy on medical conversations to be clinically useful.
Business Goals
- Provide an affordable alternative to human medical scribes at a fraction of the cost ($200-500/month vs. $2,500-4,000/month)
- Achieve a net promoter score above 50 by delivering meaningful time savings to clinicians
- Ensure HIPAA compliance as a competitive differentiator from general-purpose AI transcription tools
Technical Goals
- Achieve real-time transcription latency under 3 seconds for conversational speech
- Generate SOAP-format clinical notes with >90% clinical accuracy as validated by healthcare professionals
- Process audio data with end-to-end encryption throughout the pipeline
- Support concurrent usage from 100+ clinicians without degradation
User Goals
- Clinicians should be able to start a transcription session with a single click and receive completed notes immediately after the patient visit
- Notes should be editable before saving to the patient record
- The system must work with existing EHR systems through copy-paste or API integration
Functional
Non‑Functional
Performance
- • Transcription latency under 3 seconds for conversational speech
- • AI note generation completes in under 10 seconds post-conversation
- • Patient record retrieval under 1 second
- • System handles burst usage during clinic peak hours (8 AM - 11 AM, 1 PM - 4 PM)
Security
- • HIPAA-compliant data handling with BAA from infrastructure providers
- • End-to-end encryption of audio data from capture to storage
- • Automatic session timeout after 15 minutes of inactivity
- • Audit logging of all access to patient records
- • Data deletion workflows for patient record requests
Scalability
- • Support for 100+ concurrent transcription sessions
- • Auto-scaling of AI processing infrastructure based on demand
- • Database sharding strategy for patient records across healthcare organizations
Maintainability
- • Modular AI pipeline allowing model swapping without application changes
- • Comprehensive monitoring and alerting for transcription quality metrics
- • A/B testing framework for AI model evaluation
System Flow
- 1The clinician starts a new session from the Vue.js frontend. The browser captures audio from the microphone using the MediaStream Recording API and streams it to the Laravel backend via WebSocket.
- 2The Laravel backend forwards the audio stream to the Python transcription service, which uses a fine-tuned medical speech-to-text model to produce real-time transcription.
- 3The transcription is streamed back to the frontend and displayed as it is generated, allowing the clinician to see the conversation being transcribed in real-time.
- 4When the clinician ends the session, the complete conversation transcript is sent to the clinical note generation service. This Python service uses a large language model fine-tuned on medical note data to generate a SOAP-format note.
- 5The generated note is returned to the frontend, where the clinician can review, edit, and save it to the patient record. The note and audio recording are encrypted and stored in HIPAA-compliant cloud storage.
Database Design
- The MySQL database stores user accounts, patient records, clinical notes, and session metadata. Patient records are linked to clinicians through a clinic context, ensuring data isolation between healthcare organizations.
- The `clinical_notes` table stores the structured SOAP note content in a JSON column, allowing flexible querying of individual sections (subjective, objective, assessment, plan) without schema changes for new note formats.
- The `transcription_sessions` table tracks each encounter, linking the clinician, patient, audio recording reference, transcription output, and generated note. This provides a complete audit trail for each patient interaction.
- Audio files are stored in encrypted S3-compatible storage with server-side encryption. The database stores only the encrypted file reference and checksum.
- Indexes on `(clinician_id, created_at)` and `(patient_id, created_at)` accelerate the most common query patterns: fetching a clinician's recent notes and viewing a patient's visit history.
Request Flow
- 1A clinician logs into the Laravel backend. The system authenticates the user and retrieves their patient list from the MySQL database. The Vue.js frontend renders the dashboard with today's schedule.
- 2The clinician selects a patient and clicks Start Session. The frontend requests a secure WebSocket connection to the Laravel server, which validates the session and initiates an encrypted audio stream.
- 3Audio chunks are streamed from the browser to Laravel, which forwards chunks to the Python transcription service. The Python service processes audio through a fine-tuned Whisper model and returns text segments.
- 4Text segments are streamed back through the WebSocket to the frontend, which appends them to the real-time transcript display. The clinician sees the conversation being transcribed as it happens.
- 5When the session ends, Laravel sends the complete transcript to the Python note generation service. The LLM processes the transcript and returns a structured SOAP note. Laravel creates a new `clinical_notes` entry and returns the note to the frontend.
Deployment Flow
- 1The Vue.js + Laravel application is deployed as a containerized application on AWS ECS. The Python AI services run on separate GPU-backed EC2 instances with auto-scaling based on queue depth.
- 2Traffic is routed through an Application Load Balancer with SSL termination. WebSocket connections use the ALB's WebSocket support for sticky sessions.
- 3The MySQL database runs on Amazon RDS with Multi-AZ deployment for high availability. Automated backups are configured with a 30-day retention period.
- 4Audio and data encryption keys are managed through AWS KMS. Each healthcare organization gets a separate encryption key for their data.
- 5Deployment follows a blue/green strategy: a new task set is created alongside the existing one, and traffic is gradually shifted after health checks pass.
Architectural Decisions
Vue.js vs. React for the frontend
Vue.js was chosen over React because of its gentler learning curve for the team and its built-in transition system for the real-time transcription display. Vue's reactive system naturally handles the streaming data updates without external state management libraries. React would have required additional dependencies (Redux or Zustand) for the same behavior.
Real-time streaming via WebSocket vs. periodic polling
WebSockets were chosen for real-time transcription display because the latency requirements (under 3 seconds) cannot be met with polling. WebSockets maintain a persistent connection for bidirectional streaming, which is essential for sending audio chunks from the browser and receiving transcript segments simultaneously.
Laravel vs. Node.js for the backend
Laravel was chosen for its built-in authentication, ORM, queue system, and ecosystem of packages relevant to healthcare applications. Its queue system (Laravel Horizon) was directly used for orchestrating AI processing jobs. Node.js would have required more manual setup for these features but would have simplified the WebSocket implementation.
Fine-tuned Whisper vs. cloud STT API
We chose a fine-tuned OpenAI Whisper model over cloud STT APIs (like AWS Transcribe or Google STT) for two reasons: accuracy on medical terminology (general models are 10-15% less accurate on medical speech) and data sovereignty (audio never leaves our infrastructure). The trade-off is significant infrastructure cost for GPU hosting versus pay-per-use API pricing.
Vue.js was chosen for its reactive data binding that simplifies real-time UI updates. The transcription display needs to update character-by-character as segments arrive from the server, and Vue's reactivity handles this without manual DOM manipulation. Vue's component system maps naturally to the clinic workflow: a Session component contains a TranscriptPanel and a NoteEditor.
Trade-off
Laravel provides a complete backend framework with authentication, database migrations, queue management (Horizon), and WebSocket support (Laravel Echo). Its Eloquent ORM integrates cleanly with MySQL. The ecosystem includes Spatie packages for permission management and audit logging, both critical for HIPAA compliance.
Trade-off
Python was the only viable choice for the AI pipeline due to its dominance in the ML ecosystem: Whisper for STT, HuggingFace Transformers for LLM inference, and PyTorch for model fine-tuning. The Python ecosystem for audio processing (librosa, torchaudio) provides the tooling needed for real-time audio preprocessing.
Trade-off
Bootstrap was chosen for rapid UI development with accessible components. The medical professional user base includes clinicians who may have visual impairments or use assistive technologies, and Bootstrap's accessibility features (ARIA labels, keyboard navigation, focus management) provide a solid foundation. Bootstrap's responsive grid ensures the application works on clinic desktops, tablets (used during rounds), and mobile devices (used for telehealth).
Trade-off
Real-Time Transcription with Medical Vocabulary
Problem
General-purpose speech-to-text models fail on medical terminology. Words like 'hypertension', 'myocardial infarction', and medication names are frequently misrecognized, sometimes with clinically significant errors. Clinicians cannot trust real-time transcription if it contains errors.
Solution
We fine-tuned OpenAI's Whisper model on a curated dataset of 5,000 hours of medical conversations covering primary care, cardiology, endocrinology, and pediatrics. The fine-tuned model achieves 94% word accuracy on medical conversations compared to 82% for the base model. We also maintain a custom medical vocabulary dictionary that overrides specific term transcriptions.
Engineering Challenges
Building the fine-tuning dataset was the hardest part - medical conversation data is protected health information and cannot be sourced publicly. We partnered with three clinics to record anonymized conversations with explicit patient consent, then had medical transcriptionists manually transcribe them for ground truth. The legal and ethical review process added 3 months to the timeline.
AI-Powered SOAP Note Generation
Problem
Raw transcription of a patient conversation is just text - it is not a clinical note. Clinicians would still need to manually extract the subjective complaints, objective findings, assessment, and plan from the transcript. The value is in the structured note, not the raw transcript.
Solution
We fine-tuned a large language model (Llama 2 13B) on a dataset of 100,000 clinical notes to generate SOAP-format notes from conversation transcripts. The model identifies the four SOAP sections from the conversation flow and populates each section with clinically relevant content. The generated note includes ICD-10 code suggestions based on the assessment.
Engineering Challenges
LLM-generated clinical notes can hallucinate - inventing symptoms or findings that were not mentioned in the conversation. We implemented a factuality verification step that cross-references the generated note against the transcript and flags any content that cannot be directly attributed to the conversation. Flagged content is highlighted in the UI for clinician review.
Real-time audio streaming reliability in browser environments
Browser audio capture is surprisingly unreliable. Microphone permissions, network interruptions, and browser tab throttling all cause audio stream disruptions. We implemented a multi-layer resilience strategy: audio is buffered locally in 5-second chunks and sent with sequence numbers. If the WebSocket connection drops, the frontend buffers audio locally and replays missed chunks when the connection restores. The backend reassembles chunks by sequence number, handling out-of-order delivery and duplicates.
Trade-off
HIPAA compliance for AI processing
Running AI models on patient data in the cloud requires HIPAA compliance across the entire pipeline. We configured our AWS infrastructure with HIPAA-eligible services: encrypted EBS volumes, VPC with no public subnets for processing instances, CloudTrail for API auditing, and a Business Associate Agreement (BAA) with AWS. The LLM inference runs on dedicated instances within the VPC that have no outbound internet access - model weights are pre-loaded, and data never leaves the secure environment.
Trade-off
Latency of LLM-based note generation
Initial note generation using Llama 2 13B took 45-60 seconds on a single A10G GPU - too slow for a clinician waiting between patients. We optimized by: (1) using 4-bit quantization to reduce model size (26GB → 7GB) and increase inference speed, (2) implementing a streaming generation approach where the clinician sees the note being written section by section, and (3) caching processed transcripts for repeat visits.
Trade-off
- ▸Whisper fine-tuning improved medical speech accuracy from 82% to 94%, reducing clinician correction time.
- ▸4-bit quantization of the LLM reduced note generation latency from 55 seconds to 12 seconds on an A10G GPU.
- ▸Real-time transcription uses WebSocket streaming with 2-second chunks, providing near-instant display of spoken content.
- ▸Audio compression to Opus format at 16 kbps reduced storage costs by 90% compared to WAV format.
- ▸Redis caching of patient records and frequently accessed clinical data reduced database load by 40%.
- ▸The Laravel backend uses database query optimization (eager loading, select subsets, pagination) to keep API response times under 200ms for 95% of requests.
- ▸All audio data is encrypted in transit using TLS 1.3 and at rest using AES-256 encryption. Audio files are stored in HIPAA-compliant S3 storage with server-side encryption.
- ▸Authentication uses Laravel's built-in session-based auth with 2FA support. Session timeouts are set to 15 minutes for HIPAA compliance.
- ▸Role-based access control distinguishes between clinicians, clinic administrators, and system administrators. Each role has specific data access boundaries enforced at the application and database level.
- ▸All access to patient records is logged with timestamp, user ID, and action type. An audit dashboard allows clinic administrators to review access patterns.
- ▸The AI processing pipeline operates within a VPC with no outbound internet access. Model inference happens on isolated instances that cannot transmit data externally.
- ▸Patient data deletion workflows handle right-to-deletion requests. When a patient requests data deletion, the system identifies all associated records, verifies no legal hold exists, and permanently deletes data within 30 days.
- 1Medical AI products face a dual challenge: technical accuracy and clinical trust. Even with 94% transcription accuracy, clinicians distrust AI-generated notes. Building trust required months of iterative improvements, transparent error reporting, and letting clinicians customize note formats.
- 2Real-time audio in the browser is harder than it looks. The MediaStream Recording API has inconsistent behavior across browsers, and mobile browsers (Safari, Chrome Android) have additional restrictions on background audio capture. Native recording would have been more reliable but requires app installation, which reduces adoption.
- 3HIPAA compliance is not just a technical challenge - it is a business and legal process. The BAA negotiation with AWS took 6 weeks. The legal review of patient consent forms for the fine-tuning dataset took another 8 weeks. These timelines should have been built into the project plan from the start.
- 4Fine-tuning medical AI models requires medical data, which requires medical partnerships, which requires a compelling product. This chicken-and-egg problem meant we had to start with generic models and improve iteratively as we gathered real usage data under proper consent.
- 5The pricing model for AI-powered products is tricky. Clinicians are used to paying $200-500/month for transcription services. AI processing costs scale with usage, making flat-rate pricing risky. We settled on a tiered model with usage caps, which required building a metering system from the start.
Roadmap
- 1Integrate with EHR systems via HL7 FHIR API for seamless note transfer. Currently, clinicians copy-paste notes into their EHR, which is a friction point in the workflow.
- 2Add multi-language support for Spanish and Arabic, which are commonly spoken in US healthcare settings alongside English. The Whisper model supports these languages natively but the medical fine-tuning was English-only.
- 3Implement a mobile companion app for iOS and Android that captures audio from the clinician's phone placed on the desk during consultations.
- 4Add voice commands for hands-free note navigation: clinicians can say 'go to assessment' or 'add medication' during note review, keeping their hands free for examining patients.
- 5Develop a clinical decision support layer that analyzes the generated note for drug interactions, guideline adherence, and missing screening recommendations.
- 6Build a clinician feedback loop where corrections to AI-generated notes are used to further fine-tune the models, creating a compound accuracy improvement over time.
Want to discuss this project?
I am always happy to talk about engineering decisions, architecture, or how I can help with your next project.

