Schema for Cleo Clinic Settings

From ClinicSettings.schema.yaml (cleo/ClinicSettings.schema)

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

title: Clinic Settings
description: Settings for configuring miscellaneous clinic settings. This field is exposed to Frontend for Cleo users.

type: object
additionalProperties: false
required: []

properties:
  api_key:
    title: API Key
    description: API key to verify incoming API calls
    type: string
    minLength: 1

  clinician_idle_timeout:
    title: Clinician Idle Timeout (Seconds)
    description: Clinician sessions will be deactivated after this number of seconds of idling. Defaults to no idle timeout.
    type: number
    minLength: 1
  #end clinician_idle_timeout

  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

  enabled_modules:
    title: Enabled Modules
    description: Module that is enabled in the clinic.
    type: object

    properties:
      patient_module:
        name: Patient Module
        type: boolean

      monitoring_module:
        name: Monitoring Module
        type: boolean

      appointment_module:
        name: Appointment Module
        type: boolean

  is_v3:
    title: Is V3
    description: Whether the clinic is using V3 or not. Defaults to `false`.
    type: boolean

  patient_module:
    title: Patient Module
    description: Settings for patient module in frontend.

    $ref: "#/definitions/ModuleSettings"

  monitoring_module:
    title: Monitoring Module
    description: Settings for monitoring module in frontend.

    $ref: "#/definitions/ModuleSettings"

  appointment_module:
    title: Appointment Module
    description: Settings for appointment module in frontend.

    $ref: "#/definitions/ModuleSettings"

  name_style:
    title: Name Style
    description: Describes the first/last name style. Defaults to `eastern`.
    enum: [eastern, eastern_with_comma, western, western_with_comma]
  #end name_style

  patient_idle_timeout:
    title: Patient Idle Timeout (Seconds)
    description: Patient sessions will be deactivated after this number of seconds of idling. Defaults to no idle timeout.
    type: number
    minLength: 1
  #end patient_idle_timeout

  use_masked_identifiers:
    title: Use Masked Identifiers
    description: Show full identifiers everywhere on the dashboard for this clinic. Defaults to `true`.
    type: boolean
  #end use_masked_identifiers

  billing_settings:
    title: Billing Settings
    description: Settings related to billing for this clinic.

    type: object
    required: []
    additionalProperties: false

    properties:
      maximum_number_of_users:
        title: Maximum Number of Users
        description: The maximum number of users allowed to be registered in the clinic. Optional.
        type: integer
        minimum: 1

      billing_start_date:
        title: Billing Start Date
        description: First Day of the clinic's subscription plan. To be of format 'YYYY-mm-dd'
        type: string
        format: date-time

      billing_end_date:
        title: Billing End Date
        description: Last Day of the hospital's subscription plan. To be of format 'YYYY-mm-dd'
        type: string
        format: date-time

      plan_package:
        title: Plan's Package
        description: Type of Package chosen
        type: string
        minimum: 1

      plan_type:
        title: Type of Plan
        description: Type of Plan chosen
        type: string
        minimum: 1

  chatterbox_settings:
    title: Chatterbox Settings
    description: Settings related to Cleo integration with Chatterbox for this clinic.

    type: object
    required: []
    additionalProperties: false

    properties:
      allow_non_enrolled_patients:
        title: Allow Non Enrolled Patients
        description: Whether to allow users who are not enrolled to talk to the Bot. Defaults to `false`. The `PATIENT_NOT_ENROLLED` template will be sent for patients that are not enrolled when this value is `false`.
        type: boolean
      #end allow_non_enrolled_patients
    #end properties
  #end chatterbox_settings

  jarvis_settings:
    title: Jarvis Settings
    description: Settings related to Cleo integration with Jarvis for this clinic.

    type: object
    required: []
    additionalProperties: false

    properties:
      disclaimer_window_time:
        title: Disclaimer Window Time
        description: Number of seconds to wait before it sent a new disclaimer. Defaults to `3600`.
        type: integer
        minimum: 0
      llm_response_identifier:
        title: LLM Response Identifier
        description: Identifier to use for LLM responses. Defaults to `*`.
        type: string
        minLength: 1

  allowed_login_methods:
    title: Allowed Login Methods
    description: Array of allowed login methods. If not set, defaults to `[phone]`.
    type: array
    minItems: 1
    items:
      enum: [phone, email]

  clinician_designations:
    title: Clinician Designations
    description: List of clinician designations to complement/override the auto-generated list. This will be reflected in the `cleoClinicianDesignations` GQL object type.

    type: object
    additionalProperties: false
    required: [designations]

    properties:
      replace_auto_generated_list:
        title: Replace Auto Generated List
        description: Replace the auto-generated list instead of adding on to it. Defaults to `true`.
        type: boolean

      designations:
        title: Designations
        description: A mapping from canonical clinical designations to possible instantiations when searching and filtering. Filtering/searching should be case insensitive.

        type: object
        minProperties: 1

        propertyNames: # cannot be empty
          pattern: "^.+$"

        additionalProperties:
          title: Designation
          description: List of designations to use for filtering. The canonical designation is always part of the list (i.e., empty list is okay).

          type: array
          items:
            type: string
            minLength: 1
      #end designation
    #end properties
  #end clinician_designations

  patient_dashboard_verification:
    title: Patient Dashboard Verification
    description: Describes how the patient should be verified when accessing their own dashboard. If `patient_dashboard_verification` is not set or `verification_fields` is empty, it means no verification is necessary.

    type: object
    additionalProperties: false
    required: [verification_fields]

    properties:
      welcome_message:
        title: Title
        description: Message to display as the on the secondary verification page. Defaults to `""`.

        type: string
        minLength: 1

      verification_fields:
        title: Verification Fields
        description: An array of verification fields displayed to the user for verification purposes before accessing their personal dashboard.

        type: array
        items:
          type: object
          additionalProperties: false
          required: []

          properties:
            key:
              title: Key
              description: >-
                Use this verification key as secondary verification of the patient. A limited number of options are currently supported:

                - `none`: No verification is required

                - `identifier` and `identifier_last_4`: Based on the `Patient` model's `identifier` field.

                - `verification_token` and `verification_token_last_4`: Based on the `Patient` model's `verification_token` field.

                - `phone`, `phone_e164`, and `phone_without_country_code`: Based on the `Patient` model's `phone` field.

                Note that all comparisons are case-insensitive.

              enum: [identifier, identifier_last_4, verification_token, verification_token_last_4, phone_e164, phone_without_country_code, phone_last_4]

            key_label:
              title: Key Display
              description: Show this text as the label of the associated text input.
          #end properties
        #end items
      #end verification_fields
    #end properties
  #end patient_dashboard_verification

  discharged_patient_list_table_settings:
    title: Discharged Patients list Table Settings
    description: Table settings for configuring the look and feel of "Discharged Patients" table.

    $ref: ClinicTableSettings.schema
  #end discharged_patient_list_table_settings

  active_patient_list_table_settings:
    title: Active Patients Table Settings
    description: Table settings for configuring the look and feel of "Active Patients" table.

    $ref: ClinicTableSettings.schema
  #end active_patient_forms_table_settings

  active_patient_forms_table_settings:
    title: Active Patient Forms Table Settings
    description: Table settings for configuring the look and feel of "Active Patients" table.

    $ref: ClinicTableSettings.schema
  #end active_patient_forms_table_settings

  all_patient_forms_table_settings:
    title: Patient monitoring table settings "All" tab
    description: Table settings for patient monitoring "All" tab

    $ref: ClinicTableSettings.schema
  #end all_patient_forms_table_settings

  discharged_patient_forms_table_settings:
    title: Discharged Patient Forms Table Settings
    description: Table settings for configuring the look and feel of "Discharged Patients" table.

    $ref: ClinicTableSettings.schema
  #end discharged_patient_forms_table_settings

  non_compliant_patient_forms_table_settings:
    title: Patient monitoring table settings "Non-Compliant" tab
    description: Patient monitoring table settings "Non-Compliant" tab

    $ref: ClinicTableSettings.schema
  #end non_compliant_patient_forms_table_settings

  unread_comments_patient_forms_table_settings:
    title: Patient monitoring table settings "Unread comments" tab
    description: Patient monitoring table settings "Unread comments" tab

    $ref: ClinicTableSettings.schema
  #end unread_comments_patient_forms_table_settings

  patient_submissions_table_settings:
    title: Single patient submissions view table settings
    description: Single patient submissions view table settings

    $ref: ClinicTableSettings.schema
  #end patient_submissions_table_settings

  unresolved_alerts_patient_forms_table_settings:
    title: Patient monitoring table settings "Unresolved Alerts" tab
    description: Patient monitoring table settings "Unresolved Alerts" tab

    $ref: ClinicTableSettings.schema
  #end unresolved_alerts_patient_forms_table_settings

  patient_charts_settings:
    title: Patient Charts
    description: Charts settings for displaying individual patient's charts. Charts will be displayed in the same order as this array of settings.

    type: array
    minItems: 1
    items:
      $ref: ClinicChartSettings.schema
  #end patient_charts_settings

  engage:
    title: Engage
    description: Engage clinic settings.

    type: object
    required: []
    additionalProperties: false

    properties:
      allow_reenrollment:
        title: Allow Re-enrollment
        description: Whether to allow an already enrolled patient to re-enroll, thereby resetting their state. Defaults to `false`.
        type: boolean
    #end properties
  #end engage

  moh_cdmp:
    title: MOH CDMP
    description: MOH CDMP settings.

    type: object
    required: []
    additionalProperties: false

    properties:
      fancy_export:
        title: Fancy Export
        description: Whether to allow the fancy Excel file export format for MOH CDMP users. Defaults to `false`.
        type: boolean
    #end properties

  nemg_scheduling:
    title: NEMG scheduling
    description: NEMG scheduling settings

    type: object
    required: [reminders]
    additionalProperties: false

    properties:
      confirmation:
        title: Confirmation
        description: Scheduling confirmation settings

        type: object
        required: [message_template_set_uid]
        additionalProperties: false

        properties:
          message_template_set_uid:
            title: Message template set UID
            description: UID of message template set to use for confirmation message

            type: string
          #end message_template_set_uid
        #end properties
      #end confirmation

      cancellation:
        title: Cancellation
        description: Scheduling cancellation settings

        type: object
        required: [message_template_set_uid]
        additionalProperties: false

        properties:
          message_template_set_uid:
            title: Message template set UID
            description: UID of message template set to use for cancellation message

            type: string
          #end message_template_set_uid
        #end properties
      #end cancellation

      rescheduling:
        title: Rescheduling
        description: Rescheduling settings

        type: object
        required: [message_template_set_uid]
        additionalProperties: false

        properties:
          message_template_set_uid:
            title: Message template set UID
            description: UID of message template set to use for rescheduling message

            type: string
          #end message_template_set_uid
        #end properties
      #end rescheduling

      reminders:
        title: Reminders
        description: List of reminders settings

        type: array

        items:
          type: object
          required: [interval, callback_data]
          additionalProperties: false

          properties:
            interval:
              title: Interval
              description: Reminder interval in seconds, use negative value for reminding before the event and positive for reminding after

              type: integer
            #end interval

            callback_data:
              title: Callback data
              description: Callback data for event reminder Kronos callback

              required: [message_template_set_uid]
              additionalProperties: true

              properties:
                message_template_set_uid:
                  title: Message template set UID
                  description: UID of message template set to use for reminder message

                  type: string
              #end properties
            #end callback_data
          #end properties
        #end items
      #end reminders
    #end properties
  #end nemg_scheduling

  embedding_model_settings:
    title: Embedding settings
    description: Settings for the LLM model during query flow.
    $ref: '/jarvisv2/EmbeddingModelSettings.schema'
  #end embedding_model_settings
