From MessageTemplateUserVariables.schema.yaml (faraday/MessageTemplateUserVariables.schema
)
---
$id: https://skeleton.botmd.io/faraday/MessageTemplateUserVariables.schema
$schema: http://json-schema.org/draft-07/schema#
title: Message Template User Variables
description: List of variables that a user can specify on the frontend for messaging patients.
type: array
minItems: 0
items:
type: object
additionalProperties: false
required: [name, description]
properties:
name:
title: Name
description: Variable name that will be used for substitution. Name should not include the `${` and `}` prefix/suffix.
type: string
pattern: '^[a-zA-Z0-9\-\_\[\]\(\)\{\}]+$'
description:
title: Description
description: Human readable description used as a prompt on frontend for user data entry.
type: string
minLength: 1
type:
title: Type
description: The type of this variable. Defaults to `string`.
enum: [string, file, url, datetime, date, time]
required:
title: Required
description: Whether this variable is required. Defaults to `false`.
type: boolean
default:
title: Default
description: If this variable is not required, the `default` value will be used. Defaults to not being included in the `variables`.
type: string
minLength: 1
max_length:
title: Max Length
description: For `string` and `url`, this is the maximum length of the string.
type: integer
minimum: 1
datetime_format:
title: "`strftime` Format"
description: >-
For `datetime`, `date`, and `time` variables, the `strftime` will be applied to generate the final string.
Defaults to clinic settings `datetime_format` for `date` and `datetime`.
This is required for `time` variables.
See [Python strftime style format](https://strftime.org/) for more information.
Note: __Named `datetime_format` to be consistent with clinic settings but can be used for both `date` and `time` variable types as well.__
type: string
minLength: 1