Active Properties
Interface Control
Callbacks
Callback Signatures
handleReportreport object matches the structure defined in your template JSON Schema. Example payload:
templateExtras schema — the SDK does not rename or transform fields. The shape of each item is defined by your schema. Pairs with the templateExtras prop. See Clinical Actions (Extras).
Contextual Data
Report curation and EMR pre-fill
These props power two report features. See their dedicated guides for the full flow.Consent Indicator
The consent status indicator in the header is not a component property. It is enabled through your Omniloy account/profile settings (contact support@omniloy.com to turn it on). When enabled, the indicator reflects thesignedConsent field you provide inside patientdata (see Patient Data).
Localization
The default language is
"es" (Spanish). If your application targets English-speaking users, set language="en" explicitly.Analytics context
Debugging
CSS Customization
SofIA SDK renders as a Web Component with Shadow DOM. This prevents style conflicts with the host application, but it also means the application’s global CSS does not directly affect internal SDK elements. If you need to adjust specific internal styles, inject a<style> tag into the component shadowRoot after the Web Component has been defined and mounted:
#sofia or #sofia-component. In Angular, run this logic in ngAfterViewInit. In AngularJS, call it after configuring the component attributes and callbacks. If the component is mounted conditionally, run the function again after mounting it.
Manual Report Retrieval
In addition to receiving the report automatically, you can request it on-demand from your application. Theset-get-last-report property executes a callback that provides you with an asynchronous function. You should store this reference to use it whenever you need to retrieve the last generated report.
Usage Examples
Basic setup with patient data
Data properties go on the element as attributes; callbacks are assigned as JS properties:Chat-only mode (no report generation)
To use SofIA in chat-only mode, simply omit thetemplate and templateid properties. The generate button will not appear.
Advanced configuration with callbacks
Deprecated Properties
Important Notes
- patientdata: Should only contain information necessary for the clinical context, following data minimization principles.
- States: Changes in boolean properties are immediately reflected in the interface.
- Localization: Changing the language affects the entire component interface, including error messages and labels.
- Callbacks: Assign callbacks programmatically as JS properties on the element (e.g.,
element.handleReport = fn). They cannot be wired through HTML attributes or global function names.