Back to Flows

Book a Video Consultation

Sequence diagram

Patient journey from browsing doctors to joining a video call

Diagram Source
sequenceDiagram
    actor P as Patient
    participant App as MediConnect App
    participant API as API Server
    participant DB as Database
    participant Zoom as Zoom SDK
    participant Email as Email (Resend)

    P->>App: Browses available doctors by specialty
    App->>API: GET /doctors?specialty=cardiology
    API-->>App: Return doctor list with availability
    P->>App: Selects doctor + time slot
    App->>API: POST /appointments
    API->>DB: Reserve time slot
    API->>Zoom: Create meeting (doctor + patient)
    Zoom-->>API: Return meeting URL + join tokens
    API->>DB: Store appointment + Zoom details
    API->>Email: Send confirmation to patient
    API->>Email: Send notification to doctor
    API-->>App: Appointment confirmed
    App-->>P: Show confirmation + calendar link
    Note over P,App: 1 hour before appointment
    API->>Email: Send reminder with join link
    P->>App: Clicks "Join Consultation"
    App->>Zoom: Launch video call with patient token
    Zoom-->>P: Video call starts