Visit API

Intakes

POST /intakes

Create intake information.

Custom parameters

Apart from the parameters below, any amount of custom JSON field-value pairs may be sent. They will all be saved into the Intake object. Later they may be displayed to the provider (please contact VSee to configure the rendering format).

 

Parameters

Parameter

Type

Description

Parameter

Type

Description

provider_id

Integer

(optional) The ID of the provider who is being visited

reason_for_visit

String

(optional) Reason for visit

type

Integer

(optional) Visit type: 1 - walkin; 2 - schedule

member_id

String

(optional) Patient’s code ID on behalf of whom the intake will be created

room_code

String

Room’s code

attachments

Array

(optional) Multiple formats supported: [{id:"577af3e6-9e48-4a51-9315-2ba8c0a8210a"}, ...] or ["577af3e6-9e48-4a51-9315-2ba8c0a8210a", ...] or 577af3e6-9e48-4a51-9315-2ba8c0a8210a,577af3e6-9e48-4a51-9315-2ba8c0a8210a,...

location

String

(optional) CA/AL/...

phone

String

(optional) 7123465789

Sample Request

curl -k -X POST -d "provider=541&reason_for_visit=Test&reset=true&type=1" https://api.vseepreview.com/vc/next/api_v3/intakes.json { "data": { "id": "56e8c536-566c-44b6-bbca-66f0ac1f0144" } }

Sample Request with Custom Params

curl -k -X POST -d "provider=541&reason_for_visit=Test&reset=true&type=1" https://api.vseepreview.com/vc/next/api_v3/intakes.json { "data": { "id": "56e8c536-566c-44b6-bbca-66f0ac1f0144", "custom_is_allergic": "Yes", "custom_symptoms": "Rash, Red Eyes", "custom_symptoms_duration": "2 weeks" } }

POST /intakes/:id

Update intake information

Parameters

Parameter

Type

Description

Parameter

Type

Description

provider_id

Integer

(optional) The ID of the provider who is being visited

reasonforvisit

String

(optional) Reason for visit

type

Integer

(optional) Visit type: 1 - walkin; 2 - schedule

member_id

String

(optional) Patient’s code ID on behalf of whom the intake will be created

room* room_code

String

Room’s code

attachments

Array

Multiple formats supported: [{id:"577af3e6-9e48-4a51-9315-2ba8c0a8210a"}, ...] or ["577af3e6-9e48-4a51-9315-2ba8c0a8210a", ...] or 577af3e6-9e48-4a51-9315-2ba8c0a8210a,577af3e6-9e48-4a51-9315-2ba8c0a8210a,...

location

String

CA/AL/...

phone

String

7123465789

consultation

Object

(optional) Required for payment related, the consultation objects can be found at GET /rooms/:code API

Response

curl -X POST -H "X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb" -H "X-AccountCode: vclinic" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "location=CA" -F "phone=7123456789" -F "reason_for_visit=Test intake functionalities 2" "https://api.vseepreview.com/vc/next/api_v3/intakes/57a0705e-1c4c-4f24-b51d-3c71ac1f0144" { "data": { "id": "56e8c536-566c-44b6-bbca-66f0ac1f0144" } }

GET /intakes/:id

Get the specific intake

Parameters

None

Response

 

Walkin Visits

POST /visits/add_walkin

Create a walkin visit

Parameters

Parameter

Type

Description

Parameter

Type

Description

provider_id

String

(optional) The ID of the provider who is being visited if patient is starting an appointment. Shouldn’t pass this for walkins.

intake_id

String

The ID of the intake.

visit_data_id

String

The ID of a scheduled appointment. This one is used in the case when the patient visits a scheduled appointment.

visit_id

String

(optional) The ID of a scheduled appointment. This one is used in the case when the patient visits a scheduled appointment.

user_code

String

(optional) Patient’s code ID on behalf of whom the intake will be created

room_code

String

Current room’s code in which the visit will be created

Response

POST /visits/close

Close/Cancel a visit or an appointment

Parameters

Parameter

Type

Description

Parameter

Type

Description

id

String

The ID of the visit/appointment

reason

String

 

  • "patient_end_call" - Patient click End Call button on VSee

  • "patient_exit_room" - Patient click Exit Waiting Room

  • "call_ended" - When call ended not by patient, could be due to network problem or provider ended the call

  • "patient_cancel_appointment" - Patient click cancel appointment button

  • "max_waiting_time_reached" - Patient side max waiting time reached

Response

Asynchronous Visits

POST /visits/add_econsult

Create an asynchronous e-consult visit. The econsult will be created without scheduling, the providers will see it on their dashboards and will need to accept it.

Parameters

Parameter

Type

Description

Parameter

Type

Description

intake_id

String

The ID of the intake

room_code

String

Room code (required)

Response

Appointment API

GET /availability

Get provider's available slots

Parameters

Parameter

