Recommended configuration
const heidiOptions = {
token: 'JWT_TOKEN',
target: '#heidi',
region: 'AU',
productName: 'Your EMR Name',
display: {
position: 'bottom-right',
},
language: {
inputDefault: 'en',
outputDefault: 'en',
},
result: {
includeTranscript: true,
},
onInit: () => {
// Display the UI that will trigger Heidi
document
.querySelectorAll('.heidi-button')
.forEach((button) => (button.style.display = 'block'));
},
onReady: () => {
Heidi.onSessionStarted((sessionId) => {
// sessionId is the ID of the current Heidi Session.
});
Heidi.onPushData((data) => {
// data.notesData will contain data generated by Heidi
// if a template was used, it will contain the result
// using the Template structure above
console.log(data);
});
Heidi.onPushDocument((data) => {
// data.title and data.content will contain the document data generated by Heidi
console.log(data);
});
Heidi.onTokenExpired(() => {
// refresh the widget token when this callback is called to avoid losing recordings
// the getToken function below should be replaced with your own logic to get a new token
getToken().then((token) => {
Heidi.setToken(token);
});
});
}
};
All configuration options
token
A valid JWT token obtained from the Heidi Authentication API.
Attribute | Value |
---|---|
Optional | No |
Default | N/A |
target
A target DOM element to render the widget into.
Attribute | Value |
---|---|
Optional | Yes |
Default | document.body |
region
A valid code to indicate what Heidi API region to use.
Attribute | Value |
---|---|
Optional | Yes |
Default | AU |
Options | AU , EU , UK , US , CA |
productName
The name of your EMR product. This is shown to users during the Heidi signup process.
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
onInit
Called when Heidi is successfully initialised. This is called as soon as the script is successfully loaded on your page.
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
onReady
Called when widget is ready for use. This is called
after Heidi.open()
is triggered.
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
result
Result Options for the widget.
const heidiOptions = {
// ...
result: {
includeTranscript: true, // include transcript in the Heidi note data
}
// ...
}
language
Default language options for the widget.
const heidiOptions = {
// ...
language: {
inputDefault: 'en', // the language the transcript will be interpreted with.
outputDefault: 'en' // the default language a note and documents are generated with.
}
// ...
}
See supported languages for a complete list of supported languages.
display
Display options for the widget. See below.
Display Options
theme
The default widget theme.
Attribute | Value |
---|---|
Optional | Yes |
Default | light |
Options | light , dark |
position
Sets the position of the widget on the page.
Attribute | Value |
---|---|
Optional | Yes |
Default | bottom-right |
Options | top-left , top-right , bottom-right , bottom-left |
maxHeight
Maximum height for the widget when it's fully expanded.
Attribute | Value |
---|---|
Optional | Yes |
Default | 800 |
Options | Minimum recommended is 500px , hover any value will work. |
fitToWindow
If set to true
, the widget will resize to fill the entire height and width of the window.
Attribute | Value |
---|---|
Optional | Yes |
Default | false |
paddingX
Distance of the widget from the window edge (on the X axis - left
or right
).
Attribute | Value |
---|---|
Optional | Yes |
Default | 24 |
paddingY
Distance of the widget from the window edge (on the Y axis - top
or bottom
).
Attribute | Value |
---|---|
Optional | Yes |
Default | 24 |
draggable
Allow the widget to be dragged around the page by the user.
Attribute | Value |
---|---|
Optional | Yes |
Default | false |
zIndex
Change the zIndex of the widget frame.
Attribute | Value |
---|---|
Optional | Yes |
Default | '10000' |