Recommended configuration
const heidiOptions = {
token: 'JWT_TOKEN',
target: '#heidi',
region: 'AU',
productName: 'Your EMR Name',
display: {
position: 'bottom-right',
},
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
Attribute | Value |
---|---|
Optional | No |
Default | N/A |
Description | A valid JWT token obtained from the Heidi Authentication API. |
target
Attribute | Value |
---|---|
Optional | Yes |
Default | document.body |
Description | A valid JWT token obtained from the Heidi Authentication API. |
region
Attribute | Value |
---|---|
Optional | Yes |
Default | AU |
Description | A valid code to indicate what Heidi API region to use: AU , EU , UK , US . |
productName
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
Description | The name of your EMR product. This is shown to users during the Heidi signup process. |
onInit
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
Description | Called when Heidi is successfully initialised. This is called as soon as the script is successfully loaded on your page. |
onReady
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
Description | Called when the Heidi widget is ready for use. This is called after Heidi.open() is triggered. |
display
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
Description | Display options for the widget. See below. |
result
Attribute | Value |
---|---|
Optional | Yes |
Default | N/A |
Description | Result Options for the widget. See below. |
Display Options
theme
Attribute | Value |
---|---|
Optional | Yes |
Default | light |
Description | The default Heidi Widget theme. |
position
Attribute | Value |
---|---|
Optional | Yes |
Default | bottom-right |
Description | Sets the position of the widget on the page. Accepted values are: top-left , top-right , bottom-right , bottom-left |
maxHeight
Attribute | Value |
---|---|
Optional | Yes |
Default | 800 |
Description | Sets the maximum height for the widget when it's fully expanded. Minimum recommended is 500px , hover any value will work. |
fitToWindow
Attribute | Value |
---|---|
Optional | Yes |
Default | false |
Description | If set to true , the widget will resize to fill the entire height and width of the window. The maximum width it's set to 350px however it will resize and fit any height. |
paddingX
Attribute | Value |
---|---|
Optional | Yes |
Default | 24 |
Description | Distance of the widget from the window edge (on the X axis - left or right ). |
paddingY
Attribute | Value |
---|---|
Optional | Yes |
Default | 24 |
Description | Distance of the widget from the window edge (on the Y axis - top or bottom ). |
draggable
Attribute | Value |
---|---|
Optional | Yes |
Default | false |
Description | Allow the widget to be dragged around the page by the user. |
zIndex
Attribute | Value |
---|---|
Optional | Yes |
Default | '10000' |
Description | Change the zIndex of the widget frame. |
Result Options
includeTranscript
Attribute | Value |
---|---|
Optional | Yes |
Default | false |
Description | Option to include transcript to the pushData response. |