[% FOREACH section IN section_tests; # PROCESS dumper.tt dump = section;
section_name = section.key;
lab_tests = section.value;
%]
[% section_name %]
[% div_name = section_name; INCLUDE site/snippets/toggleview.tt %]
[%
configured = [];
FOREACH test IN lab_tests;
NEXT UNLESS diagnosis_lab_tests.item(test.id);
label = test.test_type.match('panel')
? test.field_label _ ' panel' : test.field_label;
configured.push(label);
END;
IF configured.size;
'['; configured.join('; '); ']';
END;
%]
[% END %]
[% count = count + 1 %]
[% END %]
[% ' | ' IF count == 1 # or get invalid html %]
[% END %]