KatInterview

Design a Secure Medical Voice Recording & Transcription Pipeline

System DesignModel answer
MediumModel answerSystem Designsystem-designsecurityasynchronous-processing

Last updated

Design a scalable, HIPAA-compliant system for uploading, transcribing, and retaining audio consults using asynchronous workflows and strict security controls.

Problem Context

You are designing the architecture for a clinical note-taking application used by healthcare providers. Doctors record audio during patient encounters using a mobile device. The application must upload these recordings, convert them into text transcripts via an external Speech-to-Text (STT) provider, and display the final transcripts to authorized clinical staff for review and documentation.

Requirements

  1. Security & Compliance: Must comply with HIPAA and privacy standards. All data (audio and text) must be encrypted both in transit and at rest. Strict access control, PHI segregation, and comprehensive audit trails are mandatory.
  2. Scalability: Support a peak load of 5,000 active concurrent audio uploads without system degradation or dropped connections.
  3. Resilience & Asynchrony: Audio files must be processed asynchronously. Failures or rate limits from external transcription services must be handled cleanly via automated retries, without losing audio files or creating duplicate transcripts.
  4. Data Retention & Lifecycle: Raw audio must be deleted after a configurable retention window (e.g., 30 days), while final clinical transcripts must be preserved indefinitely (unless explicit legal hold or deletion policies state otherwise).

Your Task

Provide a high-level architectural design addressing the following key operational components:

  • Capacity Estimation & Bottlenecks: Estimate network and storage throughput, identifying critical constraints.
  • Data Flow & Storage: Trace an audio recording from mobile capture through object storage, queue processing, vendor STT integration, and final database persistence.
  • Security & Authorization: Detail encryption strategies, IAM access rules, zero-PHI logging practices, and audit event tracking.
  • Resilience Strategy: Explain your queue design, worker state management, idempotency mechanisms, and handling of external service outages.
  • API Interface: Define the main REST endpoints for client upload initialization, upload confirmation, processing status checks, and transcript retrieval.

Hints

Hint 1

Avoid proxying large file bytes through application servers; leverage direct-to-object-storage uploads with short-lived pre-signed URLs.

Hint 2

Consider how network instability on mobile devices affects file transfers—chunked or multipart uploads allow resuming interrupted transfers.

Hint 3

Ensure audit logging is decoupled from core database operations using WORM (Write Once, Read Many) storage to maintain regulatory compliance.