# eConsult (Async Visit) URL: https://developers.vsee.io/use-cases/econsult Log patient in using SSO, create an intake, then create an asynchronous e-consult. Providers assigned to the room will see it and can accept it. ## Step 1: Obtain patient access token POST /users/sso (auth: API Key + Secret) Call SSO with patient details (type=200). Use ?fields=vsee to include VSee ID and token in the response. headers: - X-ApiKey (required) — API Key - X-ApiSecret (required) — API Secret - X-AccountCode (required) — Account code queryParams: - fields — Set to 'vsee' to include VSee ID and token bodyFields: - first_name (required) — Patient's first name - last_name (required) — Patient's last name - type (required) — User type: 200 = Patient - email — Patient email address - code (required) — Unique patient identifier on your end (max 128 chars) ## Step 2: Create intake object POST /intakes (auth: User Token) Create an intake data object to capture the reason for visit. Uses the patient's access token from Step 1. headers: - X-ApiToken (required) — User access token from SSO response - X-AccountCode (required) — Account code bodyFields: - type (required) — Intake type (1 = standard) - room_code (required) — Room code for the waiting room - reason_for_visit — Reason for visit / chief complaint ## Step 3: Create an e-consult POST /visits/add_econsult (auth: User Token) Create an asynchronous e-consult. Only intake_id and room_code are needed. headers: - X-ApiToken (required) — User access token from SSO response - X-AccountCode (required) — Account code bodyFields: - intake_id (required) — Intake ID from Step 2 - room_code (required) — Room code — all providers in this room will see the e-consult ## Step 4: View via Patient Dashboard The e-consult can be viewed by the patient through the Patient Dashboard. Follow the "Patient Dashboard" use case to redirect the patient to their dashboard where they can track the e-consult status.