[% # PROCESS dumper.tt dump = section_result_lab_tests.item(section) %]
[% # PROCESS dumper.tt dump = completed_lab_tests %]
[% # PROCESS dumper.tt dump = this_section %]
Single tests:
[% # get list of tests:
tests = [ ];
FOREACH test IN this_section.test; # PROCESS dumper.tt dump = test;
tests.push(test.key);
END;
sorted_tests = natural_sort(tests); # PROCESS dumper.tt dump = sorted_tests;
%]
[% count = 1 %]
[% FOREACH test_name IN sorted_tests;
test_data = this_section.test.item(test_name);
# PROCESS dumper.tt dump = test_data;
# NEXT IF test_data.result; # already has result on test of same name - moved below
NEXT UNLESS test_data.is_active.match('yes');
# get td background 'color' (expects 'test_data'):
PROCESS result/colour.tt
%]
[% IF test_data.status; user = test_data.user; %]
[% test_name | html %]
[% ELSE %]
[% test_name | html %]
[% END %]
[% IF is_locked %]
[% ELSE %]
[% IF c.user_can('modify_results') AND test_data.status
AND NOT test_data.status.match('complete');
USE url(
app_url _ '/worklist/display/' _ this_section.id,
lab_test_id = test_data.id,
request_id = data.id,
display_format = "Data Entry");
%]
[% END %]
[% END %]
[% UNLESS loop.last OR # don't start new table unless multiple of 6:
( this_section.test.size > 4 AND count % 4 ) %]