[% META title = 'Resources &raquo; Stats &amp; Audit &raquo; Trend Analysis' %]

<!-- BEGIN [% template.name %] -->
    [% # INCLUDE dumper.tt dump = cfg %]

    [% IF cfg;
        FOREACH section IN cfg;
            title = section.key;
            data  = section.value; # INCLUDE dumper.tt dump = data;
    %]
        <h2>Lab-test trend analysis for [% title %] section (past 24 months):</h2>
        <div class="indent">
        [% FOREACH t IN data; # INCLUDE dumper.tt dump = t %]
            <h3 class="header">[% t.value %]</h3>
            [% USE img_url = url(app_url _ "/chart/trend_analysis/${t.key}") %]
            <div style="margin: 10px 20px"><img src="[% img_url %]" /></div>
        [% END %]
        </div>
    [% END; ELSE %]
        <p class="info">Trend analysis not configured</p>
    [% END %]
<!-- END [% template.name %] -->
