Skip to content

Video Session Service

Overview

The Video Session Service manages virtual consultation sessions within the VitalBridge platform.

The service acts as the bridge between appointment workflows and the video conferencing provider.

The current implementation integrates with Jitsi.


Responsibilities

The Video Session Service is responsible for:

  • Video session creation
  • Meeting access validation
  • Join token generation
  • Consultation session lifecycle
  • Video provider integration

The service does not manage:

  • Appointment booking
  • Provider schedules
  • Patient profiles

Service Architecture

flowchart TB

    APPT["Appointment Service"]

    VIDEO["Video Session Service"]

    JITSI["Jitsi"]

    DB[("Video Session DB")]

    APPT --> VIDEO

    VIDEO --> DB

    VIDEO --> JITSI
Hold "Alt" / "Option" to enable pan & zoom

Video Session Aggregate

flowchart TB

    SESSION["Video Session"]

    APPOINTMENT["Appointment Reference"]

    PROVIDER["Provider"]

    PATIENT["Patient"]

    MEETING["Meeting Room"]

    SESSION --> APPOINTMENT

    SESSION --> PROVIDER

    SESSION --> PATIENT

    SESSION --> MEETING
Hold "Alt" / "Option" to enable pan & zoom

Session Creation Flow

sequenceDiagram

    participant AppointmentService

    participant VideoSessionService

    participant Jitsi

    AppointmentService->>VideoSessionService: Create Session

    VideoSessionService->>Jitsi: Create Meeting

    Jitsi-->>VideoSessionService: Meeting Details

    VideoSessionService-->>AppointmentService: Session Created
Hold "Alt" / "Option" to enable pan & zoom

Consultation Flow

sequenceDiagram

    participant Patient

    participant Provider

    participant VideoService

    participant Jitsi

    Patient->>VideoService: Join Session

    Provider->>VideoService: Join Session

    VideoService->>Jitsi: Validate Access

    Jitsi-->>Patient: Join Meeting

    Jitsi-->>Provider: Join Meeting
Hold "Alt" / "Option" to enable pan & zoom

Session Lifecycle

stateDiagram-v2

    [*] --> Created

    Created --> Ready

    Ready --> Active

    Active --> Completed

    Active --> Cancelled
Hold "Alt" / "Option" to enable pan & zoom

Events

Published Events:

  • video.session.created
  • video.session.started
  • video.session.completed

Consumed Events:

  • appointment.confirmed
  • appointment.cancelled