Overriding Triage Options

If you would like to change the default triage options you can use SCWebCore.triage.setTriageOptions to provide a custom set of triage options for your application. This will override the default triage options.

Declare your triage option by providing json that conforms to the TriageOption model. For information on triage options, their properties and examples of how to declare them, see Defining Triage Options.

SCWebCore.triage.setTriageOptions([
    {
        'level_min': 100,
        'level_max': 100,
        'button_text': 'Call 911',
        'icon': 'fa fa-phone',
        'url': 'tel:911'
    },...
])

Be sure to provide a triage option that matches symptoms for every possible disposition level and without any other special conditions. You should ensure that there is a triage option that matches every symptom.

Example Implementation

In an angular application, the ideal place to override triage options is during the angular module's run phase. In our app/config.js file we provide a whole new set of triage options that are optimal for our application.

angular.module('core').run(['SCWebCore', function(SCWebCore) {
    SCWebCore.triage.setTriageOptions([
        {
            'level_min': 100,
            'level_max': 100,
            'button_text': 'Call 911',
            'icon': 'fa fa-phone',
            'url': 'tel:911'
        },...
    ])
}])

We do this to provide logic for a few triage options that we want to link to other places within our application. This is handled within the triage option callback. See the See First Aid option for an example of this or checkout the tutorial Triage Option Callbacks.

We have localized the triage options that we declare in the example application. For more information on triage option localization see 23-localizing-triage-options.