Skip to content

About

EchoScribe: Ambient clinical AI scribe with dual-stream processing, BioNLP entity linking, and real-time SOAP synthesis.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 EchoScribe: Ambient Clinical AI Scribe & Clinician EHR Portal

Next-Generation Ambient Clinical Intelligence: Transforming doctor-patient conversations into structured, audit-ready, FHIR-compliant Electronic Health Record (EHR) documentation in real-time.

Live Demo FastAPI React FHIR R4 License: MIT



🌐 Live Interactive Demo

Test the live clinician portal, ambient dual-stream diarization, live SOAP generation, and FHIR export: πŸ‘‰ https://myecho-scriber.lovable.app

Experience the schedule queue, patient directory, clinical charts, and live ambient documentation directly in your browser without local installation.


πŸ—οΈ System Architecture & Data Flow

EchoScribe uses a dual-stream ambient processing pipeline that ingests unscripted conversational audio, diarizes speakers, extracts standardized clinical entities, and synthesizes structured SOAP notes with provenance citations.

                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚    Ambient Room Audio (Clinician/Patient) β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚    Silero VAD (Voice Activity Detection) β”‚
                   β”‚       Noise Gate & Speech Chunking       β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                                       β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚   OpenAI Whisper v3     β”‚             β”‚     PyAnnote.audio      β”‚
        β”‚   Acoustic Speech-to-   β”‚             β”‚   Speaker Diarization   β”‚
        β”‚   Text Transcription    β”‚             β”‚   (Physician vs Patient)β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚                                       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚  Transcript Aligner & Domain Segmenter   β”‚
                   β”‚   Tags: HPI, OBJ_EXAM, PLAN, CHITCHAT    β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                                       β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  BioNLP Entity Linker   β”‚             β”‚  Synthesis LLM Engine   β”‚
        β”‚  β€’ scispaCy / MedCAT    β”‚             β”‚  β€’ Claude 3.5 Sonnet /  β”‚
        β”‚  β€’ SNOMED-CT (Symptoms) β”‚             β”‚    Llama 3.3 / GPT-4o   β”‚
        β”‚  β€’ RxNorm (Medications) β”‚             β”‚  β€’ Provenance Citation  β”‚
        β”‚  β€’ ICD-10 (Diagnoses)   β”‚             β”‚  β€’ Few-Shot SOAP Struct β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚                                       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                       EchoScribe Clinician Portal                         β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
    β”‚  β”‚ Diarized Live Stream β”‚ Traceable SOAP Draft  β”‚ Real-time Telemetry  β”‚  β”‚
    β”‚  β”‚ β€’ Speaker badges     β”‚ β€’ S: HPI & history    β”‚ β€’ Decibel audio bar  β”‚  β”‚
    β”‚  β”‚ β€’ Domain chips       β”‚ β€’ O: Exam findings    β”‚ β€’ E/M 99214 MDM calc β”‚  β”‚
    β”‚  β”‚ β€’ Utterance citation β”‚ β€’ A: Diagnoses & codesβ”‚ β€’ Voice modifier     β”‚  β”‚
    β”‚  β”‚ β€’ Inline BioNLP tags β”‚ β€’ P: Prescriptions/PT β”‚ β€’ Patient chart link β”‚  β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                          β”‚
                                          β–Ό
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚           EHR Export & Hand-off          β”‚
                   β”‚  β€’ HL7 FHIR R4 Bundle (Composition,      β”‚
                   β”‚    Condition, MedicationRequest)         β”‚
                   β”‚  β€’ EHR REST & Copy-to-Clipboard Flow     β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧠 AI & BioNLP Stack

1. Acoustic & Speech Ingestion

  • Whisper (whisper-large-v3 / OpenAI API): High-accuracy ambient speech-to-text resilient to conversational crosstalk, clinical jargon, and room acoustic noise.
  • PyAnnote Audio (pyannote.audio): Neural speaker diarization classifying audio tracks into distinct speaker embeddings (Physician vs. Patient).
  • Silero VAD (Voice Activity Detection): Real-time silence removal, chunking ambient streams into processed speech bursts.

2. Biomedical NLP & Entity Normalization

  • scispaCy (en_core_sci_md) & MedCAT: Biomedical Named Entity Recognition (NER) isolating clinical findings, body sites, and drug mentions.
  • Ontology Mapping:
    • SNOMED-CT: Symptoms and procedures (e.g., "knee pain" β†’ 30989003).
    • RxNorm: Medication normalization (e.g., "ibuprofen" β†’ Concept 5640).
    • ICD-10-CM: Working diagnoses (e.g., "osteoarthritis, left knee" β†’ M17.12).

3. Clinical Synthesis & Structuring LLM

  • Models: Claude 3.5 Sonnet / Llama-3.3-70B / GPT-4o.
  • Prompt Engineering (prompts/soap_structuring.yaml):
    • Filters non-clinical chitchat.
    • Formats unstructured dialogue into canonical S.O.A.P. sections.
    • Enforces traceable provenance by attaching turn IDs (["T3", "T4"]) to every clinical claim.
  • Voice Modifier Agent: Clinician voice commands ("Echo, change left knee to right") dynamically rewrite claims and refresh mapped coding.

