Skip to content

koushikvasa/sonus

Repository files navigation

Sonus

AI-powered clinical voice intake for hospitals. Sonus conducts a structured pre-consultation interview with a patient before their doctor arrives — capturing symptoms, emotional state, and clinical context — then generates a formatted SOAP note ready for the physician.


Live link:

https://sonus-li94.vercel.app/

What it does

  1. Admission — Select a simulated patient case or paste/upload custom clinical notes
  2. Interview — Sonus speaks with the patient via voice, asking targeted questions based on their admission context
  3. Processing — Transcript is analyzed; Tavily pulls relevant clinical reference data in parallel
  4. Confirm — Summary is reviewed before note generation
  5. SOAP Note — A structured clinical note (Subjective, Objective, Assessment, Plan) is generated and typed out
  6. Complete — Note is sent to the care team

Tech stack

Layer Technology
Framework Next.js 16.2.1 (App Router)
Language TypeScript
Styling Tailwind CSS v4
Animation Framer Motion v12
Voice Vapi (@vapi-ai/web)
LLM Concentrate AI (Claude Sonnet)
Clinical search Tavily API

Layout

Command Center design — built for laptop screens, responsive on mobile.

┌────────────────────────────────────────────────┐
│  Topbar — Sonus logo · step pill               │
├──────┬─────────────────────────┬───────────────┤
│      │                         │               │
│ Left │   Main content area     │ Session panel │
│ rail │   (all 6 screens)       │ Patient info  │
│ w-16 │                         │ w-72          │
│      │                         │               │
└──────┴─────────────────────────┴───────────────┘
  • Left rail — narrow teal strip with Sonus logo, patient avatar, step progress dots, service status indicators
  • Main — white content area where all screens render
  • Session panel — patient details, session timeline, live symptoms, collapsible medications

Patient cases

Six simulated hospitalized patients are included as demo cases:

Patient Condition Urgency
Marcus Reid, 58M Post-CABG surgery Day 2 Critical
Dorothy Osei, 72F ESRD — dialysis + fluid overload Urgent
Priya Nair, 29F Status migrainosus Urgent
James Whitfield, 67M COPD exacerbation + pneumonia Urgent
Sofia Delgado, 34F Post-appendectomy Day 1 Urgent
Elijah Brooks, 45M Diabetic ketoacidosis (DKA) Critical

Each case includes home medications, current hospital/IV medications, allergies, and a chief complaint. This context is injected into Vapi so the AI asks personalized, clinically relevant questions.

Custom context is also supported — paste a referral letter, discharge summary, or any clinical notes directly, or upload a .txt file.


Getting started

1. Clone and install

git clone https://github.com/your-username/sonus.git
cd sonus
npm install

2. Environment variables

Create a .env.local file:

# Vapi
NEXT_PUBLIC_VAPI_KEY=your_vapi_public_key
NEXT_PUBLIC_VAPI_ASSISTANT_ID=your_vapi_assistant_id

# Concentrate AI (Claude)
CONCENTRATE_BASE_URL=https://your-concentrate-endpoint.com
CONCENTRATE_API_KEY=your_concentrate_api_key
CONCENTRATE_MODEL=claude-sonnet-4-6

# Tavily
TAVILY_API_KEY=your_tavily_api_key

3. Run

npm run dev

Open http://localhost:3000.


Vapi setup

In your Vapi dashboard, set your assistant's system prompt to:

You are Sonus, an AI clinical intake assistant at a hospital. Your job is to take a brief voice history from the patient before their doctor arrives.

{{patientContext}}

This is a conversation, not a checklist. Listen to what the patient says and follow the thread of their experience. Every question should feel like a natural response to what they just told you.

Start by greeting the patient by first name and asking: "How have you been feeling since you came in?"

Cover naturally within the conversation:
- What is bothering them most right now
- How symptoms have changed since admission
- Severity and character of any pain or discomfort
- Any new symptoms not yet told to a doctor
- How they are feeling emotionally

You already have their medications, allergies, and history — do not ask about these.
Ask one question at a time. Keep the total conversation under 3 minutes.

When you have a clear picture, close with: "Thank you — I have everything I need. You'll be seen shortly."

Rules: Never diagnose. Never alarm the patient. Speak plain English. The closing phrase must be exact — it triggers handoff.

Set the first message to:

Hi {{patientFirstName}}, I'm Sonus. How are you feeling today?

Project structure

sonus/
├── app/
│   ├── api/
│   │   ├── soap/route.ts         # SOAP note generation (Concentrate AI)
│   │   └── search/route.ts       # Clinical reference search (Tavily)
│   ├── globals.css               # Tailwind theme + custom classes
│   ├── layout.tsx
│   └── page.tsx                  # Root — layout + screen routing
├── components/
│   ├── screens/
│   │   ├── WelcomeScreen.tsx     # Case selector + custom context
│   │   ├── InterviewScreen.tsx   # Live voice transcript
│   │   ├── ProcessingScreen.tsx
│   │   ├── ConfirmScreen.tsx
│   │   ├── SOAPScreen.tsx        # Typewriter SOAP note reveal
│   │   └── DoneScreen.tsx
│   ├── LeftRail.tsx              # Narrow teal nav strip
│   ├── SessionPanel.tsx          # Right patient info panel
│   ├── Topbar.tsx
│   ├── SOAPCard.tsx
│   └── ...
├── constants/
│   ├── cases.ts                  # 6 patient case definitions
│   └── states.ts                 # App state types
├── hooks/
│   ├── useScribe.ts              # Central app state
│   └── useVapi.ts                # Vapi voice integration
└── services/
    ├── symptomExtractor.ts
    ├── emotionExtractor.ts
    └── summaryBuilder.ts

License

MIT

About

The patient's voice becomes the doctor's intelligence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors