From ClinicTableSettings.schema.yaml (cleo/ClinicTableSettings.schema
)
---
$id: https://skeleton.botmd.io/cleo/ClinicTableSettings.schema
$schema: http://json-schema.org/draft-07/schema#
title: Clinic Table Settings
description: Schema for configuring the look and feel of a table.
type: object
additionalProperties: false
required: [title, columns]
properties:
title:
title: Title # So meta
description: Title of the table for display to the user. Will be passed through i18n.
type: string
minLength: 1
#end title
defaultSortField:
title: Default sort field
description: This is used to decide the default sorting for the result set.
type: string
minLength: 1
orderDesc:
title: Order descending
description: Result is order in descending order based on the default sort field is set to true.
type: boolean
#end orderDesc
columns:
title: Columns
description: Settings for each column in the table. This is an ordered array of columns from left to right.
type: array
minItems: 1
items:
type: object
additionalProperties: false
required: [id, header]
properties:
id:
title: ID
description: Column unique identifier. This is used for sorting purposes.
type: string
minLength: 1
header:
title: Header
description: The column header for display. Will be passed through i18n if its a string, if it is an object it will be rendered based on the component property (ie. component "TableSectionHeader, TableSubSectionHeader", componentProps "title, subtitle").
type: [string, object]
minLength: 1
#end header
accessor:
title: Accessor
description: Accessor value to use to retrieve the data
type: string
minLength: 1
#end accessor
sticky:
title: Sticky
description: Make column sticky either to left or right
enum: [left, right]
#end sticky
manualSorting:
title: manualSorting
description: Use to determine if we do the sorting manually or use the predefined sorting functionality that comes with the library
type: boolean
#end manualSorting
bgColor:
title: Background color
description: background color of the column
type: string
minLength: 3
#end bgColor
subColumns:
title: Sub columns
description: Define child columns within a header column. The properties of this column are similar to its parent
type: array
minItems: 1
items:
type: object
additionalProperties: true
required: []
#end subColumns
component:
title: Component
description: The component to render. Defaults to `Text`.
enum: [Text, Link, Alert, Comment, BGTableCell, Badge, Markdown, MonitoringFormsArray, Boolean]
#end component
width:
title: Width
description: Width of the column. Defaults to browser math.
type: string
minLength: 1
#end width
style:
title: Style
description: Styling props to pass to the component.
type: object
additionalProperties: true
required: []
#end style
disableSortBy:
title: Disable Sort By
description: Make this column un-sortable. Defaults to `false`.
type: boolean
#end disableSortBy
data:
title: Data
description: Describes how data is being formatted and rendered to the user.
type: object
additionalProperties: false
required: [valueTemplate]
properties:
valueTemplate:
title: Value Template
description: |-
Template string (include `${x}` variables) to define how cells are rendered.
The following variables are available for patient-form tables:
- `${clinic[name]}`: Name of clinic.
- `${clinic[uid]}`: UID of clinic.
- `${clinic[domain]}`: Domain for clinic login.
- `${clinic[effective_logo]}`: URL to clinic logo.
- `${profile[uid]}`: UID of clinician/patient profile.
- `${profile[name]}`: Name of clinician/patient.
- `${profile[phone]}`: Phone number of clinician/patient.
- `${profile[language]}`: ISO language code of clinician/patient's preferred language.
- `${profile[communication_method]}`: Preferred communication method of clinician/patient.
- `${clinician[designation]}`: Designation of clinician (currently not used).
- `${patient[identifier]}`: Masked identifier for patient.
- `${monitoring_formset[uid]}`: UID of monitoring formset.
- `${monitoring_formset[name]}`: Name of monitoring formset.
- `${monitoring_formset[alert_rules]}`: Comma-separated names of alert rules of monitoring formset.
- `${monitoring_formset[reminders]}`: Comma-separated names of *effective* reminders of monitoring formset.
- `${monitoring_formset[reminder_descriptions]}`: Comma-separated description of *effective* reminders of monitoring formset. Descriptions are human readable representation of the reminder schedule.
- `${monitoring_formset[clinical_parameters]}`: Comma-separated names of clinical parameters of monitoring formset.
- `${monitoring_form[uid]}`: UID of monitoring form.
- `${monitoring_form[effective_name]}`: Name of monitoring form.
- `${monitoring_form[language]}`: Language of monitoring form.
- `${monitoring_form[url]}`: URL of monitoring form.
- `${patient_form[uid]}`: UID of patient-form.
- `${patient_form[language]}`: Language of patient-form.
- `${patient_form[alert_rules]}`: Comma-separated names of *effective* alert rules of patient-form.
- `${patient_form[reminders]}`: Comma-separated names of *effective* reminders of patient-form.
- `${patient_form[reminder_descriptions]}`: Comma-separated description of *effective* reminders of patient-form. Descriptions are human readable representation of the reminder schedule.
- `${patient_form[alertees]}`: Comma-separated values of patient-form's clinicians alertees' names.
- `${patient_form[ics]}`: Comma-separated values of patient-form's clinicians in-charges' names.
- `${patient_form[created_on]}`: Enrollment date of patient-form. Formatted using clinic datetime format string.
- `${patient_form[deactivated_on]}`: Discharge date of patient-form. Formatted using clinic datetime format string.
- `${patient_form[last_submitted_on]}`: Date of most recent submission form. Formatted using clinic datetime format string; `N/A` if not available.
The following variables are available for submission tables (in addition to the variables ☝️)
- `${submission[uid]}`: UID of submission.
- `${submission[created_on]}`: Submission date of submission.
- `${submission_value[<name_with_group>]}`: Submission value for clinical parameter `name_with_group`. Example: `${submission_value[BP Systolic]}`.
- `${submission_value[<uid>]}`: Submission value for clinical parameter with UID `uid`. Example: `${submission_value[xxxxx123456789012345678901234567]}`.
type: string
#end valueTemplate
hrefTemplate:
title: Href Template
description: Template string for `href` of `Link` component. The same variables set as `valueTemplate` is supported.
type: string
#end hrefTemplate
#end properties
#end data
#end properties
#end items
#end columns
#end properties