πŸ“ Repository Structure

echoscribe/
β”œβ”€β”€ api/                             # FastAPI Backend & Streaming Engine
β”‚   β”œβ”€β”€ main.py                      # WebSocket stream & REST health endpoints
β”‚   β”œβ”€β”€ schemas.py                   # Pydantic v2 schemas for SOAP, audio & telemetry
β”‚   └── ...
β”œβ”€β”€ prompts/                         # Production Clinical Prompts
β”‚   └── soap_structuring.yaml        # SOAP transformation prompt with few-shot guidance
β”œβ”€β”€ frontend/                        # Enterprise Clinician Portal & Ambient Scribe UI
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/AppHeader.tsx # Enterprise clinical top navigation bar
β”‚   β”‚   β”‚   └── scribe/EchoScribe.tsx# Ambient scribe, waveform, SOAP editor, E/M coding
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ SchedulePage.tsx     # Today's clinic schedule & encounter launcher
β”‚   β”‚   β”‚   β”œβ”€β”€ PatientsPage.tsx     # Searchable patient directory & panel overview
β”‚   β”‚   β”‚   β”œβ”€β”€ PatientChartPage.tsx # Patient chart: vitals, meds, problem list, past visits
β”‚   β”‚   β”‚   └── EncounterPage.tsx    # Live ambient clinical documentation encounter
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”‚   β”œβ”€β”€ encounter.ts         # Transcript script, FHIR R4 generator & voice modifier
β”‚   β”‚   β”‚   └── patients.ts          # Clinical patient records & demographics
β”‚   β”‚   β”œβ”€β”€ App.tsx                  # Client routing (/ , /patients, /encounter)
β”‚   β”‚   └── styles.css               # Clinical slate/navy styling & typography
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   └── Dockerfile
β”œβ”€β”€ docker-compose.yml               # Multi-container orchestration (api + frontend)
β”œβ”€β”€ requirements.txt                 # Backend Python dependencies
└── README.md

πŸ₯ Clinician Portal Features

  1. Today's Schedule (/):

    • Clinic dashboard with real-time appointment queue, visit reasons, and status badges.
    • Quick KPI telemetry: scheduled encounters, completed visits, pending sign-offs, average note generation time.
    • One-click encounter launcher ("Start visit" / "Resume").
  2. Patient Directory (/patients):

    • Searchable directory filtering by patient name and MRN.
    • Direct status view, DOB, payer identification, and highlighted allergy warnings.
  3. Patient Chart (/patients/:patientId):

    • Comprehensive chart layout displaying demographic banner, latest vitals (BP, HR, Temp, SpOβ‚‚, BMI), active medication list, ICD-10 coded problem list, and past visit history with CPT codes.
    • Direct shortcut to initiate an ambient documentation visit for the selected patient.
  4. Ambient Scribe Encounter (/encounter):

    • Pre-recording consent checkpoint requiring clinician and patient verbal verification.
    • Audio telemetry bar with live decibel readout and real-time waveform visualization.
    • Diarized transcript feed with timestamps, speaker labels (Dr. Shah vs Patient), and clinical domain categorization (HPI, EXAM, PLAN, SOCIAL).
    • Bidirectional transcript-to-SOAP claim citations with visual provenance highlight.
    • Real-time E/M 99214 Medical Decision Making complexity estimator.
    • Hands-free voice modifier engine ("Echo, change left knee to right knee...").
    • HL7 FHIR R4 document bundle exporter (Composition, Condition, MedicationRequest, Provenance).

πŸš€ Quickstart Guide

Option 1: Docker Compose (Full Stack)

docker-compose up --build
  • Frontend portal will be available at: http://localhost:3000
  • FastAPI backend documentation: http://localhost:8000/docs

Option 2: Local Development

1. Backend (FastAPI)

python -m venv venv
source venv/bin/activate  # On Windows: venv\ScriptsοΏ½ctivate
pip install -r requirements.txt
uvicorn api.main:app --reload --port 8000

2. Frontend (React + Vite)

cd frontend
npm install
npm run dev

Open http://localhost:3000 to interact with the clinician portal.


πŸ”’ Clinical Ethics & Safety

  • Anti-Hallucination Guardrails: Unverified claims not present in the ambient transcript are strictly excluded from objective documentation.
  • Traceable Provenance: Every generated line of the SOAP note links directly to its source utterance timestamp.
  • Safe Correction Loops: Clinicians retain 100% edit authority via direct manual edit or voice-driven modifiers.
  • Immediate Data Deletion: Dedicated "Stop & delete" option to purge audio transcripts and active session cache upon request.

πŸ“œ License & Compliance

Distributed under the MIT License. Designed strictly adhering to HIPAA privacy controls and HL7 FHIR Interoperability standards.

About

EchoScribe: Ambient clinical AI scribe with dual-stream processing, BioNLP entity linking, and real-time SOAP synthesis.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages