Widgets

This section documents available dashboard widget types and their configuration options.

Heatmaps

Wards vs Field heatmap

Python class: WardHeatmapWidget

A heatmap widget where top headings are hardcoded for wards. The ward heading provides collapsible department/ward hierarchy.

Configuration Options

Field

Type

Default

Description

field_name (Left axis field) [required]

string

'auditor'

The answers for the selected field will be displayed as row headers.

headings_left_label (Left axis label)

string

''

Allows you to rename the left axis column header.

value_field (Value field name)

string

''

Use a field in the form to generate the table cell values. Only numeric fields are valid. If left blank, compliance is used.

show_empty_rows (Show empty rows)

boolean

False

overall_compliance (Add “Overall compliance” row)

boolean

False

If enabled, a row will be added to the top of the table showing the overall compliance table column.

pivoted (Pivot table)

boolean

False

Wards vs Questions heatmap

Python class: WardQuestionHeatmapWidget

A heatmap mapping each question against each ward. Each cell shows compliance for the ward in context of just that one question. This widget supports only custom fields since they are the only fields that provide compliance information

Example appearance:

💡 Click on Departments to collapse / expand Wards data [Collapse All] [Expand All]

Overall Compliance

Test Department - meg-staff ^

Test Ward

Overall Compliance

80.3% (404/504)

80.3% (404/504)

Desks

89.9% (107/119)

89.9% (107/119)

Phones

50.9%

50.9%

Ethernet wiring

82.0% (100/122)

82.0% (100/122)

Door locked

93.3% (140/150)

93.3% (140/150)

Configuration Options

Field

Type

Default

Description

field_names (Field names) [required]

list

[]

The selected fields will be displayed as row headers. If left blank, all compliance fields will be displayed.

headings_left_label (Left axis label)

string

''

Allows you to rename the left axis column header.

sub_observation (Subform)

string

''

Allows you to filter the compliance fields by subform if field names is left blank.

overall_compliance (Add “Overall compliance” row)

boolean

False

If enabled, a row will be added to the top of the table showing the overall compliance table column.

pivoted (Pivot table)

boolean

False

If enabled, the table will be pivoted such that Wards read top down and the other values read across the top.

select_dynamic_fields (Allow selecting dynamic fields)

boolean

False

Makes the field headings clickable. When a field is clicked, this applies the field as a dynamic filter on other fields in the the dashboard that support it.

show_numerator (Show answer count)

boolean

True

If enabled, show the compliant and total answers count in the form ‘<compliant>/<total>’ beside the percentage, otherwise only the percentage will appear.

Wards vs Subforms heatmap

Python class: WardSubformHeatmapWidget

A heatmap mapping each subform against each ward Each cell shows compliance for the ward in context of single subform

Configuration Options

Field

Type

Default

Description

overall_compliance (Add “Overall compliance” row)

boolean

False

If enabled, a row will be added to the top of the table showing the overall compliance table column.

pivoted (Pivot table)

boolean

False

show_count_on_audit_form (Show answer count)

boolean

True

If enabled, show the compliant and total answers count in the form ‘<compliant>/<total>’ beside the percentage, otherwise only the percentage will appear.

Wards vs Teams heatmap

Python class: WardTeamHeatmapWidget

Configuration Options

Field

Type

Default

Description

team_names (Team names)

list

[]

Select the teams to show data for. If left blank all teams will be displayed.

overall_compliance (Add “Overall compliance” row)

boolean

False

If enabled, a row will be added to the top of the table showing the overall compliance table column.

show_empty_rows (Show empty rows)

boolean

False

pivoted (Pivot table)

boolean

False

If enabled, the table will be pivoted such that Wards read top down and teams read across the top.

Field Comparison Count (heatmap)

Python class: FieldComparisonCountWidget

A field comparison widget that given two fields renders a grid where each cell represents count of each intersecting values from both fields, the background color of each cell can also be customized using static color map attribute

Configuration Options

Field

Type

Default

Description

field_name_top (Top axis field)

string

'ward'

field_name (Left axis field)

string

'auditor'

headings_left_label (Left axis label)

string

''

value_field (Value field name)

string

''

The value for this field will be displayed in each cell.

value_field_aggregator (Value field aggregator)

string

'sum'

How to aggregate values when a numeric value field is selected. If left blank values are summed.

show_empty_rows (Show empty rows)

boolean

False

If enabled will show rows that do not contain any value.

overall_count (Add “Overall count” row)

boolean

False

If enabled will add a row at the top of the table showing the overall count for each column.

static_color_map (Static color map)

list

[]

