Search…
Televisit
Televisits enable providers to initiate video calls with patients. They can be created using a script. For a more detailed explanation, please see Object Room.

Overview

Create televisit
1
return org.objects.objects
2
.insertOne({
3
name: 'room',
4
label: 'My Televisit Room',
5
6
// apply access control lists (optional)
7
acl: [
8
'account.public.read',
9
'account.anonymous.read',
10
'role.developer.read',
11
'account.[ACL ID].read'
12
],
13
14
// apply custom properties (optional)
15
properties: [{
16
name: 'c_number',
17
label: 'Room Number',
18
type: 'Number',
19
indexed: true
20
}]
21
})
22
.execute()
Copied!
Use the following to update the televisit ACL.
1
const _id = '[Room ID]'
2
const _acl_id = '[ACL ID]'
3
return org.objects.rooms
4
.updateOne({ _id }, {
5
6
// Adds an additional account to the ACL
7
$push: {
8
acl: [
9
`account.${ _acl_id }.read`
10
]
11
}
12
})
13
.execute()
Copied!
The potential televisit states are new, open, or closed. Immediately following the command to create a televisit, its state is new. Once the televisit has completed setup, it's state is set to open. A televisit is considered concluded when its state is set to closed. Once closed, a televisit cannot be reopend. If no one joins the televisit for 5 minutes after being open, its state is automatically set to closed.
To view the state of a televisit, please run the following.
1
const _id = '[Room ID]'
2
return org.objects.room.find({ _id }).next().state
Copied!
To end a televisit, set its state to closed.
1
const _id = '[Room ID]'
2
return org.objects.room
3
.updateOne({ _id }, {
4
$set: {
5
state: 'closed'
6
}
7
})
8
.execute()
Copied!
Last modified 1mo ago
Copy link
Contents
Overview