  [% META title = 'Admin &raquo; Screening Tests' -%]
<!-- BEGIN [% template.name %] -->

  [% # PROCESS dumper.tt dump = data %]
  [% # PROCESS dumper.tt dump = c.query.param('id') %]


  [% # PROCESS admin/system_nav.tt page = 'screen_test' # if admin permissions only %]

	<h2 align="center">Initial Screen Tests [All]</h2>

    [% FOREACH category IN data.keys.sort; # PROCESS dumper.tt dump = data.item(category);
        screens = data.item(category); # hashref
    %]
        <h4 class="header">[% category | upper %]</h4>
        <div class="indent">
            [% FOREACH entry IN screens; # PROCESS dumper.tt dump = entry;
                name  = entry.key;
                tests = entry.value.0.screen_lab_test; # value is an array of 1
                # PROCESS dumper.tt dump = t.as_tree FOREACH t IN tests;
            %]
            <dl>
                <dt>[% name %]:[% IF NOT tests %]
                    <span class="grey">[none configured]</span>[% END %] 
                </dt>
                [% FOREACH t IN tests; # INCLUDE dumper.tt dump = t.as_tree;
                    '<dd>' _ t.lab_test.field_label _ ' ('
                        _ t.lab_test.lab_section.section_name _ ') ';
                        '[INACTIVE]' IF t.lab_test.is_active.match('no');
                    '</dd>';
                  END;
                %]
            </dl>
            [% END %]
        </div>
    [% END %]

    <p class="center">[% site.html.back_button %]</p>
<!-- END [% template.name %] -->
