Creates an instance of AnalysisWidget.
The DOM element where the widget will be injected.
The options of the widget.
OptionalauthToken?: stringThe authentication token (JWT) for the widget.
OptionalbaseUrl?: stringThe base URL of the widget.
Optionaldebug?: booleanWhether to enable debug mode.
Optionalenv?: "preprod" | "production"The widget environment.
OptionalframeHeight?: numberThe height of the widget’s iframe (in pixels).
OptionalframeWidth?: numberThe width of the widget’s iframe (in pixels).
Optionallocale?: stringThe language for the user interface of the widget.
OptionalsigningKey?: stringThe base64-encoded signing key using the ES256 algorithm.
Please use the new authentication flow with authToken.
Check out the documentation for more information.
OptionalsoftwareId?: stringThe software identifier making the widget call.
Please use the new authentication flow with authToken.
Check out the documentation for more information.
Optionaltheme?: stringThe widget’s user interface theme.
OptionaluserId?: stringThe identifier of the user making the widget call.
Please use the new authentication flow with authToken.
Check out the documentation for more information.
Trigger a new analysis with the provided payload.
The data required for the analysis containing a drug list and a patient profile.
widget.analyze({
drugs: [
{
coding: {
code: "60234100",
terminology: "cis",
},
type: "branded_drug",
},
{
coding: {
code: "67346461",
terminology: "cis",
},
type: "branded_drug",
},
{
coding: {
code: "61547468",
terminology: "cis",
},
type: "branded_drug",
},
],
patientProfile: {
allergies: [
{
coding: {
code: "47703008",
terminology: "snomed",
},
},
],
birthDate: "1983-11-22",
concurrentTreatments: [
{
coding: {
code: "MV00001487",
terminology: "posos",
},
},
],
conditions: [
{
coding: {
code: "186963008",
terminology: "snomed",
},
isLongTermIllness: false,
modifiers: [],
},
],
gfr: 110,
height: 185,
sex: "male",
weight: 81,
},
});
Registers a callback to handle authentication token refresh requests.
This function is invoked when the widget detects that a new token is needed, for example when the current token is about to expire or has expired.
A function that returns a fresh authentication token.
Class representing an analysis widget.