From ProviderSettings.schema.yaml (rosters/ProviderSettings.schema
)
---
$id: https://skeleton.botmd.io/rosters/ProviderSettings.schema
$schema: http://json-schema.org/draft-07/schema#
title: Roster Provider Settings
description: >-
Roster Provider Settings define the schema of their source data and how the data should be displayed on the frontend.
type: object
additionalProperties: true # for backward compatibility (to remove once all migrated)
required: []
properties:
#
# Config Settings
#
hospitals:
$ref: "/hospital/Permissions.schema#/definitions/Hospitals"
tags:
$ref: "/hospital/ProfileTags.schema"
intents:
title: Intents
description: Intent phrases that will trigger this module.
type: array
minItems: 1
uniqueItems: true
items:
type: string
minLength: 1
timezone:
title: Timezone
description: Default timezone (eg. Asia/Singapore) if not specified in hospital settings (to be used for time related display information such as last synced time).
type: string
minLength: 1
fields:
title: Fields
description: The list of fields mapped to the table columns that are searchable by Jarvis in this mini-app.
type: array
minItems: 1
uniqueItems: true
items:
$ref: "#/definitions/Field"
sorry_message:
title: Sorry Message
description: Optional sorry message to display if there is an intent present without answers.
anyOf:
- $ref: "/ratatoskr/MessageTemplate.schema"
- type: array
title: Array of Messages
description: Used to support more than 1 message (eg. Text and Quick Reply)
items:
anyOf:
- $ref: "/jarvis/ModuleSettings.schema#/definitions/Message"
stop_words:
title: Stop Words
description: Stop words to apply to this miniapp only.
type: array
minItems: 1
items:
type: string
minLength: 1
logo_url:
title: Logo URL
description: Logo of the hospital to be used in the app.
type: string
format: uri
name_suffix_column:
title: Name Suffix Column
description: Flag to indicate if the `name_suffix` should be shown in a separate column in the miniapp table (defaults to False).
type: boolean
time_column:
title: Time Column
description: Flag to indicate if the `valid_from` and `valid_to` should be shown in the miniapp table (defaults to False).
type: boolean
max_entries:
title: Max entries
description: Number of entries to display before 'Show more' is shown.
type: integer
perfect_requires_intent:
type: boolean
title: Perfect Requires Intent
description: "Determines if `intent` is required for an answer to be `is_perfect`, when an answer is exact, it `is_perfect` and can cause it to swamp other answers (default: False)"
show_time:
title: Show time
description: Flag to indicate if pretty time (eg. 8am-5pm) should be shown in message for each entry.
type: boolean
show_only_relevant:
title: Show Only Relevant
description: Show only relevant persons and roles in bot response instead of just sorting the entries (defaults to False).
type: boolean
style:
title: Style
description: Configurations that affect how the data is presented to the user.
type: object
properties:
quick_reply:
title: Quick Reply
description: Used to customize how the quick replies looks in the chat application.
type: object
properties:
text:
type: string
minLength: 1
#
# Data Source Settings
#
einstein:
title: Einstein DataSource
description: Configuration settings when used with Einstein as the data source.
type: object
properties:
data_source_uid:
title: Einstein DataSource UID
description: The corresponding Einstein DataSource will be used during syncing
type: string
minLength: 1
amion:
title: Amion Module
description: Configuration settings when used with amion as the data source.
type: object
properties:
api_key:
title: Amion API Key
type: string
description: Amion API key needed for pulling roster data from amion.
minLength: 1
auto_generate_synonyms:
title: Auto Generate Synonyms
description: Automatically does shingle expansion on terms (defaults to False).
type: boolean
days:
title: Days
description: Amount of roster data to pull from amion denoted in days (use either days or months).
type: integer
months:
title: Months
description: Amount of roster data to pull from amion denoted in months (use either days or months).
type: integer
definitions:
field_base_properties: &field_base_properties
key:
title: Key
description: Uniquely identifiable key used internally for this field. It will be used as the `key` when storing values associated with this field.
type: string
minLength: 1
column:
title: Column
description: The corresponding column name. Defaults to the value of `key`.
type: string
value:
title: Value
description: Variable substituted string (to be used with `type:composite`).
type: string
type:
title: Type
description: >-
The type of this field. This is used to determine how to parse values from the source data. Defaults to `string`.
The `strings` type will assume the raw field value is a comma separated string and will parse it to an array of strings.
The `object` or `json` type will assume the raw field value is a well-formed JSON and parse it as such. An exception will be raised if it is neither.
The `composite` type used with `value` indicates that this field with be generated using variable substitution from other field keys.
enum: [string, strings, object, json, composite]
Field:
type: object
additionalProperties: false
required: [key]
properties:
<<: *field_base_properties