Schema for Kronos Task Metadata

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"

  chernobyl:
    $ref: "#/definitions/chernobyl"
  #end chernobyl

  einstein:
    $ref: "#/definitions/einstein"
  #end einstein

  fleming:
    $ref: "#/definitions/fleming"
  #end fleming

  healthcheck:
    $ref: "#/definitions/healthcheck"
  #end healthcheck

  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

  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
#end definitions

[Main Page] [Schema Documentation] [Examples]