Module: SCWebCore

A module that provides Symptom Checker application business logic that encompasses the following concerns.

  • Requesting and caching content from the Symptom Checker API
  • Extending and overriding triage logic
  • Searching for topic titles and keywords
  • Providing a summary of each symptom checker encounter
  • Localizing user interfaces for all Symptom Checker API locales

new (require("SCWebCore"))(config)

SCWebCore is the main and only export of this module.

Parameters:
Name Type Description
config Configuration

A webcore configuration object.

Tutorials:
  • Tutorial: initializing-webcore

Members


<inner> api :API

Offers convenience methods for requesting data from the Symptom Checker API and managing a cache of that information. The configuration and locale are provided to specify api credentials and environment information.

Type:

<inner> encounter :Encounter

For providing and maintaining a private encounter summary. This is meant to summarize any information collected during the symptom checker encounter to relay this information to other systems.

Type:

<inner> locale :Locale

To access a table of localized strings in all supported languages.

Type:

<inner> triage :Triage

For configuring triage options and requesting triage options given a particular symptom.

Type:

Methods


<inner> getConfiguration()

Get the configuration object for this instance.

Returns:

the configuration object for this scwebcore instance

Type
Configuration

<inner> makeSymptom(question, disposition, topic)

For creating a symptom from a What to Do question, its disposition level and the topic it came from

Parameters:
Name Type Description
question Question

an SCAPI Question object with id, text, telemedicine, urgent_care?, firstaidid?, firstaidtitle? properties

disposition Object

the disposition for the question

topic AbbreviatedTopic

the topic object with id and title properties for the topic the question was selected from

Returns:

a symptom with any customized disposition level

Type
Symptom