Class: Triage

Triage


new Triage(_locale)

This is a service for configuring triage rules that determine what instructions should be shown for a symptom selection.

Parameters:
Name Type Description
_locale Locale

A locale service to use to localize triage options when getTriageOptions is used.

Methods


<inner> extendTriageOptions(options)

A convenient way to add triage options with overriding the defaults.

Parameters:
Name Type Description
options Array.<object>

An Array of objects that should be turned into TriageOptions and appended to triageOptions.


<inner> getCustomDisposition(level)

Get the triage disposition text for a particular level.

Parameters:
Name Type Description
level number

The disposition level for which to return the disposition text.

Returns:

The triage disposition text specified for the provided level.

Type
String

<inner> getDispositionSubtext(level)

For getting subtext to be shown with the recommended action.

Parameters:
Name Type Description
level number

The disposition level for which to return any disposition subtext

Returns:

The subtext to be shown.

Type
String

<inner> getTriageOptions(symptom)

Get triage options available for a particular symptom.

Parameters:
Name Type Description
symptom Symptom

A Symptom instance. This should be the most acute symptom that the user has selected.

Returns:

An array of triage options that are appropriate for the provided symptom.

Type
Array.<TriageOption>

<inner> parseOptions(options)

To force that the provided options conform to TriageOption.

Parameters:
Name Type Description
options Array.<object>

An Array of object that should be turned into TriageOptions.

Returns:

A certain array of triage options

Type
Array.<TriageOption>

<inner> setCustomDisposition(level, text)

A convenient way to override the default triage disposition text for a particular level.

Parameters:
Name Type Description
level number

The disposition level that should have custom text.

text String

The custom text.


<inner> setDispositionSubtext(level, text)

For providing subtext to be shown with the recommended action.

Parameters:
Name Type Description
level number

The disposition level that should have subtext.

text String

The subtext to be shown.


<inner> setTriageOptions(options)

A setter for overriding the triage options from the configuration during runtime.

Parameters:
Name Type Description
options Array.<object>

An Array of objects that should be turned into TriageOptions and set to override the triageOptions provided during SCWebCore configuration.