From TaskMetadata.schema.yaml (kronos/TaskMetadata.schema)
---
$id: https://skeleton.botmd.io/kronos/TaskMetadata.schema
$schema: https://json-schema.org/draft-07/schema
title: Task Metadata
description: >-
These are used to store task metadata.
To separate between different task providers, we adopt a naming convention where the fields are named by the `provider_key`.
type: object
required: []
additionalProperties: false
properties:
cleo:
$ref: "#/definitions/cleo"
#end cleo
cleo_reminder_syncer:
$ref: "#/definitions/cleo_reminder_syncer"
cleo_baxter:
$ref: "#/definitions/cleo_baxter"
cleo_document_syncer:
$ref: "#/definitions/cleo_document_syncer"
cleo_hummingbird:
$ref: "#/definitions/cleo_hummingbird"
cleo_hmi:
$ref: "#/definitions/cleo_hmi"
cleo_qiscus_coexistence:
$ref: "#/definitions/cleo_qiscus_coexistence"
cleo_siloam_rehab:
$ref: "#/definitions/cleo_siloam_rehab"
chernobyl:
$ref: "#/definitions/chernobyl"
#end chernobyl
einstein:
$ref: "#/definitions/einstein"
#end einstein
fleming:
$ref: "#/definitions/fleming"
#end fleming
healthcheck:
$ref: "#/definitions/healthcheck"
#end healthcheck
slmc_email_report:
$ref: "#/definitions/slmc_email_report"
#end slmc_email_report
noop:
title: Noop
description: The `Noop` provider displays a message at the `INFO` level to the logs.
type: string
minLength: 1
#end noop
#end properties
definitions:
cleo:
title: Cleo
description: Cleo related task metadata used for faster querying.
type: object
additionalProperties: false
anyOf:
- required: [reminder_uid]
- required: [clinic_uid]
properties:
clinic_uid:
title: Clinic UID
description: The clinic UID this task is responsible for.
type: string
minLength: 1
reminder_uid:
title: Reminder UID
description: The reminder UID this task is responsible for.
type: string
minLength: 1
patient_form_uid:
title: Patient Form UID
description: The patient form UID this task is responsible for.
type: string
minLength: 1
calendar_uid:
title: Calendar UID
description: The calendar UID this task is responsible for.
type: string
minLength: 1
patient_event_uid:
title: Patient Event UID
description: The patient event UID this task is responsible for.
type: string
minLength: 1
patient_program_uid:
title: Patient Program UID
description: The patient program UID this task is responsible for.
type: string
minLength: 1
patient_program_form_uid:
title: Patient Program Form UID
description: The patient program form UID this task is responsible for.
type: string
minLength: 1
#end cleo
cleo_reminder_syncer:
description: Logic to sync reminder schedule.
type: object
additionalProperties: false
required: [reminder_uids]
properties:
reminder_uids:
title: Reminder UIDs
description: Reminder UIDs to sync.
type: array
items:
type: string
minLength: 1
cleo_document_syncer:
description: Document syncer related task metadata used for document syncer's business logic.
type: object
additionalProperties: false
required: [clinic_uid, document_uid]
properties:
clinic_uid:
title: Clinic UID
description: Clinic UID to sync.
type: string
minLength: 1
document_uid:
title: Document UID
description: Document UID to sync.
type: string
minLength: 1
cleo_baxter:
description: Baxter related task metadata used for baxter's business logic.
type: object
additionalProperties: false
required: [baxter_clinic_mapping]
properties:
baxter_clinic_mapping:
title: Baxter Clinic Mapping
description: Mapping to map Cleo Clinics to Baxter Clinics. Key are `cleo_clinic_uid` and value are `baxter_clinic_uid`.
type: object
baxter_submission_onform_mapping:
title: Baxter Submission Onform Mapping
description: Mapping that map Baxter's device submission to respective onform. Key are `cleo_clinic_uid` and value are `onform_uid`.
type: object
baxter_enrollment_onform_mapping:
title: Baxter Enrollment Onform Mapping
description: Mapping that enroll patient via respective onform. Key are `cleo_clinic_uid` and value are `onform_uid`.
type: object
cleo_hummingbird:
description: Hummingbird related task metadata used for Hummingbird's business logic.
type: object
additionalProperties: false
required: [clinics]
properties:
clinics:
title: Clinics
description: Clinic to sync calendar from Hummingbird.
type: array
items:
type: object
additionalProperties: false
required: [uid, caesar_uids]
properties:
uid:
title: Clinic UID
description: Clinic UID to sync.
type: string
caesar_uids:
title: Caesar UIDs
description: UID of provider application in Caesar to sync.
type: array
items:
type: string
cleo_hmi:
description: HMI related task metadata used for HMI's business logic.
type: object
additionalProperties: false
required: [sftp]
properties:
sftp:
title: SFTP
description: SFTP settings for HMI.
type: object
additionalProperties: false
required: [host, port, username, password, host_key, private_key]
properties:
host:
title: Host
description: SFTP host.
type: string
port:
title: Port
description: SFTP port.
type: integer
username:
title: Username
description: SFTP username.
type: string
password:
title: Password
description: SFTP password.
type: string
host_key:
title: Host Key
description: Host key in `ecdsa-sha2-nistp256` algorithm to establish SSH connection.
type: string
private_key:
title: Private Key
description: SFTP private key.
type: string
cleo_qiscus_coexistence:
description: Qiscus Coexistence related task metadata used for Qiscus Coexistence business logic.
type: object
additionalProperties: false
required: [ qiscus_providers ]
properties:
qiscus_providers:
title: Qiscus Coexistence Providers
description: Qiscus Coexistence that room conversations need to be synced.
type: array
items:
type: object
additionalProperties: false
required: [ provider_application_name, handover_duration, delivery_check_duration ]
properties:
provider_application_name:
title: Provider Application Name
description: Qiscus Coexistence Provider Application Name that need to to sync.
type: string
handover_duration:
title: Handover Duration
description: Check delivery that need to be resolved after handover to agent after x minutes, value in minutes.
type: number
minimum: 1
delivery_check_duration:
title: Delivery Check Duration
description: Timespan to check last x minutes created_on Delivery from execution that need to be resolved, value in minutes.
type: number
minimum: 1
cleo_siloam_rehab:
description: Siloam Rehab related task metadata.
type: object
additionalProperties: false
required: [ follow_up_schedule_delay_duration, patient_event_check_duration, follow_up_message_template_set_uid, clinic_uid]
properties:
follow_up_schedule_delay_duration:
title: Follow Up Schedule Delay Duration
description: Send Follow Up Schedule after after x minutes from appointment schedule ended, value in minutes.
type: number
minimum: 1
follow_up_message_template_set_uid:
title: Follow Up Message Template Set UID
description: Follow Up Message Template Set Uid that will be sent after the appointment ended.
type: string
patient_event_check_duration:
title: Patient Event Check Duration
description: Timespan to check last x minutes Patient Event appointment scheduled ended from execution that need to be resolved, value in minutes.
type: number
minimum: 1
no_show_patient_event_check_duration:
title: No Show Patient Event Check Duration
description: Timespan to check last x minutes Patient Event appointment scheduled ended from execution that need to be check for no show, value in minutes.
type: number
minimum: 1
no_show_patient_event_cutoff_duration:
title: No Show Patient Event Cutoff Duration
description: Timespan to check x minutes after Patient Event appointment scheduled ended from execution to mark no show, value in minutes.
type: number
minimum: 1
is_enable_auto_cancel_no_show:
title: Is Enable Auto Cancel No Show
description: Feature Flag to Enable Auto Cancel No Show Appointment.
type: boolean
clinic_uid:
title: Clinic UID
description: Siloam Rehab Clinic UID.
type: string
read_timeout:
title: Read Timeout
description: Number of seconds to wait before giving up on sending a message.
type: integer
minimum: 5
connect_timeout:
title: Connect Timeout
description: Number of seconds to wait before giving up on connecting to Siloam Rehab API.
type: integer
minimum: 3
chernobyl:
title: Chernobyl
description: Chernobyl related task metadata.
type: object
additionalProperties: false
properties:
gdrive_url:
title: Google Drive URL
description: Google Drive URL this task is responsible for.
type: string
minLength: 1
gsheets:
$ref: "/scalpel/TabularInterfaceSettings.schema#/properties/gsheets"
#end chernobyl
einstein:
title: Einstein
description: Einstein related task metadata.
type: object
additionalProperties: false
properties:
module_uids:
title: Einstein Module UIDs
description: Used for any einstein kronos task which needs einstein `Module` uids.
type: array
items:
type: string
minLength: 1
data_source_uids:
title: Einstein DataSource UIDs
description: Used for any einstein kronos task which needs einstein `DataSource` uids.
type: array
items:
type: string
minLength: 1
skip_on_recreate_entries:
title: Skip On Recreate Entries
description: Set this flag to skip syncing data sources which have the `skip_on_recreate_entries` set to True (Defaults to True).
type: boolean
#end einstein
fleming:
title: Fleming
description: Fleming related task metadata.
type: object
additionalProperties: false
properties:
gdrive_url:
title: Google Drive URL
description: Google Drive URL this task is responsible for.
type: string
minLength: 1
gsheets:
$ref: "/scalpel/TabularInterfaceSettings.schema#/properties/gsheets"
#end fleming
healthcheck:
title: Health Check
description: Various settings for Healthchecks.
type: object
oneOf:
- required: [heartbeat_key]
- required: [provider_application]
additionalProperties: false
properties:
heartbeat_key:
title: Heartbeat Key
description: Betteruptime heartbeat key for reporting heartbeats.
type: string
minLength: 1
provider_application:
title: Provider Application
description: The provider application UID or name that contain the `HealthcheckApplication` for driving the healthcheck pings.
type: string
minLength: 1
#end properties
#end healthcheck
slmc_email_report:
title: SLMC Email Report
description: >-
Config shared by `SLMCEmailReportGenerator` (the report task) and
`SLMCEmailReportHealthCheck` (its watchdog). Schema-level requirements
are loose — runtime code in each task validates what it actually needs.
type: object
additionalProperties: false
required: []
properties:
email:
title: Email
description: Report-task email config. Validated at runtime by `SLMCEmailReportGenerator.execute()`.
type: object
additionalProperties: false
required: []
properties:
to:
title: Recipients (TO)
description: Primary recipients of the daily report email. At least one required when the report task runs.
type: array
minItems: 1
items:
type: string
minLength: 1
cc:
title: Recipients (CC)
description: Optional CC recipients.
type: array
minItems: 0
items:
type: string
minLength: 1
subject:
title: Subject Template
description: "`string.Template` with `${date}` supported."
type: string
minLength: 1
body:
title: Body Template
description: "`string.Template` with `${date}`, `${total}`, `${sent}`, `${failed}`, `${other}` supported."
type: string
minLength: 1
#end properties
#end email
slack:
title: Slack
description: Slack channels for outcome posts. Both keys optional — a missing channel just means that post is skipped.
type: object
additionalProperties: false
required: []
properties:
channel_success:
title: Success Channel
description: Channel for the daily success summary post from the report task.
type: string
minLength: 1
channel_alert:
title: Alert Channel
description: Channel for misconfig / S3 / email-fail / data-failure / health-check alerts. Shared by both tasks.
type: string
minLength: 1
#end properties
#end slack
smtp:
title: SMTP Override
description: >-
Optional SMTP configuration.
type: object
additionalProperties: false
required: [server_uri]
properties:
server_uri:
title: Server URI
description: "smtp://username:url-encoded-password@host:port"
type: string
minLength: 1
from:
title: From
description: From header. Falls through to Django's DEFAULT_FROM_EMAIL if unset.
type: string
minLength: 1
use_tls:
title: Use STARTTLS
description: STARTTLS on the SMTP connection. Typical for port 587 (Gmail / Office 365).
type: boolean
use_ssl:
title: Use implicit SSL
description: Implicit SSL from connection start. Typical for port 465 (classic SMTPS).
type: boolean
#end properties
#end smtp
#end properties
#end slmc_email_report
#end definitions