Skip to main content
The complete public surface of @tortus-ai/embed-client. For task-oriented walkthroughs, see the guides.

loadTortus(config)

Initialises the TORTUS client and displays the standby screen automatically.
ParameterTypeRequiredDescription
publishableKeystringYesYour TORTUS publishable API key.
containerstring | HTMLElementYesDOM selector or element for the iframe.
environment'production' | 'sandbox'YesWhich environment to connect to. Must be specified explicitly.
fetchClientSecrets() => Promise<{ launchToken: string }>YesAsync function that returns secure credentials so the app can authenticate.
integrationIntegrationNoDefault EHR integration, inherited by consultations without their own.
Returns Promise<TortusClient> See Configuration for the full option list.

client.display(screen)

Navigate to a specific screen.
ParameterTypeRequiredDescription
screen'home' | 'standby'YesThe screen to display.
Returns Promise<void>: resolves when navigation completes, rejects if it isn’t possible.

client.consultations.start(consultation, options?)

Start a new consultation.
ParameterTypeRequiredDescription
consultationobjectYesConfiguration including mode, patient data, and encounter details.
optionsobjectNoBehaviour options (see below).
options
OptionTypeRequiredDescription
returnTo'home' | 'standby'NoScreen to return to when complete.
Returns Promise<TortusConsultation>
The TortusConsultation object contains all consultation data: reference, mode, patient, customFields, metadata, and integration. When the consultation completes, this same data is available in the consultation parameter of the consultation:completed event. The result parameter contains only the generated artifacts.

client.dictations.start(options?)

Start a new dictation session. options
OptionTypeRequiredDescription
returnTo'home' | 'standby'NoScreen to return to when complete.
Returns Promise<TortusDictation>

client.meetings.start(meeting, options?)

Start a new meeting recording. See Meetings for full examples. meeting
FieldTypeRequiredDescription
mode'LIVE_RECORDING' | 'AUDIO_FILE'YesHow the meeting audio is captured.
referencestringNoCross-system identifier; auto-generated if omitted.
titlestringNoMeeting title.
notesstringNoNotes, such as an agenda captured live.
audio{ url: string }When mode is 'AUDIO_FILE'Audio source for pre-recorded meetings.
options
OptionTypeRequiredDescription
returnTo'home' | 'standby'NoScreen to return to when the meeting closes.
Returns Promise<TortusMeeting> The returned TortusMeeting exposes setNotes?(notes), setAudio?(audio), and close() for mid-flight updates and teardown.

client.on(event, callback)

Subscribe to client events. See Handling events & results for payload details.
ParameterTypeRequiredDescription
eventstringYesThe event name to subscribe to.
callbackfunctionYesHandler invoked when the event fires.
Consultation events
EventWhen it fires
consultation:startedA consultation has started.
consultation:resumedAn in-progress consultation was re-opened (e.g. after client restart).
consultation:completedA consultation completed successfully.
consultation:errorA consultation failed with an error.
consultation:cancelledA consultation was cancelled.
consultation:closedA consultation was closed.
Meeting events
EventWhen it fires
meeting:startedA meeting has started.
meeting:resumedAn in-progress meeting was re-opened.
meeting:updatedMeeting metadata (notes/audio) was updated.
meeting:completedA meeting completed successfully (suppressed when disableFinishMeetingButton is true).
meeting:cancelledA meeting was cancelled.
meeting:closedA meeting was closed.
Event data For completion events, the consultation (or meeting) parameter contains all metadata, while result contains the generated artifacts (medicalNotes, letters, medicalCodes, transcriptions). Filter artifacts by contentType rather than relying on array order. Returns a function that unsubscribes from the event.

client.destroy()

Destroys the client and cleans up all resources. Returns Promise<void>
destroy() cleans up all resources but won’t remove historical data saved in the browser.