<!-- BEGIN [% template.name %] -->
  [% META title = 'Worklist &raquo; Outreach Packs Dispatched' -%]

    [% # PROCESS dumper.tt dump = requests %]
    
  [% # define some data structures:
    headers = [ 'LabNo' 'Name' 'Date' 'Location' ];
  %]
  
  <h3 class="header">Outreach packs dispatched</h3>

    <table class="indent">
      <tr>
        <td>&nbsp;</td>
        [% FOREACH item IN headers %]
          <th scope="">[% item | html_line_break %]</th>
        [% END %]
      </tr>
  
      [% FOREACH data IN requests; # PROCESS dumper.tt dump = data.as_tree
            patient = data.patient_case.patient;
      %]
      <tr>
        <td>[% loop.count %]
       <td>[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
       <td>
           [% patient.last_name  | upper %],
           [% patient.first_name | ucfirst %]
       </td>
       <td>[% data.created_at.strftime('%d.%b.%Y') %]</td>
       <td>[% data.patient_case.referral_source.display_name %]</td>
      </tr>
      [% END %]
    </table>
<!-- END [% template.name %] -->
