Developer documentation v1.x

Documentation

WhatsApp Bot - Doctor Consultation Flow

User selects "Talk to a doctor" from the main menu.

Flow Diagram

flowchart TD
    START([User selects 'Talk to Doctor']) --> SPECIALTY_PROMPT[/"Popular specialties:
    1. General Practitioner
    2. Gynecologist
    3. Pediatrician
    4. Dermatologist
    5. Cardiologist
    
    Type 'more' for all specialties
    Or type specialty name"/]
    
    SPECIALTY_PROMPT --> USER_INPUT{User Input}
    
    USER_INPUT -->|"1-5"| POPULAR_SELECT[Select Popular Specialty]
    USER_INPUT -->|"more/plus"| SHOW_ALL[/"Show all specialties:
    1. Specialty A
    2. Specialty B
    3. Specialty C
    ..."/]
    USER_INPUT -->|"keyword/name"| FUZZY_MATCH{Fuzzy Match}
    USER_INPUT -->|"0"| MAIN_MENU[Return to Main Menu]
    
    SHOW_ALL --> SELECT_FROM_LIST[User selects number]
    SELECT_FROM_LIST --> FIND_DOCTOR
    
    FUZZY_MATCH -->|"100% match, unique"| FIND_DOCTOR
    FUZZY_MATCH -->|"Multiple matches"| SUGGESTIONS[/"Did you mean:
    1. Cardiology
    2. Cardiac Surgery
    3. Cardiovascular"/]
    FUZZY_MATCH -->|"Low confidence"| NOT_RECOGNIZED[/"Specialty not recognized.
    Try: 1-5, 'more', or type name"/]
    
    SUGGESTIONS --> USER_SELECT[User selects number]
    USER_SELECT --> FIND_DOCTOR
    
    NOT_RECOGNIZED --> SPECIALTY_PROMPT
    
    POPULAR_SELECT --> FIND_DOCTOR{Find Available Doctor}
    
    FIND_DOCTOR -->|Doctor Found| DOCTOR_PROFILE[/"✅ Doctor found!
    Dr. [Name]
    [Specialty]
    
    🔗 View Profile & Book"/]
    
    FIND_DOCTOR -->|No Doctor| NO_DOCTOR[/"❌ No doctor available
    for this specialty.
    Our team is working on it."/]
    
    DOCTOR_PROFILE --> COMPLETED([Conversation Completed])
    NO_DOCTOR --> COMPLETED