Example: [{“top_heading”: “Medicine”, “left_heading”: “Low”, “color”: “#FF0000”}]

heatmap (Heatmap)

boolean

None

Shows a heatmap for the range scores.

inverted_heatmap (Inverted heatmap)

boolean

None

Shows a heatmap for the range scores whereby the colours ar inverted; red - high, low - green

Heatmap

Python class: HeatmapWidget

A heatmap widget that given two fields renders a grid where each cell represents average compliance with the corresponding values.

The base implementation takes two fields as the configuration (configured as field_name and field_name_top) And represents compliance for each combination of values in those fields. The selected fields are wrapped in HeatmapField that represents the field, but subclasses of the heatmap can override the behaviour to represent other non-field concepts or models linked by m2m fields.

Configuration options

field_name

name of the field to use as the left heading (rows)

field_name_top

name of the field to use as the top heading (columns)

overall_compliance

whether to add an extra row and column at the ends, summarizing the overall compliance in each serie

pivoted

whether to swap columns/rows (pivot 90°)

value_field

use value from a numeric field instead of compliance

Example configuration json
{
  "pivoted": false,
  "field_name": "audit_form",
  "value_field": "",
  "field_name_top": "ward",
  "show_empty_rows": false,
  "overall_compliance": false,
  "headings_left_label": ""
}
Configuration Options

Field

Type

Default

Description

field_name_top (Top axis field)

string

'ward'

field_name (Left axis field)

string

'auditor'

headings_left_label (Left axis label)

string

''

value_field (Value field name)

string

''

The value for this field will be displayed in each cell.

show_empty_rows (Show empty rows)

boolean

False

If enabled will show rows that do not contain any value.

overall_compliance (Add “Overall compliance” row)

boolean

False

If enabled will add a row at the top of the table showing the overall compliance and total value for the given value field.

show_count (show entries count)

boolean

False

If enabled will add a count of results to each table cell.

Audit Scores

Audit Scores

Python class: AuditScoresWidget

Implemented in Task #25190, A table widget rendering compliance over time, grouped by a specific field (e.g., Department, Institution, or a Custom Field).

This widget aggregates observation compliance percentages and counts for specified time granularities (Day, Month, Year). It supports optional visualizations such as heatmaps for compliance levels and trend indicators.

Key Features:

  • Time-Series Aggregation: Groups data by the configured time granularity.

  • Custom Scoring: Can score by hardcoded fields (Department), custom form fields or subform.

  • Visual Styling: Optional heatmap coloring and trend arrows (up/down).

Example Output:

July 2025

August 2025

September 2025

October 2025

Department

Compliance

Count

Compliance

Count

Compliance

Count

Compliance

Count

Hand Hygiene Dept

0

82.5%

2

78.7% ↓

2

0

Test Department

77.6%

4

83.1% ↑

4

84.2% ↑

4

78.2% ↓

1

Average Score

77.6%

4

82.8% ↑

6

81.5% ↓

6

78.2% ↓

1

Supported Configuration Options:

granularity (str)

The time period to group columns by. Options: 'day', 'month', 'year'. Defaults to 'month'.

score_by (str)

The database field name used to group the rows and calculate compliance scores (e.g., department, institution, or custom field). If form has custom subforms, it’s also possible to score by subform.

Note

when scoring by “subform”, the behaviour changes from grouping observation compliance data, to grouping sub-observation compliance (Subform Compliance)

score_by_label (str)

A custom user-facing label for the first column header (e.g., “Ward” or “Department”).

show_count (bool)

If True, displays a “Count” column next to the “Compliance” column for each time period. Defaults to False.

heatmap (bool)

If True, applies color-coding (CSS classes) to compliance cells based on defined compliance levels.

trend_indicator (bool)

: If True, displays an arrow (↑ or ↓) indicating if the score has increased or decreased compared to the previous period.

show_total (bool)

If True, adds a summary row. Defaults to True.

Note

Totals are recalculated from source data, not column averages.
This ensures accuracy when observations overlap (e.g., multi-choice fields). See Retrieving Compliance Data.
counter_logic (str: “observations” | “audits”)

Defines the logic for the count metric (e.g., counting individual observations vs. audit sessions).

Configuration Options

Field

Type

Default

Description

granularity (Date granularity)

string

'month'

score_by (Score by (field name))

string

None

The field used to calculate the compliance scores for the time period.

score_by_label (Score by (label))

string

None

The user facing label of the compliance score field.

show_count (Show count)

boolean

None

Shows a count of observations for each time period.

heatmap (Heatmap)

boolean

None

Shows a heatmap for the compliance scores.

trend_indicator (Trend Indicator)

boolean

None

Identifies the compliance score trend for each time period.

show_total (Show total)

boolean

True

Shows a total row at the bottom of the table.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

Form Field Scores

Python class: FormFieldScoresWidget

Widget that renders the audit scores of a flat-form in a tabular format Inherits all the regular funtionality from the AuditScoresWidget like granularity, show_count, heatmap & trend_indicatior Also allows the user to specifiy which field names from they form, they would like to include in the scoring A form does not have to be specified in the config, instead the widget will render that form from the widget’s dashboard itself.

The final row shows “Average Score”: average compliance and total count. The average compliance is an average value of all above figures (without accounting for the count). And count is a sum of all the values above.

The Counts represent how many observations have an answer for given question with a value that has compliance data.

Config options:

field_names

Fields to show in the table

granularity

Date granularity for data aggregation

show_count

Whether to show how many times a field was answered with a value that has compliance data (i.e. not null)

heatmap

Whether to colour-code compliance cells based on its value

trend_indicator

Whether to show trend arrow comparing each compliance value with one from previous time bucket

Example appearance:

July 2025

August 2025

September 2025

October 2025

Compliance

Count

Compliance

Count

Compliance

Count

Compliance

Count

Compliance Field 1

0

82.5%

2

78.7% ↓

2

0

Compliance Field 2

77.6%

4

83.1% ↑

4

84.2% ↑

4

78.2% ↓

1

Average Score

77.6%

4

82.8% ↑

6

81.5% ↓

6

78.2% ↓

1

Configuration Options

Field

Type

Default

Description

field_names (Field names)

list

None

The fields to show in the table columns.

granularity (Date granularity)

string

'month'

show_count (Show count)

boolean

None

Shows a count of observations for each time period.

heatmap (Heatmap)

boolean

None

Shows a heatmap for the compliance scores.

trend_indicator (Trend Indicator)

boolean

None

Identifies the compliance score trend for each time period.

Subform Field Scores

Python class: SubformFieldScoresWidget

A widget designed to display compliance trends for individual questions (fields) within a specific subform over time. Originally implemented in Task #30496.

Shows average compliance of question answers within each subform, and count of answers with compliance.

  • Average is not weighted, each answer is considered equally across observations

  • The count shows how many times the question was answered with an answer that has compliance data

The summary row shows “Total Compliance” - it’s a complete re-calculation of the subform’s compliance for the given time period, taking each sub-observation separately and averaging the result. The Count in the summary is the number of observations.

Configuration Options

Field

Type

Default

Description

granularity (Date granularity)

string

'month'

subform (Subform)

string

''

This field will show all the fields within that subform in the table.

show_count (Show count)

boolean

None

Shows a count of observations for each time period.

heatmap (Heatmap)

boolean

None

Shows a heatmap for the compliance scores.

trend_indicator (Trend Indicator)

boolean

None

Identifies the compliance score trend for each time period.

Summary

Compliance

Python class: ComplianceWidget

Configuration Options

Field

Type

Default

Description

show_count (Show count)

boolean

True

If enabled, shows a count of all observations.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

daterange_months (Show month range)

boolean

None

If enabled will display the month range at the bottom of the widget.

field_names (Compliance fields)

list

None

Filters the compliance data by the selected field names. If blank the overall compliance per observation will be used.

team_id (Team)

integer

None

Only calculate compliance for data submitted by the specified team.

show_meg (Show MEG)

boolean

True

If enabled will show a graphic of MEG in the widget.

show_date (Show dates)

boolean

True

If enabled will the date range of the data.

sub_observation (Subform)

string

None

Allows you to filter the compliance fields by subform if field names is left blank.

decimal_places (Decimal places)

integer

None

Number of decimal places to display for compliance percentages.

Simple compliance

Python class: SimpleComplianceWidget

Displays only percentage and MEG face

Configuration Options

Field

Type

Default

Description

show_meg (Show MEG)

boolean

True

decimal_places (Decimal places)

integer

None

Number of decimal places to display for compliance percentages.

Charts

DetailPieChartWidget

Python class: DetailPieChartWidget

gives different values depending on full_size

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The field used to generate the chart data.

limit_number_of_entries_to (Limit entries)

int

None

Optionally limit the number of entries used to generate the chart data.

show_all_others (Show ‘all others’)

boolean

False

Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied.

exclude_zeros (Exclude zeros)

boolean

True

Exclude columns with values of zero

value_color_map (Colors)

list

None

<p>Selects colors to use for the chart, must be a color for each entry. Color can be any hex color e.g., #121212 or one of: black, blue, green, red, yellow, purple, orange, gray, brown, pink, cyan, magenta, white, lime, teal, navy, olive, maroon, silver.</p> <pre><code>[ { “value”: “a”, “color”: “green” }, { “value”: “b”, “color”: “blue” }, { “value”: “c”, “color”: “#000000” }, { “value”: “d”, “color”: “#111” } ]</code></pre>

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

False

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

Pie chart

Python class: PieChartWidget

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The field used to generate the chart data.

limit_number_of_entries_to (Limit entries)

int

None

Optionally limit the number of entries used to generate the chart data.

show_all_others (Show ‘all others’)

boolean

False

Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied.

exclude_zeros (Exclude zeros)

boolean

True

Exclude columns with values of zero

value_color_map (Colors)

list

None

<p>Selects colors to use for the chart, must be a color for each entry. Color can be any hex color e.g., #121212 or one of: black, blue, green, red, yellow, purple, orange, gray, brown, pink, cyan, magenta, white, lime, teal, navy, olive, maroon, silver.</p> <pre><code>[ { “value”: “a”, “color”: “green” }, { “value”: “b”, “color”: “blue” }, { “value”: “c”, “color”: “#000000” }, { “value”: “d”, “color”: “#111” } ]</code></pre>

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

False

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

QIP closure statistics

Python class: QipClosureStatisticsWidget

Pie chart widget showing QIP issues closed on time vs closed late. - Closed on time: completed date <= due date - Closed late: completed date > due date

Only shows closed issues (qipstatus.closed = True)

Configuration Options

Field

Type

Default

Description

issue_level [required]

string

'all'

QIP status

Python class: QipStatusWidget

Configuration Options

Field

Type

Default

Description

issue_level [required]

string

'all'

Ring chart

Python class: RingChartWidget

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The field used to generate the chart data.

limit_number_of_entries_to (Limit entries)

int

None

Optionally limit the number of entries used to generate the chart data.

show_all_others (Show ‘all others’)

boolean

None

Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied.

exclude_zeros (Exclude zeros)

boolean

True

Exclude columns with values of zero

value_color_map (Colors)

list

None

<p>Selects colors to use for the chart, must be a color for each entry. Color can be any hex color e.g., #121212 or one of: black, blue, green, red, yellow, purple, orange, gray, brown, pink, cyan, magenta, white, lime, teal, navy, olive, maroon, silver.</p> <pre><code>[ { “value”: “a”, “color”: “green” }, { “value”: “b”, “color”: “blue” }, { “value”: “c”, “color”: “#000000” }, { “value”: “d”, “color”: “#111” } ]</code></pre>

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

None

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

Scatter chart

Python class: ScatterChartWidget

A scatter chart widget that takes two fields for each axis and renders points based on their relational data.

raises DashboardConfigError:

If x/y field names are not configured.

Configuration Options

Field

Type

Default

Description

x_field_name (X-axis field name)

string

None

y_field_name (Y-axis field name)

string

None

Horizontal Bar chart

Python class: BarChartWidget

A horizontal bar chart widget that displays count of different values of the specified “field_name”. field_name can be a hardcoded audit form field, or a custom field or a related form custom field.

Examples:

Hardcoded field:

{
  "field_name": "ward"
}

Custom field:

{
  "field_name": "test_select"
}

Related form Custom field:

{
  "field_name": "27_patient_name"
}
Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

Specify the field used to generate the bar chart data.

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

max_label_length (Max label length)

integer

70

How long the labels can be before they’re wrapped.

table_percentage_label (Table % label)

string

None

Override the default label displayed in the table for the percentage column.

total_display (Total display)

string

None

Provide a format for the total display beside each item.

show_sample_size (Show sample size)

boolean

False

custom_compliance_levels (Custom compliance levels)

object

[]

<p>Provide custom compliance levels and associated hex colors. For example:</p> <code> [ [0.25, “#838b91”], [0.5, “#e04ad1”], [0.75, “#ebc33f”] ] </code>

Bar chart of calculated field data

Python class: CalculatedFieldBarChartWidget

Bar-chart showing calculated custom field data over time.

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The fields used to generate the chart data.

date_field (Date field)

string

None

Specify a date field to use to group the chart data instead of the default.

operator (Operator)

string

'sum'

The function used to perform the calculation.

format_seconds_to (Format seconds)

string

None

table_data_label (Table percentage label)

string

None

Override the default column header of the data column in the table

Over time (bar chart)

Python class: ComplianceOverTimeBarWidget

A Bar chart widget inheriting characteristics of a line chart to allow showing over-time trend.

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

sub_observations (Subforms)

string

None

Generate chart data for specific subforms. If blank all subforms will be used.

date_field (Date field)

string

None

Specify a date field to use to group the chart data instead of the default.

compliance (Use compliance)

boolean

None

If enabled, compliance data will be used to create the chart.

compliance_line (Show compliance line)

boolean

None

If enabled, a line of compliance data will be added to the chart. Only takes effect when ‘Use compliance’ is disabled.

granularity

string

None

group_data_by (Grouper)

string

None

Specify how the results should be grouped

show_events (Show events)

boolean

None

Shows timeline events relevant to the widget as vertical lines on the chart.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

False

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

DetailBarChartWidget

Python class: DetailBarChartWidget

gives different values depending on full_size

Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

Specify the field used to generate the bar chart data.

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

max_label_length (Max label length)

integer

70

How long the labels can be before they’re wrapped.

table_percentage_label (Table % label)

string

None

Override the default label displayed in the table for the percentage column.

total_display (Total display)

string

None

Provide a format for the total display beside each item.

show_sample_size (Show sample size)

boolean

False

custom_compliance_levels (Custom compliance levels)

object

[]

<p>Provide custom compliance levels and associated hex colors. For example:</p> <code> [ [0.25, “#838b91”], [0.5, “#e04ad1”], [0.75, “#ebc33f”] ] </code>

Bar chart of questions

Python class: FieldBarChartWidget

Bar-chart showing compliance numbers for each field in the audit

Configuration Options

Field

Type

Default

Description

compliance (Use compliance)

boolean

True

If enabled, compliance data will be used to create the bar chart.

field_names (Fields)

string

None

Specify the fields used to generate the bar chart data.

sort_order (Sort order)

string

None

Sort bars by value. If empty, the order will be based on the ‘order’ property of field.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

Multi team bar chart

Python class: MultiTeamBarChartWidget

Configuration Options

Field

Type

Default

Description

department_id (Department)

integer

None

Allows you to filter the data by department.

ward_tags (Ward / department tags)

string

None

Allows you to filter the data by ward and department tags.

filter_teams_with_no_compliance (Exclude teams with no compliance)

boolean

True

If enabled, teams with no compliance data will be excluded.

zero_none_compliance (Show all wards, even if they have no data)

boolean

False

data_label_compliance_none (No compliance label)

string

'0'

Label for categories that have data but no compliance

data_label_compliance_none_desc (No compliance label description)

string

'N/A'

Description for label for categories that have data but no compliance

data_label_entries_none (No entries label)

string

'0'

Data label for categories where data is missing

data_label_entries_none_desc (No entries label description)

string

'no data'

Description for label for categories where data is missing

data_label_compliance_zero (Zero compliance label)

string

'0'

Data label for categories where compliance score is zero

data_label_compliance_zero_desc (Zero compliance label description)

string

'zero compliance'

Description for label for categories where compliance score is zero

Stacked Bar Chart

Python class: StackedBarWidget

Configuration Options

Field

Type

Default

Description

field_names (Fields) [required]

string

None

Specify two fields to generate the chart data.

colors (Colors)

list

None

Specify the colors of the stacked bars.

top_n (TopN)

integer

None

Maximum number of items to show in the chart.

Subform bar chart

Python class: SubformBarChartWidget

Bar chart showing compliance/number of entries in each subform

Configuration Options

Field

Type

Default

Description

compliance (Use compliance)

boolean

True

If enabled, compliance data will be used to create the bar chart.

sub_observations (Subforms)

string

None

Generate chart data for specific subforms. If blank all subforms will be used.

custom_compliance_levels (Custom compliance levels)

object

None

<p>Provide custom compliance levels and associated hex colors. For example:</p> <code> [ [0.25, “#838b91”], [0.5, “#e04ad1”], [0.75, “#ebc33f”] ] </code>

Bar chart of target data

Python class: TargetsBarChartWidget

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

sub_observations (Subforms)

string

None

Generate chart data for specific subforms. If blank all subforms will be used.

date_field (Date field)

string

None

Specify a date field to use to group the chart data instead of the default.

compliance (Use compliance)

boolean

None

If enabled, compliance data will be used to create the chart.

compliance_line (Show compliance line)

boolean

None

If enabled, a line of compliance data will be added to the chart. Only takes effect when ‘Use compliance’ is disabled.

granularity

string

None

group_data_by (Grouper)

string

None

Specify how the results should be grouped

show_events (Show events)

boolean

None

Shows timeline events relevant to the widget as vertical lines on the chart.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

None

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

Value over time (bar chart)

Python class: ValueOverTimeBarWidget

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The fields used to generate the chart data.

date_field (Date field)

string

None

Specify a date field to use to group the chart data instead of the default.

granularity

string

'month'

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

group_data_by (Grouper)

string

None

Specify how the results should be grouped

average (Show average)

boolean

False

If enabled, an average line will be added to the chart.

static_lines (Static series)

object

[]

<p>Specify a hardcoded data series. For example:</p> <code> [ {“color”: “#838b91”, “label”: “First”, “value”: “20”}, {“color”: “#e04ad1”, “label”: “Second”, “value”: “25”}, {“color”: “#ebc33f”, “label”: “Third”, “value”: “30”} ] </code>

Vertical Bar chart

Python class: VerticalBarChartWidget

A vertical bar chart widget that displays count of different values of the specified “field_name”. Has the same functionality as the horizontal bar chart.

Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

Specify the field used to generate the bar chart data.

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

max_label_length (Max label length)

integer

70

How long the labels can be before they’re wrapped.

table_percentage_label (Table % label)

string

None

Override the default label displayed in the table for the percentage column.

total_display (Total display)

string

None

Provide a format for the total display beside each item.

show_sample_size (Show sample size)

boolean

False

custom_compliance_levels (Custom compliance levels)

object

[]

<p>Provide custom compliance levels and associated hex colors. For example:</p> <code> [ [0.25, “#838b91”], [0.5, “#e04ad1”], [0.75, “#ebc33f”] ] </code>

Over time (line chart)

Python class: ComplianceOverTimeWidget

Alias to line chart to allow custom dashboards distinguish it from the regular line chart

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

date_field

string

None

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

Control chart

Python class: ControlChartWidget

Widget for rendering control charts. a control chart is a statistical tool used to monitor a process and detect any unusual variations or trends. It helps ensure that a process remains within the specified limits of variation and maintains its stability.

This Chart will display the provided data along with the mean, upper and lower limits as fixed lines calculated based on the current data.

Accepts compliance, granularity and field names for specific form and renders the chart

Configuration Options

Field

Type

Default

Description

field_name (Field name)

string

None

Calculate data for a specific field. If blank the overall result for each observation will be calculated.

compliance (Use compliance)

boolean

True

If enabled, compliance data will be used to render the control chart. If blank the field answer data will be used.

Line chart

Python class: LineChartWidget

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

date_field

string

None

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

MultiSeriesLineChart

Python class: MultiSeriesLineChart

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

date_field

string

None

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

Trend metric and alert visualizer (line chart)

Python class: TrendMetricVisualizerWidget

Used to either show a real trend metric & alert in action or to create / optimize a trend metric & alert. Default is not to use a real trend metric & alert & to instead use the many options below. If using a real alert ‘value’ & ‘alert_operator’ are ignored. If using a real trend metric ‘field’ to ‘smoothing’ will be ignored.

Very useful to find good values to use for trend metric & alert given your specific data.

Configuration Options

Field

Type

Default

Description

trigger_as_switch (Show trigger as switch)

boolean

True

alert (Alert)

string

None

If this is set Alert value & Alert operator below are ignored.

value (Alert value) [required]

number

0.1

alert_operator (Alert operator) [required]

string

'>'

trend_metric (Trend metric)

string

None

If this is set all below fields are ignored. Trend metric fields used instead.

field (Field) [required]

string

'_count'

Selects the data to use to build time series.

wards (Wards)

list

None

Select the wards to include in the chart.

use_dashboard_wards (Use dashboard wards.)

boolean

False

Allow users to select wards for the chart from the dashboard. Ignores wards selected above. Does not filter on edit page as filters are not availible there.

granularity (Granularity)

string

'day'

series_start_date (Series start date)

string

None

Start date of time series. Use format YYYY-MM-DD HH:MM. Not required.

fast_window (Fast EMA window size)

integer

None

Sets the window size to create the fast EMA of data. Should be between 2 and 100, and lower than the slow window size.

slow_window (Slow ema window size)

integer

None

Sets the window size to create the slow EMA of data. Should be between 10 and 200.

smoothing (Time series smoothing) [required]

integer

3

Smooths the data, useful if data is sparse.

Value over time (line chart)

Python class: ValueOverTimeLineChartWidget

Alias to line chart to allow custom dashboards distinguish it from the regular line chart. Shows integer value changes over time

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The fields used to generate the chart data.

date_field (Date field)

string

None

Specify a date field to use to group the chart data instead of the default.

granularity

string

'month'

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

group_data_by (Grouper)

string

None

Specify how the results should be grouped

average (Show average)

boolean

False

If enabled, an average line will be added to the chart.

static_lines (Static series)

object

[]

<p>Specify a hardcoded data series. For example:</p> <code> [ {“color”: “#838b91”, “label”: “First”, “value”: “20”}, {“color”: “#e04ad1”, “label”: “Second”, “value”: “25”}, {“color”: “#ebc33f”, “label”: “Third”, “value”: “30”} ] </code>

Pareto chart

Python class: ParetoChartWidget

Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

The field to compute chart data for. Only relevant when non compliance is disabled.

non_compliance (Non compliance)

boolean

False

If enabled, chart data is calculated using non compliant answers.

field_names (Non compliance fields)

string

None

When non compliance is enabled, filter the fields used to generate the chart data.

sub_observation (Non compliance subform)

string

None

When non compliance is enabled, filter the fields used to generate the chart data by subform.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

No. of Audits A v No. of Audits B

Python class: PatientTrackerBarChart

Shows number of active / discontinued patients based on number of enrolled (added) minus discontinued entries.

Configuration Options

Field

Type

Default

Description

add_subform (Active subform) [required]

string

None

The subform containing active patients.

remove_subform (Discontinued subform) [required]

string

None

The subform containing discontinued patients.

Field benchmark over time

Python class: BenchmarkOverTimeLineChart

Configuration Options

Field

Type

Default

Description

field_name (Compliance field)

string

None

Used to calculate compliance data for the chart.

field_names (Filterable by)

string

[]

Filter the fields used to generate the chart data.

average (Show average)

boolean

True

Shows an average line based on the chart data.

Compliance Boxplot chart

Python class: ComplianceBoxPlotChartWidget

Widget for displaying observation compliance as a boxplot chart. Accepts granularity and field names for specific form and renders the chart

Configuration Options

Field

Type

Default

Description

field_names (Fields)

list

[]

Filters the compliance data by the selected fields.

QIP

Issue count

Python class: IssueCountWidget

Configuration Options

Field

Type

Default

Description

issue_type

string

'all'

Issues identified table

Python class: IssuesIdentifiedWidget

Renders a table of QIP issues

Configuration Options

Field

Type

Default

Description

columns (Columns)

list

['subform', 'date', 'auditor', 'comment', 'handler', 'room', 'photos']

The properties to be used in rendering the table data.

edit_link (Show ‘edit’ button)

boolean

False

If enabled, an edit link is provided for each table row.

issue_level

string

'all'

Closed issues line chart

Python class: QipLineChartWidget

Configuration Options

Field

Type

Default

Description

issue_level

string

'all'

QIP Bar Chart

Python class: QipBarChartWidget

Configuration Options

Field

Type

Default

Description

field_name

string

'status'

The breakdown field used to generate bars in the chart.

limit (records limit)

integer

20

Limits the number of results used to generate the chart data.

issue_type

string

'all'

QIP Stacked Bar Chart

Python class: QipStackedBarWidget

A Stacked bar chart widget that renders two dimensions of QIP issues. The two fields are configured using field_names config, and the bar chart reflects how many issues ain each category.

For example, to render a bar chart showing a count of issues per ward and per status with customized colours:

{
  "colors": ["green", "orange", "red"],
  "field_names": [
    "ward",
    "status"
  ]
}
Configuration Options

Field

Type

Default

Description

issue_level [required]

string

None

colors (Colors)

list

None

Specify the colors of the stacked bars in a comma separated list like: green,yellow,red.

value_color_map (Value color map)

object

{}

<p>A dictionary mapping a status to a color</p> example <code> { “Open”: “red”, “In progress”: “orange”, “Closed”: “green” } </code>

Qip Pareto chart

Python class: QipParetoChartWidget

Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

The field to compute chart data for. Only relevant when non compliance is disabled.

non_compliance (Non compliance)

boolean

False

If enabled, chart data is calculated using non compliant answers.

field_names (Non compliance fields)

string

None

When non compliance is enabled, filter the fields used to generate the chart data.

sub_observation (Non compliance subform)

string

None

When non compliance is enabled, filter the fields used to generate the chart data by subform.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

Documents

Document count

Python class: DocumentCountWidget

Widget for displaying the count of documents as a number based on the selected status

Configuration Options

Field

Type

Default

Description

status (Status)

string

None

Documents status vs field

Python class: PendingReviewBarChartWidget

Configuration Options

Field

Type

Default

Description

document_field (Field name from Document)

string

'approver'

Chart results are grouped by this field.

status (Status)

string

'pending_approval'

Will only show documents with the selected status.

Tables

Answer table

Python class: AnswerTableWidget

A table widget which displays answers to questions in this Form in a table.

Supported types of columns (definde in field_names): * form fields:

  • hardcoded fields (ward, auditor, etc)

  • hardcoded questions (e.g. hand hygiene form fields)

  • custom fields

Additional columns can be added by enabling various options: * show_numbering - prepends first column with sequence number * edit_link - appends a column with Edit button for each row

Configuration Options

Field

Type

Default

Description

sub_observation (Subform name)

string

None

Only shows observations for the selected subform if selected.

field_names (Field names)

list

None

The fields to show in the table columns.

max_entries (Max entries)

integer

500

The max number of entries the table will display. Choosing a high number will slow down the widget.

ordering_field (Order by)

string

None

The field used to order the results by. If unspecified then results are ordered by the session end date.

highlight_compliance (Highlight based on compliance)

boolean

False

If enabled the table rows will be colored based on the complaince of the observation.

edit_link (Show ‘edit’ button)

boolean

False

If enabled, an edit link is provided for each table row.

show_change_not_viewed_alert (Show changed alert)

boolean

False

If enabled, an alert will be displayed if the observation was changed but not viewed yet.

show_issues (Show answer QIP issues)

boolean

False

If enabled, the number of issues linked with the observation will be displayed. A tooltip will also provide a link to the issues.

latest_review_date (Show Last Review Date)

boolean

False

If enabled and observations are reviewable for the current form, then the latest review date for the observation will be displayed in a column.

next_review_date (Show Next Review Date)

boolean

False

If enabled and observations are reviewable for the current form, then the next review date for the observation will be displayed in a column.

show_review_count (Show Review Count)

boolean

False

If enabled and observations are reviewable for the current form, then a count of reviews will be displayed for each observation.

show_issues_state (Show Issues State)

boolean

False

If enabled and QIP is enabled for the current form, then a count of observation issues will be displayed for each observation.

compliance_rate (Compliance rate filter)

string

''

Filters table rows based on the selected compliance score.

clickable_links (Make links clickable)

boolean

False

If enabled, urls in text columns will be made clickable.

show_numbering (Show numbering)

boolean

False

If enabled, prepends first column with the sequence number.

show_empty_rows (Show empty rows)

boolean

False

If enabled rows that have empty or no data in columns will be displayed.

javascript_searchbar (Inline Searchbar for Public Dashboard view)

boolean

False

If enabled, the widget when viewed on the Public Dashboard will contain a searchbar. Rows in the table that do not contain a partial match (case-insensitive) for the search term will be hidden

Grouped Answer table

Python class: GroupedAnswerTableWidget

Table widget showing any the count for any answer grouped by ward, department or institution

Configuration Options

Field

Type

Default

Description

field_name (Field name) [required]

string

None

The choosen field’s answers will be displayed as table column headers.

group_by (Group by)

string

'ward'

The answers will be grouped and counted by the selected grouper.

LFPSE Answer Table

Python class: LFPSEAnswerTableWidget

An implementation of AnswerTableWidget that displays LFPSE specific columns:

  • lfpse_errors

  • lfpse_reference

Either or none of the LFPSE specific field_names can be included.

Configuration Options

Field

Type

Default

Description

sub_observation (Subform name)

string

None

Only shows observations for the selected subform if selected.

field_names (Field names)

list

None

The fields to show in the table columns.

max_entries (Max entries)

integer

500

The max number of entries the table will display. Choosing a high number will slow down the widget.

ordering_field (Order by)

string

None

The field used to order the results by. If unspecified then results are ordered by the session end date.

highlight_compliance (Highlight based on compliance)

boolean

False

If enabled the table rows will be colored based on the complaince of the observation.

edit_link (Show ‘edit’ button)

boolean

False

If enabled, an edit link is provided for each table row.

show_change_not_viewed_alert (Show changed alert)

boolean

False

If enabled, an alert will be displayed if the observation was changed but not viewed yet.

show_issues (Show answer QIP issues)

boolean

False

If enabled, the number of issues linked with the observation will be displayed. A tooltip will also provide a link to the issues.

latest_review_date (Show Last Review Date)

boolean

False

If enabled and observations are reviewable for the current form, then the latest review date for the observation will be displayed in a column.

next_review_date (Show Next Review Date)

boolean

False

If enabled and observations are reviewable for the current form, then the next review date for the observation will be displayed in a column.

show_review_count (Show Review Count)

boolean

False

If enabled and observations are reviewable for the current form, then a count of reviews will be displayed for each observation.

show_issues_state (Show Issues State)

boolean

False

If enabled and QIP is enabled for the current form, then a count of observation issues will be displayed for each observation.

compliance_rate (Compliance rate filter)

string

''

Filters table rows based on the selected compliance score.

clickable_links (Make links clickable)

boolean

False

If enabled, urls in text columns will be made clickable.

show_numbering (Show numbering)

boolean

False

If enabled, prepends first column with the sequence number.

show_empty_rows (Show empty rows)

boolean

False

If enabled rows that have empty or no data in columns will be displayed.

javascript_searchbar (Inline Searchbar for Public Dashboard view)

boolean

False

If enabled, the widget when viewed on the Public Dashboard will contain a searchbar. Rows in the table that do not contain a partial match (case-insensitive) for the search term will be hidden

Metric over time summary

Python class: MetricOvertimeSummary

Compares the answer values for a specific field of observations for a specific form over time. Groups observations by a text field. Only supports a single form, but will work in an overview dashboard if filtered by form_id. Does not support subforms.

Configuration Options

Field

Type

Default

Description

grouper_field_name (Grouper field) [required]

string

''

Groups the metrics. Only text fields are allowed.

value_field_name (Value field) [required]

string

''

The field who’s answer value is used to compare time periods. Only numeric fields are allowed.

static_color_map (Static Color map)

list

[]

Example: [{“value”: 1, “color”: “#FF0000”}]

Observation email tracking table

Python class: ObservationEmailTrackingTableWidget

Configuration Options

Field

Type

Default

Description

field_names (Field names)

list

None

The fields to show in the table columns.

max_entries (Max entries)

integer

500

The max number of entries the table will display. Choosing a high number will slow down the widget.

Most common issues

Python class: QipCommonIssuesWidget

Table widget showing most common issues by looking at qip.models.Issue objects with most common ‘comment’ value.

Configuration Options

Field

Type

Default

Description

issue_type

string

None

QIP configurable table

Python class: QipConfigurableTableWidget

Table widget allowing issues to be grouped in columns and rows by any field on the issue model, hardcoded or custom.

Implemented in Task #26468

Configuration Options

Field

Type

Default

Description

issue_type

string

'all'

column_field (Column Field)

string

'qipstatus'

Generates column headers based on the chosen field.

row_field (Row Field)

string

'ward'

Generates row headers based on the chosen field.

Time Tracking

Python class: TimeTrackingTableWidget

An answer table which only shows observations which have had specific actions performed on them. A column is prepended to the table data to show the time taken for the action to be performed.

Widget implemented in Task #24426

Example configuration:

{
    "start_time": {"time_viewed": ""},
    "end_time": {"int_field": 20},
    "metric_verb": "Updated"
}
start_time

The time that a particular action was performed on an observation. This can be when it was created, updated, viewed, reviewed, or updated with a particular field/answer combination.

end_time

The time that a particular action was performed on an observation. This can be when it was created, updated, viewed, reviewed, or updated with a particular field/answer combination.

metric_verb

Used in the widget frontend to describe the activity that’s being tracked. The default is “Viewed” (the time taken to view an observation after creation).

Possible values for start_time and end_time:

  • {"time_created": ""} The time that the observation was created.

  • {"time_viewed": ""} The first time the observation was viewed by anybody.

  • {"time_changed": ""} The first time that the observation was changed by anybody.

  • {"time_reviewed": ""} The first time that the observation was reviewed by anybody.

  • {"field_name": "answer"} The first time that the observation was updated with a particular field/answer combination.

Configuration Options

Field

Type

Default

Description

sub_observation (Subform name)

string

None

Only shows observations for the selected subform if selected.

field_names (Field names)

list

None

The fields to show in the table columns.

max_entries (Max entries)

integer

None

The max number of entries the table will display. Choosing a high number will slow down the widget.

ordering_field (Order by)

string

None

The field used to order the results by. If unspecified then results are ordered by the session end date.

highlight_compliance (Highlight based on compliance)

boolean

None

If enabled the table rows will be colored based on the complaince of the observation.

edit_link (Show ‘edit’ button)

boolean

False

If enabled, an edit link is provided for each table row.

show_change_not_viewed_alert (Show changed alert)

boolean

None

If enabled, an alert will be displayed if the observation was changed but not viewed yet.

show_issues (Show answer QIP issues)

boolean

None

If enabled, the number of issues linked with the observation will be displayed. A tooltip will also provide a link to the issues.

latest_review_date (Show Last Review Date)

boolean

None

If enabled and observations are reviewable for the current form, then the latest review date for the observation will be displayed in a column.

next_review_date (Show Next Review Date)

boolean

None

If enabled and observations are reviewable for the current form, then the next review date for the observation will be displayed in a column.

show_review_count (Show Review Count)

boolean

None

If enabled and observations are reviewable for the current form, then a count of reviews will be displayed for each observation.

show_issues_state (Show Issues State)

boolean

None

If enabled and QIP is enabled for the current form, then a count of observation issues will be displayed for each observation.

compliance_rate (Compliance rate filter)

string

None

Filters table rows based on the selected compliance score.

clickable_links (Make links clickable)

boolean

None

If enabled, urls in text columns will be made clickable.

show_numbering (Show numbering)

boolean

None

If enabled, prepends first column with the sequence number.

show_empty_rows (Show empty rows)

boolean

None

If enabled rows that have empty or no data in columns will be displayed.

javascript_searchbar (Inline Searchbar for Public Dashboard view)

boolean

None

If enabled, the widget when viewed on the Public Dashboard will contain a searchbar. Rows in the table that do not contain a partial match (case-insensitive) for the search term will be hidden

Department compliance table

Python class: DepartmentComplianceWidget

Configuration Options

Field

Type

Default

Description

field_name (Lowest compliance field)

string

None

If specified, adds a column to the table showing the lowest compliance value in the row’s dataset for this field.

field_names (Compliance fields)

string

None

Filter the fields used to calculate the compliance data.

compliance_rate (Compliance rate filter)

string

None

Filters table rows based on the selected compliance score.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

Ward compliance table

Python class: WardComplianceWidget

Configuration Options

Field

Type

Default

Description

field_name (Lowest compliance field)

string

None

If specified, adds a column to the table showing the lowest compliance value in the row’s dataset for this field.

field_names (Compliance fields)

string

None

Filter the fields used to calculate the compliance data.

compliance_rate (Compliance rate filter)

string

None

Filters table rows based on the selected compliance score.

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

Question compliance table

Python class: QuestionComplianceTableWidget

Configuration Options

Field

Type

Default

Description

compliance_rate (Compliance level)

string

None

Only show question compliance data for the specified compliance level.

field_names (Questions)

string

None

Specify a list of questions used to generate the data.

sub_observation (Subform)

string

None

Filter questions by subform.

issue_level [required]

string

'all'

show_actual_value (Show actual value)

boolean

None

If enabled, shows the answer value alongside the compliance data.

KPI Targets

Python class: KpiTableWidget

Key Performance Indicators widget. Allows configuration to define target compliance for each field and render table showing field by quarter heatmap representing compliance (or average value of the field) for given quarter and whether target was met.

Implemented in Task #23977

Example config:

{
  "granularity": "quarter",
  "targets": {
    "desks": 0.8,
    "phones": 0.5,
    "ethernet_wiring": 0.2
  },
  "target_margin": 0.1,
  "less_than_targets": [
    "ethernet_wiring"
  ]
}
targets

dictionary; maps field name to a target compliance (0.0 - 1.0 range). field name can be any field with compliance data, or a numeric field (int or float).

target_margin

float; Target will be marked as “met” (in orange) if within this margin. This value should be in 0.0-1.0 range.

target_margin_per_field

dictionary; maps field name to a target margin.

less_than_targets

list of field names where the target is to be below specified value.

use_compliance

If False, then field answer data is used for KPI calculation for all fields. If True and the field has compliance, the compliance data is used. This is the default behavior.

Configuration Options

Field

Type

Default

Description

targets (Targets)

object

{}

Specify the targets for each field.

target_margin (Target margin)

number

0.1

Target will be marked as “met” (in orange) if within this margin.

target_margin_per_field (Target margin per field)

object

{}

Specify a different target margin for each field.

less_than_targets (Less than fields)

list

None

A list of fields where the target is to be below the specified value.

use_compliance (Use compliance)

boolean

True

If unticked, then field answer data is used for KPI calculation for all fields. If ticked and the field has compliance, the compliance data is used.

Time Tracking Matrix Table

Python class: TimeTrackingMatrixTableWidget

A table widget that displays average time tracking metrics in a matrix format. Each cell shows the average time taken for observations that match both the x-axis and y-axis field values.

This widget consolidates multiple TimeTrackingSummaryWidgets into a single table view, improving dashboard performance and readability.

Example configuration:

{
    "x_axis": "incident_category",
    "y_axis": "reviewer",
    "start_time_type": "time_created",
    "end_time_type": "field_value",
    "end_time_field": "is_review_completed",
    "end_time_value": "Yes",
    "metric_verb": "Reviewed"
}
x_axis

Field name to use for table columns. Specify as a string containing the field name (e.g., "incident_category"). Can be a custom field or model field.

y_axis

Field name to use for table rows. Specify as a string containing the field name (e.g., "reviewer"). Can be a custom field or model field. To swap rows and columns, simply swap x_axis and y_axis values.

start_time_type

When to start tracking time. Options: time_created, time_viewed, time_changed, time_reviewed, or field_value for custom field tracking.

start_time_field

Field name for custom start time (only used when start_time_type is field_value).

start_time_value

Field value for custom start time (only used when start_time_type is field_value).

end_time_type

When to stop tracking time. Same options as start_time_type.

end_time_field

Field name for custom end time (only used when end_time_type is field_value).

end_time_value

Field value for custom end time (only used when end_time_type is field_value).

metric_verb

Describes the activity being tracked (e.g., "Reviewed", "Completed").

Configuration Options

Field

Type

Default

Description

x_axis (X-axis field (columns)) [required]

string

None

Field to use for table columns. Each unique value becomes a column.

y_axis (Y-axis field (rows)) [required]

string

None

Field to use for table rows. Each unique value becomes a row. To swap rows and columns, swap x_axis and y_axis values.

start_time_type (Start time) [required]

string

'time_created'

When to start tracking time.

start_time_field (Start time field)

string

None

Field name for custom start time (only used when “Field set to value” is selected).

start_time_value (Start time value)

string

None

Field value for custom start time (only used when “Field set to value” is selected).

end_time_type (End time) [required]

string

'time_viewed'

When to stop tracking time.

end_time_field (End time field)

string

None

Field name for custom end time (only used when “Field set to value” is selected).

end_time_value (End time value)

string

None

Field value for custom end time (only used when “Field set to value” is selected).

metric_verb (Metric verb)

string

'Reviewed'

Describes the activity being tracked (e.g., “Reviewed”, “Completed”).

Comments

Subform comments

Python class: CommentsWidget

Renders text answers in subobservations. Works with hardcoded subform audits like HIQA

Configuration Options

Field

Type

Default

Description

subform_name (Subform) [required]

string

None

The subform containing comments to be rendered.

Comments

Python class: GenericCommentsWidget

Widget displaying comments in sessions or observations. Accepts queryset and name of the comment field and renders comments with author name. Widget becomes invisible if there are no comments.

Only displays comments of hardcoded model fields like AuditSession.comments, or HandHygieneAuditObservation.comments, or CustomObservation.custom_answers__comments. Can’t display CustomObservation.generic_comments despite the name.

Configuration Options

Field

Type

Default

Description

field_name (Comment question) [required]

string

'comments'

The question containing comments. This widget does not display the list of comments on the review page.

byline_fields (Byline fields)

list

['auditor']

Specify the fields used to add data to the byline.

max_items (Max items)

int

10

The max number of comments to show in the widget. Leave blank to show all comments.

Session comments

Python class: SessionCommentsWidget

Configuration Options

Field

Type

Default

Description

byline_fields (Byline fields)

list

['auditor']

Specify the fields used to add data to the byline.

max_items (Max items)

int

10

The max number of comments to show in the widget. Leave blank to show all comments.

Analytics

Analytics bar chart

Python class: AnalyticsCountsBarChartWidget

Bar chart showing view count. Can be configured to show counts per institution, content type or object instances.

Configuration Options

Field

Type

Default

Description

field_name (Field)

string

None

Specify the field used to generate the bar chart data.

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

compliance_threshold (Compliance threshold)

string

None

If specified, only shows values greater than or equal to the threshold.

limit_number_of_entries_to (Limit)

integer

None

If specified, limits the number of entries used to generate the chart data.

max_label_length (Max label length)

integer

70

How long the labels can be before they’re wrapped.

table_percentage_label (Table % label)

string

None

Override the default label displayed in the table for the percentage column.

total_display (Total display)

string

None

Provide a format for the total display beside each item.

show_sample_size (Show sample size)

boolean

False

custom_compliance_levels (Custom compliance levels)

object

[]

<p>Provide custom compliance levels and associated hex colors. For example:</p> <code> [ [0.25, “#838b91”], [0.5, “#e04ad1”], [0.75, “#ebc33f”] ] </code>

Analytics over time line chart

Python class: AnalyticsOverTimeWidget

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

date_field

string

None

compliance (Use compliance)

boolean

False

If enabled, compliance data will be used to create the chart.

show_events (Show events)

boolean

False

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.

Analytics tags pie chart

Python class: AnalyticsTagsPieChartWidget

Configuration Options

Field

Type

Default

Description

field_name (Field) [required]

string

None

The field used to generate the chart data.

limit_number_of_entries_to (Limit entries)

int

None

Optionally limit the number of entries used to generate the chart data.

show_all_others (Show ‘all others’)

boolean

False

Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied.

exclude_zeros (Exclude zeros)

boolean

True

Exclude columns with values of zero

value_color_map (Colors)

list

None

<p>Selects colors to use for the chart, must be a color for each entry. Color can be any hex color e.g., #121212 or one of: black, blue, green, red, yellow, purple, orange, gray, brown, pink, cyan, magenta, white, lime, teal, navy, olive, maroon, silver.</p> <pre><code>[ { “value”: “a”, “color”: “green” }, { “value”: “b”, “color”: “blue” }, { “value”: “c”, “color”: “#000000” }, { “value”: “d”, “color”: “#111” } ]</code></pre>

counter_logic (Counter logic)

string

'observations'

Defines how results are counted. Choose whether to count every individual observation or each unique submission only once.

dynamic_filtering (Dynamic filtering)

boolean

False

Allows a user to dynamically change the display field in the dashboard without needing to change and save the widgets config.

Net Promoter Score

Net promoter score over time chart

Python class: NetPromoterScoreOverTimeWidget

Widget for displaying NPS over time in dashboards. NPS = Total % of promoters – total % of detractors

Configuration Options

Field

Type

Default

Description

field_names (Fields)

string

None

Filter the fields used to generate the chart data.

date_field

string

None

compliance (Use compliance)

boolean

None

If enabled, compliance data will be used to create the chart.

show_events (Show events)

boolean

None

Shows timeline events relevant to the widget as vertical lines on the chart.

extra_dataset (Extra dataset)

string

None

Add an extra dataset to the line chart.