#end properties

definitions:
  ModuleSettings:
    type: object
    additionalProperties: false
    required: [gql, tabs]

    properties:
      gql:
        $ref: "#/definitions/GQL"

      tabs:
        title: Tabs
        description: Tabs in modules.

        type: array
        items:
          $ref: "#/definitions/ModuleTabSettings"

  ModuleTabSettings:
    type: object
    additionalProperties: false
    required: [name, gql_filter]

    properties:
      name:
        title: Name
        description: Name of the tab.
        type: string
        minLength: 1

      gql:
        $ref: "#/definitions/GQL"

      gql_filter:
        title: GQL Filter
        description: Filter used in GQL for this tab.
        type: object
        additionalProperties: true

        filter:
          title: Filter DSL
          description: Filter DSL used in gql.
          $ref: "/scalpel/FilterSettings.schema"

      filter:
        title: Filter (Deprecated)
        description: Filter used in GQL for this tab.(Deprecated)

        $ref: "/scalpel/FilterSettings.schema"

      table_columns:
        title: Table Columns
        description: Settings for table columns in this tab.
        type: array

        items:
          type: object
          required: [type, label, accessor_key]
          additionalProperties: false

          properties:
            type:
              title: type
              description: Column type for rendering in frontend.
              enum: [Text, Link, Alert, Comment, BGTableCell, Badge, Markdown, MonitoringFormsArray, Boolean, PatientInfo, ClinicalUsers, Submissions, Date, DateTime, Time, MonitoringForm, MonitoringForms]

            label:
              title: label
              description: Label for column.
              type: string
              minLength: 1

            enable_sorting:
              title: enable sorting
              description: Whether to allow sorting in this columns.
              type: boolean

            accessor_key:
              title: accessor key
              description: Key to retrieve data for this column.
              type: string
              minLength: 1
  GQL:
    title: GQL
    description: The type of gql in module.
    enum: [cleoPatient, cleoPatientEvent, cleoPatientForm, cleoPatientProgram, cleoSubmissions]

[Main Page] [Schema Documentation] [Examples]