Schema for Hospital Settings

From Settings.schema.yaml (hospital/Settings.schema)

---
$id: https://skeleton.botmd.io/hospital/Settings.schema
$schema: http://json-schema.org/draft-07/schema#

title: Settings
description: >-
  `Hospital.settings` are used to store settings related to the hospital. This field *will be exposed* to the Frontend.

type: object

required: [organization_key]
additionalProperties: false

properties:
  beta_programs:
    title: Beta Programs
    description: Beta Programs that this hospital is running
    type: array
    items:
      type: string
      minLength: 1

  organization_key:
    title: Organization key
    description: This is to denote the organization key used on Chatterbox and by legacy Hippocrates. This key will be included in the [ProfileTags.schema](hospital-profiletags-generated.html) as well.
    $ref: "ProfileTags.schema#/definitions/Organization Keys"
  #end organization_key

  active_heimdall_provider:
    title: Active Heimdall Provider
    description: Heimdall Provider UID that this hospital will login using
    type: string
    minLength: 1
  #end active_heimdall_provider

  datetime_format:
    title: Datetime Format
    description: Format date/time using this [Python strftime style format](https://strftime.org/). Defaults to [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).
    type: string
    minLength: 1
  #end datetime_format

  domain_root:
    title: Domain Root
    description: The domain rppt (eg. botmd.io, botmd.sg) of the hospital. Used to alter all API endpoints for the specified hospital. Defaults to `botmd.io`.
    type: string
    minLength: 1
  #end domain_root

  timezone:
    title: Timezone
    description: Default [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to assume for patients, clinicians in this clinic. This is publicly available to frontend via `cleoClinicPublicSettings` endpoint. Defaults to `UTC`.
    type: string
    minLength: 1
  #end timezone

  einstein:
    title: Einstein
    description: Einstein specific settings.
    $ref: "/einstein/Settings.schema"
  #end einstein

  jarvis_v2_assistants:
    title: Jarvis V2 Assistant settings
    description: Hospital assistant-specific configs are stored here. If hospital has J2 enabled and this is not provided, default values will be used
    type: object
    minProperties: 1
    properties:
      "@documents":
        $ref: "#/definitions/J2 Assistant"
      "@directory":
        $ref: "#/definitions/J2 Assistant"
      "@trials":
        $ref: "#/definitions/J2 Assistant"

  guest_hospital:
    title: Is Guest Hospital?
    description: Mark this hospital as a guest hospital. There can only be one.
    type: boolean
  #end guest_hospital

  max_web_devices:
    title: Maximum active devices per profile for a web channel
    description: Only the number of most recent active web devices will be kept upon registering new web device

    type: number
    minimum: 1

  public_profile_uid:
    title: Public Profile UID
    description: Default hospital profile uid for public session. Setting this will also allow this hospital to be used with `PublicServiceProvider` for authorization flow.
    type: string
  #end public_profile_uid

  legacy:
    title: Legacy Account User Config (Deprecated)
    description: Config in JSON to store modules config such as reminder times.

    type: object
    required: []
    additionalProperties: true

  notifications:
    title: Notifications
    description: Notifications related hospital settings.

    type: object
    additionalProperties: false
    required: []
    properties:
      available:
        title: Available Notifications.
        description: A list of notification types that are available in the hospital.

        type: array
        uniqueItems: true
        items:
          type: object
          required: [key, name]
          properties:
            key:
              title: Key
              description: These `key`s uniquely identify the notification type. When storing in `Profile.settings.notifications.deactivated[]`, these keys should be used.
              $ref: "#/definitions/Notification Types"

            name:
              title: Name
              description: This notification name will be displayed in the notifications screen on the frontend.

              type: string
              minLength: 1
            #end name
          #end properties
        #end items
      #end available
    #end properties
  #end notifications
#end properties

definitions:
  Notification Types:
    title: Notification Types
    description: These types are unique throughout the Bot MD ecosystem. These keys are used in the user's `Profile.settings.notifications.deactivated[]` to identify the notifications that they have deactivated.

    anyOf:
      - title: Bot
        description: Messages from Bot. This is the default is no `delivery_by` is specified.
        const: bot

      - title: Alert
        description: Alerts
        const: alert

      - title: Email Notification
        description: Email Notification to Admin / User (eg. User License limit, activation, expiry, etc.)
        const: email_notification

      - title: Broadcast
        description: Broadcast to hospital
        const: broadcast

      - title: Profile Reminder
        description: Profile related reminder (eg. profile creation, activation, expiry, etc).
        const: profile_reminder

      - title: Temperature Reminder
        description: Temperature reminder for Singapore hospitals.
        const: temperature_reminder

      - title: ART Reminder
        description: ART reminder for Singapore hospitals.
        const: art_reminder

      - title: ED
        description: ED Roster Updates used by TTSH Emergency Department.
        const: ed_roster

      - title: Mental Health
        description: Mental Health bot for TTSH.
        const: emobot

      - title: Mood Log Reminder
        description: Mood Log Reminder for TTSH Mental Health Module (2024)
        const: moodlog_reminder

      - title: ECG
        description: ECG Updates used by TTSH Emergency Department.
        const: ecg

      - title: Arise
        description: Arise/PSP used by Roche.
        const: arise_psp

  J2 Assistant:
    type: object
    title: Jarvis V2 Assistant
    description: Jarvis V2 Assistant metadata
    minProperties: 1
    properties:
      enabled:
        title: Is enabled
        description: True iff this assistant is available for use. True by default
        type: boolean
        default: true
      query_engine_settings_path:
        title: LLM Query Engine Settings YAML path
        description: Kondo Resources path to LLM Query Engine Settings YAML. Backend should have hardcoded defaults if not provided
        type: string
        minLength: 1
        example: "jarvisv2/query_engines/hospital-llm-query-engine-settings.yaml"
#end definitions

[Main Page] [Schema Documentation] [Examples]