Skip to main content
Everything TORTUS produces flows back to your application through events. You subscribe with client.on(event, callback), which returns an unsubscribe function.

Events

For completion events, the payload separates metadata from output:
  • consultation (or meeting): all the metadata, including reference, mode, patient, customFields, and integration.
  • result: the generated artifacts only.

Completing a consultation

When a consultation completes you must call finish() to acknowledge receipt. Optionally pass a status to report whether your processing succeeded.
Calling finish() with no arguments is equivalent to finish({ status: 'success' }):

Reading artifacts

result.artifacts holds the structured medical output. Each artifact type is an array, so always filter by contentType rather than relying on array order.

Medical codes

medicalCodes includes diagnoses and observations. Observational codes carry a measurement, and every code carries an evidence array (which may be empty).

Other lifecycle events

Putting it together

A complete integration that loads the client, subscribes, then starts a consultation on demand:

Cleanup

Unsubscribe from individual listeners, close a specific consultation, or destroy the whole client.
destroy() cleans up all resources but won’t remove historical data saved in the browser.