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.
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Left axis field) [required] |
|
|
The answers for the selected field will be displayed as row headers. |
headings_left_label (Left axis label) |
|
|
Allows you to rename the left axis column header. |
value_field (Value field name) |
|
|
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) |
|
|
|
overall_compliance (Add “Overall compliance” row) |
|
|
If enabled, a row will be added to the top of the table showing the overall compliance table column. |
pivoted (Pivot table) |
|
|
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) |
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Field names) [required] |
|
|
The selected fields will be displayed as row headers. If left blank, all compliance fields will be displayed. |
headings_left_label (Left axis label) |
|
|
Allows you to rename the left axis column header. |
sub_observation (Subform) |
|
|
Allows you to filter the compliance fields by subform if field names is left blank. |
overall_compliance (Add “Overall compliance” row) |
|
|
If enabled, a row will be added to the top of the table showing the overall compliance table column. |
pivoted (Pivot table) |
|
|
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) |
|
|
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) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
overall_compliance (Add “Overall compliance” row) |
|
|
If enabled, a row will be added to the top of the table showing the overall compliance table column. |
pivoted (Pivot table) |
|
|
|
show_count_on_audit_form (Show answer count) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
team_names (Team names) |
|
|
Select the teams to show data for. If left blank all teams will be displayed. |
overall_compliance (Add “Overall compliance” row) |
|
|
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) |
|
|
|
pivoted (Pivot table) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name_top (Top axis field) |
|
|
|
field_name (Left axis field) |
|
|
|
headings_left_label (Left axis label) |
|
|
|
value_field (Value field name) |
|
|
The value for this field will be displayed in each cell. |
value_field_aggregator (Value field aggregator) |
|
|
How to aggregate values when a numeric value field is selected. If left blank values are summed. |
show_empty_rows (Show empty rows) |
|
|
If enabled will show rows that do not contain any value. |
overall_count (Add “Overall count” row) |
|
|
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) |
|
|
Example: [{“top_heading”: “Medicine”, “left_heading”: “Low”, “color”: “#FF0000”}] |
heatmap (Heatmap) |
|
|
Shows a heatmap for the range scores. |
inverted_heatmap (Inverted heatmap) |
|
|
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
{
"pivoted": false,
"field_name": "audit_form",
"value_field": "",
"field_name_top": "ward",
"show_empty_rows": false,
"overall_compliance": false,
"headings_left_label": ""
}
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name_top (Top axis field) |
|
|
|
field_name (Left axis field) |
|
|
|
headings_left_label (Left axis label) |
|
|
|
value_field (Value field name) |
|
|
The value for this field will be displayed in each cell. |
show_empty_rows (Show empty rows) |
|
|
If enabled will show rows that do not contain any value. |
overall_compliance (Add “Overall compliance” row) |
|
|
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) |
|
|
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 toFalse.- 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 toTrue.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).
Field |
Type |
Default |
Description |
|---|---|---|---|
granularity (Date granularity) |
|
|
|
score_by (Score by (field name)) |
|
|
The field used to calculate the compliance scores for the time period. |
score_by_label (Score by (label)) |
|
|
The user facing label of the compliance score field. |
show_count (Show count) |
|
|
Shows a count of observations for each time period. |
heatmap (Heatmap) |
|
|
Shows a heatmap for the compliance scores. |
trend_indicator (Trend Indicator) |
|
|
Identifies the compliance score trend for each time period. |
show_total (Show total) |
|
|
Shows a total row at the bottom of the table. |
counter_logic (Counter logic) |
|
|
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 |
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Field names) |
|
|
The fields to show in the table columns. |
granularity (Date granularity) |
|
|
|
show_count (Show count) |
|
|
Shows a count of observations for each time period. |
heatmap (Heatmap) |
|
|
Shows a heatmap for the compliance scores. |
trend_indicator (Trend Indicator) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
granularity (Date granularity) |
|
|
|
subform (Subform) |
|
|
This field will show all the fields within that subform in the table. |
show_count (Show count) |
|
|
Shows a count of observations for each time period. |
heatmap (Heatmap) |
|
|
Shows a heatmap for the compliance scores. |
trend_indicator (Trend Indicator) |
|
|
Identifies the compliance score trend for each time period. |
Summary
Compliance
Python class: ComplianceWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
show_count (Show count) |
|
|
If enabled, shows a count of all observations. |
counter_logic (Counter logic) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
daterange_months (Show month range) |
|
|
If enabled will display the month range at the bottom of the widget. |
field_names (Compliance fields) |
|
|
Filters the compliance data by the selected field names. If blank the overall compliance per observation will be used. |
team_id (Team) |
|
|
Only calculate compliance for data submitted by the specified team. |
show_meg (Show MEG) |
|
|
If enabled will show a graphic of MEG in the widget. |
show_date (Show dates) |
|
|
If enabled will the date range of the data. |
sub_observation (Subform) |
|
|
Allows you to filter the compliance fields by subform if field names is left blank. |
decimal_places (Decimal places) |
|
|
Number of decimal places to display for compliance percentages. |
Simple compliance
Python class: SimpleComplianceWidget
Displays only percentage and MEG face
Field |
Type |
Default |
Description |
|---|---|---|---|
show_meg (Show MEG) |
|
|
|
decimal_places (Decimal places) |
|
|
Number of decimal places to display for compliance percentages. |
Charts
DetailPieChartWidget
Python class: DetailPieChartWidget
gives different values depending on full_size
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The field used to generate the chart data. |
limit_number_of_entries_to (Limit entries) |
|
|
Optionally limit the number of entries used to generate the chart data. |
show_all_others (Show ‘all others’) |
|
|
Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied. |
exclude_zeros (Exclude zeros) |
|
|
Exclude columns with values of zero |
value_color_map (Colors) |
|
|
<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) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
dynamic_filtering (Dynamic filtering) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The field used to generate the chart data. |
limit_number_of_entries_to (Limit entries) |
|
|
Optionally limit the number of entries used to generate the chart data. |
show_all_others (Show ‘all others’) |
|
|
Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied. |
exclude_zeros (Exclude zeros) |
|
|
Exclude columns with values of zero |
value_color_map (Colors) |
|
|
<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) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
dynamic_filtering (Dynamic filtering) |
|
|
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)
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_level [required] |
|
|
QIP status
Python class: QipStatusWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_level [required] |
|
|
Ring chart
Python class: RingChartWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The field used to generate the chart data. |
limit_number_of_entries_to (Limit entries) |
|
|
Optionally limit the number of entries used to generate the chart data. |
show_all_others (Show ‘all others’) |
|
|
Adds an ‘All others’ segment to the chart that sums up the removed data when ‘Limit entries’ is applied. |
exclude_zeros (Exclude zeros) |
|
|
Exclude columns with values of zero |
value_color_map (Colors) |
|
|
<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) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
dynamic_filtering (Dynamic filtering) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
x_field_name (X-axis field name) |
|
|
|
y_field_name (Y-axis field name) |
|
|
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"
}
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
Specify the field used to generate the bar chart data. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_threshold (Compliance threshold) |
|
|
If specified, only shows values greater than or equal to the threshold. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
max_label_length (Max label length) |
|
|
How long the labels can be before they’re wrapped. |
table_percentage_label (Table % label) |
|
|
Override the default label displayed in the table for the percentage column. |
total_display (Total display) |
|
|
Provide a format for the total display beside each item. |
show_sample_size (Show sample size) |
|
|
|
custom_compliance_levels (Custom compliance levels) |
|
|
<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.
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The fields used to generate the chart data. |
date_field (Date field) |
|
|
Specify a date field to use to group the chart data instead of the default. |
operator (Operator) |
|
|
The function used to perform the calculation. |
format_seconds_to (Format seconds) |
|
|
|
table_data_label (Table percentage label) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
sub_observations (Subforms) |
|
|
Generate chart data for specific subforms. If blank all subforms will be used. |
date_field (Date field) |
|
|
Specify a date field to use to group the chart data instead of the default. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_line (Show compliance line) |
|
|
If enabled, a line of compliance data will be added to the chart. Only takes effect when ‘Use compliance’ is disabled. |
granularity |
|
|
|
group_data_by (Grouper) |
|
|
Specify how the results should be grouped |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
counter_logic (Counter logic) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
dynamic_filtering (Dynamic filtering) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
Specify the field used to generate the bar chart data. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_threshold (Compliance threshold) |
|
|
If specified, only shows values greater than or equal to the threshold. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
max_label_length (Max label length) |
|
|
How long the labels can be before they’re wrapped. |
table_percentage_label (Table % label) |
|
|
Override the default label displayed in the table for the percentage column. |
total_display (Total display) |
|
|
Provide a format for the total display beside each item. |
show_sample_size (Show sample size) |
|
|
|
custom_compliance_levels (Custom compliance levels) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the bar chart. |
field_names (Fields) |
|
|
Specify the fields used to generate the bar chart data. |
sort_order (Sort order) |
|
|
Sort bars by value. If empty, the order will be based on the ‘order’ property of field. |
counter_logic (Counter logic) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
department_id (Department) |
|
|
Allows you to filter the data by department. |
ward_tags (Ward / department tags) |
|
|
Allows you to filter the data by ward and department tags. |
filter_teams_with_no_compliance (Exclude teams with no compliance) |
|
|
If enabled, teams with no compliance data will be excluded. |
zero_none_compliance (Show all wards, even if they have no data) |
|
|
|
data_label_compliance_none (No compliance label) |
|
|
Label for categories that have data but no compliance |
data_label_compliance_none_desc (No compliance label description) |
|
|
Description for label for categories that have data but no compliance |
data_label_entries_none (No entries label) |
|
|
Data label for categories where data is missing |
data_label_entries_none_desc (No entries label description) |
|
|
Description for label for categories where data is missing |
data_label_compliance_zero (Zero compliance label) |
|
|
Data label for categories where compliance score is zero |
data_label_compliance_zero_desc (Zero compliance label description) |
|
|
Description for label for categories where compliance score is zero |
Stacked Bar Chart
Python class: StackedBarWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) [required] |
|
|
Specify two fields to generate the chart data. |
colors (Colors) |
|
|
Specify the colors of the stacked bars. |
top_n (TopN) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the bar chart. |
sub_observations (Subforms) |
|
|
Generate chart data for specific subforms. If blank all subforms will be used. |
custom_compliance_levels (Custom compliance levels) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
sub_observations (Subforms) |
|
|
Generate chart data for specific subforms. If blank all subforms will be used. |
date_field (Date field) |
|
|
Specify a date field to use to group the chart data instead of the default. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_line (Show compliance line) |
|
|
If enabled, a line of compliance data will be added to the chart. Only takes effect when ‘Use compliance’ is disabled. |
granularity |
|
|
|
group_data_by (Grouper) |
|
|
Specify how the results should be grouped |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
counter_logic (Counter logic) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
dynamic_filtering (Dynamic filtering) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The fields used to generate the chart data. |
date_field (Date field) |
|
|
Specify a date field to use to group the chart data instead of the default. |
granularity |
|
|
|
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
Add an extra dataset to the line chart. |
group_data_by (Grouper) |
|
|
Specify how the results should be grouped |
average (Show average) |
|
|
If enabled, an average line will be added to the chart. |
static_lines (Static series) |
|
|
<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.
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
Specify the field used to generate the bar chart data. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_threshold (Compliance threshold) |
|
|
If specified, only shows values greater than or equal to the threshold. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
max_label_length (Max label length) |
|
|
How long the labels can be before they’re wrapped. |
table_percentage_label (Table % label) |
|
|
Override the default label displayed in the table for the percentage column. |
total_display (Total display) |
|
|
Provide a format for the total display beside each item. |
show_sample_size (Show sample size) |
|
|
|
custom_compliance_levels (Custom compliance levels) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
date_field |
|
|
|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field name) |
|
|
Calculate data for a specific field. If blank the overall result for each observation will be calculated. |
compliance (Use compliance) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
date_field |
|
|
|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
Add an extra dataset to the line chart. |
MultiSeriesLineChart
Python class: MultiSeriesLineChart
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
date_field |
|
|
|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
trigger_as_switch (Show trigger as switch) |
|
|
|
alert (Alert) |
|
|
If this is set Alert value & Alert operator below are ignored. |
value (Alert value) [required] |
|
|
|
alert_operator (Alert operator) [required] |
|
|
|
trend_metric (Trend metric) |
|
|
If this is set all below fields are ignored. Trend metric fields used instead. |
field (Field) [required] |
|
|
Selects the data to use to build time series. |
wards (Wards) |
|
|
Select the wards to include in the chart. |
use_dashboard_wards (Use dashboard wards.) |
|
|
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) |
|
|
|
series_start_date (Series start date) |
|
|
Start date of time series. Use format YYYY-MM-DD HH:MM. Not required. |
fast_window (Fast EMA window size) |
|
|
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) |
|
|
Sets the window size to create the slow EMA of data. Should be between 10 and 200. |
smoothing (Time series smoothing) [required] |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) [required] |
|
|
The fields used to generate the chart data. |
date_field (Date field) |
|
|
Specify a date field to use to group the chart data instead of the default. |
granularity |
|
|
|
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
Add an extra dataset to the line chart. |
group_data_by (Grouper) |
|
|
Specify how the results should be grouped |
average (Show average) |
|
|
If enabled, an average line will be added to the chart. |
static_lines (Static series) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
The field to compute chart data for. Only relevant when non compliance is disabled. |
non_compliance (Non compliance) |
|
|
If enabled, chart data is calculated using non compliant answers. |
field_names (Non compliance fields) |
|
|
When non compliance is enabled, filter the fields used to generate the chart data. |
sub_observation (Non compliance subform) |
|
|
When non compliance is enabled, filter the fields used to generate the chart data by subform. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
compliance_threshold (Compliance threshold) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
add_subform (Active subform) [required] |
|
|
The subform containing active patients. |
remove_subform (Discontinued subform) [required] |
|
|
The subform containing discontinued patients. |
Field benchmark over time
Python class: BenchmarkOverTimeLineChart
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Compliance field) |
|
|
Used to calculate compliance data for the chart. |
field_names (Filterable by) |
|
|
Filter the fields used to generate the chart data. |
average (Show average) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filters the compliance data by the selected fields. |
QIP
Issue count
Python class: IssueCountWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_type |
|
|
Issues identified table
Python class: IssuesIdentifiedWidget
Renders a table of QIP issues
Field |
Type |
Default |
Description |
|---|---|---|---|
columns (Columns) |
|
|
The properties to be used in rendering the table data. |
edit_link (Show ‘edit’ button) |
|
|
If enabled, an edit link is provided for each table row. |
issue_level |
|
|
Closed issues line chart
Python class: QipLineChartWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_level |
|
|
QIP Bar Chart
Python class: QipBarChartWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name |
|
|
The breakdown field used to generate bars in the chart. |
limit (records limit) |
|
|
Limits the number of results used to generate the chart data. |
issue_type |
|
|
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"
]
}
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_level [required] |
|
|
|
colors (Colors) |
|
|
Specify the colors of the stacked bars in a comma separated list like: green,yellow,red. |
value_color_map (Value color map) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
The field to compute chart data for. Only relevant when non compliance is disabled. |
non_compliance (Non compliance) |
|
|
If enabled, chart data is calculated using non compliant answers. |
field_names (Non compliance fields) |
|
|
When non compliance is enabled, filter the fields used to generate the chart data. |
sub_observation (Non compliance subform) |
|
|
When non compliance is enabled, filter the fields used to generate the chart data by subform. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
compliance_threshold (Compliance threshold) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
status (Status) |
|
|
Documents status vs field
Python class: PendingReviewBarChartWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
document_field (Field name from Document) |
|
|
Chart results are grouped by this field. |
status (Status) |
|
|
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
- computed fields (represented by
dashboard_widgets.widgets.table.TableField) compliance
- computed fields (represented by
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
Field |
Type |
Default |
Description |
|---|---|---|---|
sub_observation (Subform name) |
|
|
Only shows observations for the selected subform if selected. |
field_names (Field names) |
|
|
The fields to show in the table columns. |
max_entries (Max entries) |
|
|
The max number of entries the table will display. Choosing a high number will slow down the widget. |
ordering_field (Order by) |
|
|
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) |
|
|
If enabled the table rows will be colored based on the complaince of the observation. |
edit_link (Show ‘edit’ button) |
|
|
If enabled, an edit link is provided for each table row. |
show_change_not_viewed_alert (Show changed alert) |
|
|
If enabled, an alert will be displayed if the observation was changed but not viewed yet. |
show_issues (Show answer QIP issues) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
Filters table rows based on the selected compliance score. |
clickable_links (Make links clickable) |
|
|
If enabled, urls in text columns will be made clickable. |
show_numbering (Show numbering) |
|
|
If enabled, prepends first column with the sequence number. |
show_empty_rows (Show empty rows) |
|
|
If enabled rows that have empty or no data in columns will be displayed. |
javascript_searchbar (Inline Searchbar for Public Dashboard view) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field name) [required] |
|
|
The choosen field’s answers will be displayed as table column headers. |
group_by (Group by) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
sub_observation (Subform name) |
|
|
Only shows observations for the selected subform if selected. |
field_names (Field names) |
|
|
The fields to show in the table columns. |
max_entries (Max entries) |
|
|
The max number of entries the table will display. Choosing a high number will slow down the widget. |
ordering_field (Order by) |
|
|
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) |
|
|
If enabled the table rows will be colored based on the complaince of the observation. |
edit_link (Show ‘edit’ button) |
|
|
If enabled, an edit link is provided for each table row. |
show_change_not_viewed_alert (Show changed alert) |
|
|
If enabled, an alert will be displayed if the observation was changed but not viewed yet. |
show_issues (Show answer QIP issues) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
Filters table rows based on the selected compliance score. |
clickable_links (Make links clickable) |
|
|
If enabled, urls in text columns will be made clickable. |
show_numbering (Show numbering) |
|
|
If enabled, prepends first column with the sequence number. |
show_empty_rows (Show empty rows) |
|
|
If enabled rows that have empty or no data in columns will be displayed. |
javascript_searchbar (Inline Searchbar for Public Dashboard view) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
grouper_field_name (Grouper field) [required] |
|
|
Groups the metrics. Only text fields are allowed. |
value_field_name (Value field) [required] |
|
|
The field who’s answer value is used to compare time periods. Only numeric fields are allowed. |
static_color_map (Static Color map) |
|
|
Example: [{“value”: 1, “color”: “#FF0000”}] |
Observation email tracking table
Python class: ObservationEmailTrackingTableWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Field names) |
|
|
The fields to show in the table columns. |
max_entries (Max entries) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_type |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
issue_type |
|
|
|
column_field (Column Field) |
|
|
Generates column headers based on the chosen field. |
row_field (Row Field) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
sub_observation (Subform name) |
|
|
Only shows observations for the selected subform if selected. |
field_names (Field names) |
|
|
The fields to show in the table columns. |
max_entries (Max entries) |
|
|
The max number of entries the table will display. Choosing a high number will slow down the widget. |
ordering_field (Order by) |
|
|
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) |
|
|
If enabled the table rows will be colored based on the complaince of the observation. |
edit_link (Show ‘edit’ button) |
|
|
If enabled, an edit link is provided for each table row. |
show_change_not_viewed_alert (Show changed alert) |
|
|
If enabled, an alert will be displayed if the observation was changed but not viewed yet. |
show_issues (Show answer QIP issues) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
Filters table rows based on the selected compliance score. |
clickable_links (Make links clickable) |
|
|
If enabled, urls in text columns will be made clickable. |
show_numbering (Show numbering) |
|
|
If enabled, prepends first column with the sequence number. |
show_empty_rows (Show empty rows) |
|
|
If enabled rows that have empty or no data in columns will be displayed. |
javascript_searchbar (Inline Searchbar for Public Dashboard view) |
|
|
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Lowest compliance field) |
|
|
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) |
|
|
Filter the fields used to calculate the compliance data. |
compliance_rate (Compliance rate filter) |
|
|
Filters table rows based on the selected compliance score. |
counter_logic (Counter logic) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
Ward compliance table
Python class: WardComplianceWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Lowest compliance field) |
|
|
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) |
|
|
Filter the fields used to calculate the compliance data. |
compliance_rate (Compliance rate filter) |
|
|
Filters table rows based on the selected compliance score. |
counter_logic (Counter logic) |
|
|
Defines how results are counted. Choose whether to count every individual observation or each unique submission only once. |
Question compliance table
Python class: QuestionComplianceTableWidget
Field |
Type |
Default |
Description |
|---|---|---|---|
compliance_rate (Compliance level) |
|
|
Only show question compliance data for the specified compliance level. |
field_names (Questions) |
|
|
Specify a list of questions used to generate the data. |
sub_observation (Subform) |
|
|
Filter questions by subform. |
issue_level [required] |
|
|
|
show_actual_value (Show actual value) |
|
|
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
targets (Targets) |
|
|
Specify the targets for each field. |
target_margin (Target margin) |
|
|
Target will be marked as “met” (in orange) if within this margin. |
target_margin_per_field (Target margin per field) |
|
|
Specify a different target margin for each field. |
less_than_targets (Less than fields) |
|
|
A list of fields where the target is to be below the specified value. |
use_compliance (Use compliance) |
|
|
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, orfield_valuefor custom field tracking.- start_time_field
Field name for custom start time (only used when
start_time_typeisfield_value).- start_time_value
Field value for custom start time (only used when
start_time_typeisfield_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_typeisfield_value).- end_time_value
Field value for custom end time (only used when
end_time_typeisfield_value).- metric_verb
Describes the activity being tracked (e.g.,
"Reviewed","Completed").
Field |
Type |
Default |
Description |
|---|---|---|---|
x_axis (X-axis field (columns)) [required] |
|
|
Field to use for table columns. Each unique value becomes a column. |
y_axis (Y-axis field (rows)) [required] |
|
|
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] |
|
|
When to start tracking time. |
start_time_field (Start time field) |
|
|
Field name for custom start time (only used when “Field set to value” is selected). |
start_time_value (Start time value) |
|
|
Field value for custom start time (only used when “Field set to value” is selected). |
end_time_type (End time) [required] |
|
|
When to stop tracking time. |
end_time_field (End time field) |
|
|
Field name for custom end time (only used when “Field set to value” is selected). |
end_time_value (End time value) |
|
|
Field value for custom end time (only used when “Field set to value” is selected). |
metric_verb (Metric verb) |
|
|
Describes the activity being tracked (e.g., “Reviewed”, “Completed”). |
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.
Field |
Type |
Default |
Description |
|---|---|---|---|
field_name (Field) |
|
|
Specify the field used to generate the bar chart data. |
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
compliance_threshold (Compliance threshold) |
|
|
If specified, only shows values greater than or equal to the threshold. |
limit_number_of_entries_to (Limit) |
|
|
If specified, limits the number of entries used to generate the chart data. |
max_label_length (Max label length) |
|
|
How long the labels can be before they’re wrapped. |
table_percentage_label (Table % label) |
|
|
Override the default label displayed in the table for the percentage column. |
total_display (Total display) |
|
|
Provide a format for the total display beside each item. |
show_sample_size (Show sample size) |
|
|
|
custom_compliance_levels (Custom compliance levels) |
|
|
<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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
date_field |
|
|
|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
Add an extra dataset to the line chart. |
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
Field |
Type |
Default |
Description |
|---|---|---|---|
field_names (Fields) |
|
|
Filter the fields used to generate the chart data. |
date_field |
|
|
|
compliance (Use compliance) |
|
|
If enabled, compliance data will be used to create the chart. |
show_events (Show events) |
|
|
Shows timeline events relevant to the widget as vertical lines on the chart. |
extra_dataset (Extra dataset) |
|
|
Add an extra dataset to the line chart. |
Comments
Subform comments
Python class:
CommentsWidgetRenders text answers in subobservations. Works with hardcoded subform audits like HIQA
Field
Type
Default
Description
subform_name (Subform) [required]
stringNoneThe subform containing comments to be rendered.
Comments
Python class:
GenericCommentsWidgetWidget 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.
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)
int10The max number of comments to show in the widget. Leave blank to show all comments.
Session comments
Python class:
SessionCommentsWidgetField
Type
Default
Description
byline_fields (Byline fields)
list['auditor']Specify the fields used to add data to the byline.
max_items (Max items)
int10The max number of comments to show in the widget. Leave blank to show all comments.