Display settings and library items

The user's Dragon Copilot settings and library items are saved in their organization's environment in Dragon admin center.

To enable users to access their settings and library items, open the Dragon Copilot settings UI in an iframe.

Dragon Copilot hosts difference categories of settings in separate views; for example, microphone settings, generative AI settings, or manage vocabulary. Each view has its own URL. Provide your users with dedicated UI elements for the different setting and library item types available, and use DragonCopilotSDK.dragon.settingViews.navigateToSettingView() to navigate to the requested settings.

Prerequisite

You've initialized the Dragon Copilot SDK using an acquireAccessToken function so that the returned access token is scoped to your EHR. For more information, see Authentication.

Get the Dragon Copilot settings URL

Call DragonCopilotSDK.dragon.settingViews.getUrls() to get a list of the various setting views available. The function returns a base URL for the Dragon Copilot instance and a list of setting view objects with their corresponding URLs.

async function getUrls(): Promise<SettingViewsUrls | null> { ... }

// sample of a returned SettingsViewsUrls object
{
  baseUrl: "https://some-url-to-drc-web.com",
  views: {
    settingsHome: "https://some-url-to-drc-web.com/settings-home",
    settingsMicrophone: "https://some-url-to-drc-web.com/settings-microphone"
  }
};

Open Dragon Copilot in an iframe

The iframe displaying Dragon Copilot settings must have the following attributes:

  • data-dragon-iframe data attribute.

  • One of the URLs returned by getUrls() for the src attribute. This can be the base URL or one of the settings pages, for example the URL for settingsHome. Don't change this later to navigate through the settings; use the navigateToSettingView API instead.

The Dragon Copilot SDK authenticates the user's Dragon Copilot session and the requested page is loaded.

Once the Dragon Copilot UI has finished loading in your iframe, call navigateToSettingView(view) to change the settings view.

async function navigateToSettingView(view: string): Promise<void> { ... }

Important

Only use navigateToSettingView(view) to navigate. Don't change the src URL in the iframe as this reloads Dragon Copilot, creating a new instance of the application.

Dictation and keyboard focus

If there are speech enabled controls in your application, speech focus follows the keyboard focus. Dictation results go to your app when your app has keyboard focus; dictation results go to the Dragon Copilot settings in the iframe when the Dragon Copilot settings have keyboard focus.

If there are no speech enabled controls in your application, and Dragon Copilot settings are loaded in an iframe, then dictation results go to the Dragon Copilot settings in the iframe.

See also

API reference