Contextualized Discussion
What is a Contextualized Discussion
A contextualized discussion is a discussion created around a specific context which can be etheir an act (a teleexpertise for instance), a patient stay (a surgery for instance) or a journey (which can be some stays).
Technically speaking, this context will be represented by a unique ID at the client web app level. This ID will be passed to Sana during the Contextualized Discussion creation and will be used by the client web app to recall the right Contextualized Discussion when needed.
Instantiating a new Contextualized Discussion
// select the sanaWidget component
const sanaWidget = document.getElementsByTagName('sana-widget')[0];
// create the room with the room creation api, tied to an act
sanaWidget.createRoom({
roomName: 'some act',
membersToInvite: ['[email protected]', '[email protected]'],
act: {
actType: 'te',
actId: 'act_001',
actUrl: 'https://staging.rofimoncloud.com/secure/teleexpertise/list'
},
}).then(result => console.log(result)).catch(error => console.error(error));Displaying an existing Contextualized Discussion
The Contextualized Discussion can be recalled via its id. In this case, the same discussion with same metadata is displayed within the Establishment app.
// select the sanaWidget component
const sanaWidget = document.getElementsByTagName('sana-widget')[0];
// set the singleroomid to the component using previously defined actId
sanaWidget.singleroomid='act_001'
// change the component operationmode
sanaWidget.operationmode='SINGLE_ROOM'Customizing discussion header
The Contextualized Discussion can display a custom discussion header, there are three different modes that can be customized by the singleroomheader property.
// select the sanaWidget component
const sanaWidget = document.getElementsByTagName('sana-widget')[0];
// set the singleroomheader to the component
sanaWidget.singleroomheader='CONTEXT'
// set the singleroomid to the component using previously defined actId
sanaWidget.singleroomid='act_001'
// change the component operationmode
sanaWidget.operationmode='SINGLE_ROOM'The singleroomheader property can take the following values :
CONTEXTThe discussion header change when a contextualized discussion is viewed. The data shown on this header are heavily customizable by adding context data to the discussion.
To add context to the room, more customization modes will come soon.
DEFAULTthe default room displayNONEno header for the room
Updated about 1 month ago
