[% META title = 'Resources » Dashboard View' -%]
[% addcss = [ 'dashboard.css?v1.4' ] %]
[% # INCLUDE dumper.tt dump = data %]
[% # INCLUDE dumper.tt dump = data.incomplete_section_tests %]
[% # some common data blocks:
lab_test_data = data.incomplete_section_tests %]
[% BLOCK series_data;
total = 0;
FOREACH test IN section.value;
total = total + data.sum_this(test.value);
END;
id = section.key.replace(' ','-').lower;
%]
{
name: '[% section.key %]',
y: [% total %],
drilldown: '[% id %]'
},
[% END %]
[% BLOCK drilldown_series_data;
# '+' chars for html source readability
# omit trailing comma on data block for IE8-compatibility
%]
['[% test.key %]',[% data.sum_this(test.value) %]][% ',' UNLESS loop.last +%]
[% END %]
[% BLOCK urgent %]
Urgent
[% data.urgent || 0 %]
[% END; BLOCK unscreened %]
Unscreened
[% data.unscreened || 0 %]
[% END; BLOCK unreported %]
Screened
[% data.unreported || 0 %]
[% END; BLOCK unreported_tests_complete %]
Tests complete
[% data.unreported_tests_complete || 0 %]
[% END; BLOCK unauthorised %]
Unauthorised
[% data.unauthorised || 0 %]
[% END; BLOCK incomplete; incomplete_tests = data.incomplete - data.complete %]
Incomplete
[% incomplete_tests || 0 %]
[% END; BLOCK complete %]
Tests complete
[% data.complete || 0 %]
[% END %]
[% rs_url = app_url _ '/worklist/request_status' %]
[% IF has_authorisation # only if authorisation stage in use %]
[% END %]
[% has_authorisation ? 'Authorised' : 'Reported' %]
-
[% IF data.incomplete - data.complete;
USE url(rs_url, status_query = 'incomplete') %]
[% INCLUDE incomplete %]
[% ELSE %]
[% INCLUDE incomplete %]
[% END %]
-
[% IF data.complete;
USE url(rs_url, status_query = 'incomplete') %]
[% INCLUDE complete %]
[% ELSE %]
[% INCLUDE complete %]
[% END %]
[% IF data.local_dashboard; # only set in controller if local_dashboard.yml exists
centre = c.cfg('settings').item('_centre') || argv; # argv from index.html ssi exec cmd
# tt_dir = c.cfg('path_to_app_root') _ '/templates/resources/dashboard/local';
# TRY; USE File("${tt_dir}/.${centre}"); # don't need this if testing for data.local_dashboard
# CATCH File; skip_local_dashboard = 1; END; # skip_local_dashboard = 'true' if no file
PROCESS "resources/dashboard/local/.${centre}"; # UNLESS skip_local_dashboard;
END;
%]
Lab sections - incomplete tests:
[% div_name = 'incomplete'; INCLUDE site/snippets/toggleview.tt %]
[% INCLUDE resources/dashboard/drilldown.tt %]
[% BLOCK not_required_3 # same data as 'Lab sections - incomplete tests' display after drilldown %]
Lab sections - totals for lab-tests:
[% div_name = 'test-totals'; INCLUDE site/snippets/toggleview.tt %]
[% INCLUDE resources/dashboard/test_totals.tt %]
[% END; # INCLUDE not_required_3 %]
Lab sections - lab-test status:
[% div_name = 'tests-status'; INCLUDE site/snippets/toggleview.tt %]
[% INCLUDE resources/dashboard/test_status.tt %]