From ReminderSchedule.schema.yaml (cleo/ReminderSchedule.schema
)
---
$id: https://skeleton.botmd.io/cleo/ReminderSchedule.schema
$schema: http://json-schema.org/draft-07/schema#
title: Reminder Schedule (DEPRECATED)
description: Schema for storing reminder schedules.
type: object
additionalProperties: false
required: [frontend]
properties:
cron_expressions:
title: Cron Expressions (Deprecated)
description: This field has been deprecated.
type: array
uniqueItems: true
timezone:
title: Timezone
description: The timezone for this cron expressions. Defaults to clinic timezone (or `UTC` if that is not set).
type: string
minLength: 1
frontend:
title: Frontend Data Model
description: Used by frontend to represent the reminder schedule.
type: object
additionalProperties: false
required: [times, every, every_unit]
properties:
times:
title: Times
description: An array of reminder times in `%H:%M` format. Reminders will be sent at this time of the day as determined by the frequency and local timezone.
type: array
items:
title: Time
description: Times are always in `%H:%M` format. Assume local timezone as determined by above.
type: string
pattern: "^(?P<hour>00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24):(?P<minute>00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59)$"
every:
title: Every
description: Reminders will be sent `every` `every_unit` (e.g., days, weeks, etc).
type: integer
minimum: 1
every_unit:
title: Every Unit
description: Reminders will be sent every `every` `every_unit` (e.g., days, weeks, etc).
enum: [day, week, month]
days_of_week:
title: Days of Week
description: For reminders every `WEEK`, the days of the week for which we will remind. Required when `every_unit` is `WEEK`.
type: array
minItems: 1
items:
title: Day
enum: [mon, tue, wed, thu, fri, sat, sun]
#end properties
#end frontend
follow_up_intervals:
title: Follow Up Intervals
description: Sends a follow up reminder if the patient did not submit to the first reminder event. This is an array of intervals in seconds after the first ReminderEvent. Note that the maximum value for an interval is 43200 seconds (i.e., 12 hours).
type: array
items:
title: Interval
type: integer
exclusiveMinimum: 0
maximum: 43200
#end follow_up_intervals
recent_submission:
title: Recent Submission
description: Describes how submissions are attached to `ReminderEvent`s.
type: object
required: []
additionalProperties: false
minProperties: 1
properties:
before:
title: Before
description: Submissions that were submitted `before` seconds before the reminder will be attached to the `ReminderEvent`. Defaults to 14400 seconds.
type: number
exclusiveMinimum: 0
#end before
after:
title: After
description: Submissions that were submitted `after` seconds after the reminder will be attached to the `ReminderEvent`. Defaults to 14400 seconds.
type: number
exclusiveMinimum: 0
#end after
#end properties