<!-- BEGIN [% template.name %] -->
  [% META title = 'Worklist &raquo; Unreported HTS Requests' -%]

    [% # FOREACH r IN requests; INCLUDE dumper.tt dump = r.as_tree; END %]

  <h3>Unreported HTS Requests</h3>

  [% BLOCK row;
        data = entry; # for lab_number.tt
		location = data.patient_case.referral_source.display_name
		patient  = data.patient_case.patient;
    %]
      <tr>
        <td>[% loop.count %]</td>
        <td>
          [% PROCESS site/lab_number.tt want_url = 1 %]
        </td>
        <td>
          [% patient.last_name   | upper %],
          [% patient.first_name  | ucfirst %]
          [% patient.middle_name | ucfirst %]
        </td>
		<td>[% data.created_at.strftime('%d.%m.%Y') %]</td>
		<td>[% PROCESS site/display_name.tt %]</td>
        <td>
          [% IF data.request_initial_screen %]
            [% data.request_initial_screen.screen.description | html %]
          [% ELSE %]
            [% site.html.grey_null %]
          [% END %]
		</td>
        <td>[% data.results_summary.time.strftime('%d.%m.%Y') %]</td>
      </tr>
    [% END %]

   <table>
       <tr>
        <td class="borderless"></td>
        <th>Lab No</th>
        <th>Name</th>
        <th>Date</th>
        <th>Source</th>
		<th>Presentation</th>
        <th>Result date</th>
      </tr>

      [% FOREACH entry IN requests; PROCESS row; END %]
    </table>
<!-- END [% template.name %] -->
