From ReminderSettings.yaml (cleo/ReminderSettings.schema
)
---
schedule: # Dummy event
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: never
#end schedule
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: clinical_parameter
clinical_parameter_uid: xxxxx12345
duration: 0
unit: day
time_of_day: "09:00"
is_after: true
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: clinical_parameter
clinical_parameter_name: "Appointment Time"
duration: 0
unit: day
time_of_day: "09:00"
is_after: true
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: program_clinical_parameter
clinical_parameter_uid: xxxxx12345
duration: 0
unit: day
time_of_day: "09:00"
is_after: true
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: program_clinical_parameter
clinical_parameter_name: "Appointment Time"
duration: 0
unit: day
time_of_day: "09:00"
is_after: true
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
program_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
event_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
start_trigger:
event: program_clinical_parameter
clinical_parameter_uid: xxxxx12345
duration: 7
unit: day
time_of_day: "09:00"
is_after: true
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
program_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
event_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
start_trigger:
event: program_clinical_parameter
clinical_parameter_name: "Appointment Time"
duration: 7
unit: day
time_of_day: "09:00"
is_after: true
---
timezone: Asia/Singapore
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger: # Reminder starts 1 days after enrollment
event: enrollment
require_enrollment: true
duration: 0
unit: day
time_of_day: "09:00"
end_trigger: # Reminder ends 3 months after discharge
event: discharge
duration: 3
unit: month
recurring_frequencies:
- every: 2
unit: day
time_of_day: "09:00"
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sat
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sun
#end recurring_frequencies
#end schedule
---
timezone: Asia/Singapore
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger: # Reminder starts 1 days after enrollment
event: enrollment
require_enrollment: true
duration: 0
unit: day
time_of_day: "09:00"
end_trigger: # Reminder ends 3 months after discharge
event: discharge
duration: 3
unit: month
recurring_frequencies:
- every: 2
unit: day
time_of_day: "09:00"
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sat
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sun
#end recurring_frequencies
#end schedule
---
schedule: # Discharge at 9am 7 days after enrollment
action:
type: discharge
discharge: {}
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Enroll into new monitoring formset at 9am 7 days after enrollment
action:
type: enrollment
enrollment:
monitoring_formset_uid: xxxx2
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Program Enrollment at 9am 7 days after enrollment with condition
action:
type: program_enrollment
program_enrollment:
clinic_program_uid: xxxx2
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Program discharge at 9am 7 days after enrollment
action:
type: program_discharge
program_discharge: {}
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Program discharge and enroll into new program at 9am 7 days after enrollment
action:
type: program_discharge_with_enrollment
program_discharge_with_enrollment:
clinic_program_uid: xxxx2
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Program discharge and enroll into new program if conditions is fulfill at 9am 7 days after enrollment
action:
type: program_discharge_with_enrollment
program_discharge_with_enrollment:
clinic_program_uid: xxxx2
start_trigger:
event: enrollment
duration: 7
unit: day
time_of_day: "09:00"
---
schedule: # Exact datetime
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger:
event: exact
exact_trigger_on: "2022-08-22T08:00:00+00:00"
---
schedule: # dob
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger:
event: date_of_birth
---
schedule: # Send template if patient has score > 80
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger:
event: condition
condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Score
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
---
schedule: # Send template if patient has both the quiz 1 and quiz 2 score
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger:
event: condition
condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name__in
string_array:
- Quiz 1 Score
- Quiz 2 Score
validator: count
count: 2
---
schedule: # Send template if patient has both the quiz 1 and quiz 2 score
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger:
event: program_condition
condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name__in
string_array:
- Quiz 1 Score
- Quiz 2 Score
validator: count
count: 2
---
schedule: # Event trigger with is_after = false
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: event
duration: 1
unit: day
time_of_day: "09:00"
is_after: false
#end schedule
---
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: event123456
start_trigger:
event: event
duration: 1
unit: day
time_of_day: "09:00"
is_after: false
metadata:
disclaimer: Long Text
follow_up_intervals: [43200, 28800, 7200]
---
timezone: Asia/Singapore
schedule:
action:
type: send_template
send_template:
purpose: user_defined
template_set: reminder12345
start_trigger: # Reminder starts 1 days after enrollment
event: program_enrollment
require_enrollment: true
duration: 0
unit: day
time_of_day: "09:00"
end_trigger: # Reminder ends 3 months after discharge
event: program_discharge
duration: 3
unit: month
recurring_frequencies:
- every: 2
unit: day
time_of_day: "09:00"
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sat
- every: 1
unit: week
time_of_day: "17:00"
day_of_week: sun
#end recurring_frequencies
#end schedule
---
# DEPRECATED
schedule:
action:
type: send_reminder
send_reminder: {}
recurring_frequencies:
- every: 1
unit: week
day_of_week: mon
time_of_day: "09:00"
- every: 1
unit: week
day_of_week: fri
time_of_day: "09:00"
frontend:
times: ["09:00"]
every: 1
days_of_week: [mon, fri]
every_unit: week
---
# DEPRECATED
schedule:
action:
type: send_reminder
send_reminder: {}
recurring_frequencies:
- every: 1
unit: day
time_of_day: "09:00"
frontend:
times: []
every: 1
every_unit: day
recent_submission:
before: 3600
after: 7200
follow_up_intervals: [3600, 7200]
---
# DEPRECATED
timezone: Asia/Singapore
schedule:
action:
type: send_reminder
send_reminder: {}
recurring_frequencies:
- every: 1
unit: day
time_of_day: "00:00"
- every: 1
unit: day
time_of_day: "08:00"
---
timezone: Asia/Singapore
schedule:
action:
type: send_reminder
program_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
event_condition:
filter:
type: expression
expression:
operator:
type: or
expressions:
- type: condition
condition:
type: Q
Q:
key: parameter__name
string: Doctor
- type: condition
condition:
type: Q
Q:
key: value__number__gte
number: 80
validator: exist
send_reminder: {}
recurring_frequencies:
- every: 1
unit: day
time_of_day: "00:00"
- every: 1
unit: day
time_of_day: "08:00"
frontend:
times: ["00:00", "08:00"]
every: 1
every_unit: day