Type

Location

Description

Parameter

Type

Location

Description

room_code

String

Query string

(optional) Room code. If not given, will try to fall back to Intake.room

start

Integer

Query string

Search for available slots from this start time

end

Integer

Query string

Search for available slots up to this end time

duration

Integer

Query string

Search for available slots during certain seconds

provider_id

String

Query string

(optional) Pick only this provider’s slots

intake_id

String

Query string

Intake ID. Should be passed when patient is choosing a slot for an appointment. It will use intake’s location, specialty, etc.

consultation_id

String

Query string

Consultation ID. This will help to determine slot duration

X-ApiKey

String

Header

(beta) Header value is required if the application want to retrieve availablity without user token

X-ApiSecret

String

Header

(beta) Header value is required if the application want to retrieve availablity without user token

Notes: If application want to retrieve providers availability slots for a room without user token, the following are required X-ApiKeyX-ApiSecretroom_codestartendconsultation_idlocation will be required if you want to filter by state as well.

Notes: The time range parameters 'start', 'end' and 'duration' obey the following rules:

 

input

 

 

actual

 

 

 

input

 

 

actual

 

 

 

start

end

duration

start

end

duration

1

not set

not set

not set

available

available+4d

4d

2

set

not set

not set

  1. start

  2. If 'nearest' is set, then we search for the nearest slots since the start time

  1. start+4d

  2. nearest+4d

4d

3

set

set

not set

start

end

(ignored)

4

set

not set

set

  1. start

  2. If 'nearest' is set, then we search for the nearest slots since the start time

  1. start+duration

  2. nearest+duration

duration

5

not set

set

not set

end-4d

end

4d

6

not set

set

set

end-duration

end

duration

7

not set

not set

set

available

available+duration

duration

8

set

set

set

start

end

(ignored)

(available: The start time of the 1st available slot)

Sample minimal request

Other sample requests

The above data response format will change soon to

 

POST /visits

Create an appointment

Parameters

Parameter

Type

Description

Parameter

Type

Description

member_id

String

The ID of the visiting patient (optional - only use in paramedic workflow)

slot_start

Integer

The timestamp of the beginning of the appointment (in UNIX timestamp format)

slot_end

Integer

The timestamp of the ending of the appointment (in UNIX timestamp format)

room_code

String

Room code (required)

type

Integer

2 - scheduling

intake_id

String

The ID of the intake

provider_id

String

(optional) The ID of the provider who is being visited

Response

GET /visits

Get the visits list of the patient. The frontend can check the data["start"] field. If the start field is greater than the current timestamp then the visit is a upcoming appointment, otherwise it’s a past session. Group appointments and one-to-one appointments are now differentiated by the field visit_group_id which only exists in group appointments data.

For one-to-one appointments, consultation information can be retrieved from intake.consultation; for group appointments, consultation information has to be got from visit_group.consultation.

The following sample response offers 2 example for one-to-one appointment and one for group appointment.

Fields that can be returned for fields with format: "html"<u>, <b>, <i>, <strong>, <ul>, <ol>, <li>, <p>, <br>

Parameters

Response

GET /visits/:id and Sample Visit Object

Get detailed information for a certain appointment.

Group appointments and one-to-one appointments are now differentiated by the field "visitgroupid" which only exists in group appointments data.

For one-to-one appointments, consultation information can be retrieved from intake.consultation; for group appointments, consultation information has to be got from visit_group.consultation.

Parameters

None

Response

POST /visits/:id?version=2

Update an appointment

Parameters

Parameter

Type

Description

Parameter

Type

Description

slot_start

Integer

(optional) The timestamp of the beginning of the appointment (in UNIX timestamp format)

slot_end

Integer

(optional) The timestamp of the ending of the appointment (in UNIX timestamp format)

provider_id

String

(optional) The ID of the provider who is being visited

Add provider into a TDB visit

Please supply new provider_id

Response

Remove provider from an appointment

Do the same as above but this time set provider_id to 0

GET /visits/current

Get current visit in progress

Parameters

None

Response

 

Understanding Visit object ID

There is a unique Visit.id field for every Visit object.

However some visits may be related to each other, following these rules:

Field

Sample

Meaning

Field

Sample

Meaning

id

"id": "1504"

Unique visit ID

related_appointment_id

"related_appointment_id": "2504"

When an appointment is started, a new visit object of type walkin is created. The relation to the original appointment ID is stored in this field.

related_walkin_id

"related_walkin_id": "1504"

When an appointment is started, a new visit object of type walkin is created. It’s ID is appended to the original appointment’s Visit object.

adhoc_visit_id

"adhoc_visit_id": "3504"

 

invite_id

"invite_id": "4504"

When a user is invited into an appointment call, the inviting appointment ID is stored here.

root_visit

"root_visit": {

"id": "18407167",

group_chat_id": null,

participants": null

}