Defining Triage Options

When the user selects a symptom, the symptom should be reported to SCWebCore.encounter.selectSymptom . SCWebCore will sort any selected symptoms by acuity and update the triage options in the encounter summary to list any triage options that are a match for the most acute symptom. The following screenshot shows a set of triage options that match the symptom "Rash or small blisters in same area as pain" from the adult "Chest Pain" topic. There are three options that match. The disposition for the most acute option, "Call Doctor within 24 Hours", is rendered at the top of the screen.

Triage Options Layout

Triage options define:

  • conditions - indicating their appropriateness for a given symptom
  • button attributes

A default set of triage options is provided in SCWebCore.triage. This set of triage options is designed to provide a match for every single symptom on the Symptom Checker API. The following options are supported in the default set of triage options:

  • Call 911
  • Find an ER
  • Find a Hospital
  • Call an ER
  • Call Your Doctor
  • Find a Dentist or Doctor
  • Call Poison Center
  • Find a Doctor
  • Find a Dentist
  • Find a Doctor
  • Find a Dentist
  • See First Aid
  • Find an Urgent Care
  • See Care Advice

Conditions

You can call TriageOption.isMatch on a triage option and provide any symptom to determine if it is an appropriate recommendation. This match is based upon the conditions represented in the options:

  • level_min, level_max vs symptom.level
  • urgent_care vs symptom.urgent_care
  • telemedicine vs symptom.telemedicine
  • first_aid vs symptom.first_aid_id
  • schedule vs current local time

When a symptom is selected, it should be reported to the Encounter via SCWebCore.encounter.selectSymptom(symptom). SCWebCore will filter its triage instance's array of triage options for matches for the most acute of the currently selected symptoms. Then it will update the encounter summary to reflect those triage options. It is important to fetch a new encounter summary using SCWebCore.encounter.getSummary() after making a symptom selection to see the updated triage options.

Button Attributes

The following attributes can be specified for the button that should be presented when a triage option is a match:

  • button title (localizable)
  • button icon (optional)
  • button class name (optional)
  • url to relocate to (optional)
  • callback to execute (optional)

The display values can be observed in the screenshot of the example triage options layout above. Each of the buttons shows its title, icon and class.

When a triage option is selected by the user, its select function should be called. The select function will perform a callback if one is defined, or else it will change the window.location to the provided url.

Example Triage Options

Let's consider the following example triage options:

Level Example

{
    'level_min': 100,
    'level_max': 100,
    'button_text': 'Call 911',
    'icon': 'fa fa-phone',
    'url': 'tel:911'
}

It will match any symptom with a disposition level of 100. If it is selected, the window location should change to tel:911 to call 911 if permitted by the browser and OS. The button will have the default btn-danger button_class as determined by its level_max value.

Urgent Care Example

{
    'level_min': 0,
    'level_max': 100,
    'urgent_care': true,
    'button_text': 'Find Urgent Care',
    'button_class': 'btn-info',
    'icon': 'fa fa-marker',
    'url': 'https://www.google.com/maps/search/Urgent+Care/'
}

This will match any symptom that has an urgent_care value of true, indicating that urgent care would be appropriate for that particular symptom. If it is selected, the window location should change to google maps search for urgent care.

Telemedicine Example

{
    'level_min': 100,
    'level_max': 0,
    'telemedicine': ['audio', 'audio+image', 'audio+video', 'audio+data'],
    'button_text': 'MD Connect Now',
    'button_class': 'btn-info',
    'icon': 'fa fa-video-camera',
    'url': 'mdconnect://'
}

This will match any symptom that is suitable for any mode of telemedicine. If it is selected, the window location will change to the url scheme for the MD Connect application.

Schedule Example

{
    'level_min': 0,
    'level_max': 100,
    'schedule': [
        {
            'days': [0, 6], // sunday, saturday
            'time_of_day_min': 0,
            'time_of_day_max': 2400
        },
        {
            'days': [1, 2, 3, 4, 5], // weekdays
            'time_of_day_min': 0,
            'time_of_day_max': 800
        },
        {
            'days': [1, 2, 3, 4, 5],
            'time_of_day_min': 1700,
            'time_of_day_max': 2400
        }
    ],
    'button_text': 'Call Nurse',
    'button_class': 'btn-info',
    'icon': 'fa fa-phone',
    'url': 'tel:18001234567'
}

This will match any symptom during the specified date and hours. If it is selected the browser/os will attempt to call the nurse advice line. Weeks start on Sunday (0) and time is represented in 24 hour format.

First Aid Example

{
    'level_min': 100,
    'level_max': 0,
    'first_aid': true,
    'button_text': 'See First Aid',
    'icon': 'fa fa-phone',
    'callback': function(encounter, symptom, option, args) {
        // navigate to first aid topic
    }
}

This will match any symptom that has a first aid topic associated with it. If it is selected the callback function provided will be executed. In the example implementation we provide the angular $state object as args and use it to navigate to the state that shows the first aid topic.

Example Implementation

See Extending Triage Options or Overriding Triage Options for examples of how triage options are defined in the example application.

For information on localizing triage options, see Localizing Triage Options