Class: TriageOption

TriageOption


new TriageOption( [triageOption])

For declaring triage options and the symptom selection context that should present them.

Parameters:
Name Type Argument Description
triageOption object <optional>

An object declaring initial values for configurable properties of the instance

Members


<inner> button_class :string

The class for the button that should display

Type:
  • string

<inner> button_subtext :string

The button subtext for the button that should display

Type:
  • string

<inner> button_text :string

The button text for the button that should display

Type:
  • string

<inner> callback :triageOptionCallback

A callback that should be performed when the button is pressed

Type:

<inner> first_aid :bool

An optional member determining whether this rule should match on symptoms with first aid. If true, this rule will only match symptoms with first aid associated with them

Type:
  • bool

<inner> icon :string

The icon that should show in the button

Type:
  • string

<inner> level_max :number

The maximum symptom disposition level that this rule should apply for

Type:
  • number

<inner> level_min :number

The minimum symptom disposition level that this rule should apply for

Type:
  • number

<inner> schedule :object

An optional member representing the schedule that this rule should apply for. Top level keys 0-6 represent Sunday to Saturday respectively. Object contains two properties, time_of_day_min and time_of_day_max, represented in military time.

Type:
  • object

<inner> selected :bool

Indicating that this triage option has been selected.

Type:
  • bool

<inner> telemedicine :Array.<Telemedicine>

An optional value determining whether this rule should match on symptoms based on telemedicine. If defined, this rule will only match symptoms with values provided in the array

Type:

<inner> urgent_care :bool

An optional value determining whether this rule should match on symptoms with urgent care. If true, this rule will only match symptoms with urgent care true

Type:
  • bool

<inner> url :string

The url that the window.location should change to when the button is pressed

Type:
  • string

Methods


<inner> checkSchedule()

Tests if the current date is a match for this triage rule.

Returns:
  • Boolean indicating match
Type
bool

<inner> isMatch(symptom)

Tests if the provided symptom is a match for this triage rule.

Parameters:
Name Type Description
symptom Symptom

A symptom to test for matches against

Returns:
  • Boolean indicating match
Type
bool

<inner> select(encounter, symptom, triageOption [, any])

Select a triage option for the given symptom. This will trigger the callback for the TriageOption if provided, or navigate to the TriageOption url.

Parameters:
Name Type Argument Description
encounter Encounter

The current encounter summary

symptom Symptom

The most acute selected symptom

triageOption TriageOption

This, the triage option that is being selected

any * <optional>

Any argument you want to provide from your application