<!-- BEGIN [% template.name %] -->
  [% META title = 'Worklist &raquo; Gross Description Entry' -%]

  <script type="text/javascript" src="/js/jquery.textarea-expander.js"></script>

  <h2>Gross description entry [[% requests.size %] unreported requests]</h2>

  [% IF requests.size %]
    <table class="indent">
        <tr>
            <td class="borderless"></td>
            <th>LabNo</th>
            <th>Name</th>
            <th>Specimen</th>
            <th>Description</th>
        </tr>
        [% FOREACH data IN requests; # INCLUDE dumper.tt dump = data.as_tree %]
        <tr>
            <td>[% loop.count %]</td>
            <td valign="middle">
                [% INCLUDE site/lab_number.tt want_url = 1 %]
            </td>
            <td>
                [% data.patient_case.patient.last_name | upper %],
                [% data.patient_case.patient.first_name | ucfirst %]
            </td>
            <td class="title">
                [% data.request_specimen.specimen.sample_code %]
            <td>
                <form method="post" name="gross_description_[% data.id %]"
                    action="[% app_url %]/local_worklist/gross_description/[% data.id %]" >
                    <textarea name="gross_description" rows="1" cols="70"
                        class="expand20-200">[% # don't line-break; as_tree to prevent db lookup
                            data.as_tree.request_specimen_detail.gross_description %]</textarea>
                    [% site.html.submit %]
                </form>
            </td>
        </tr>
        [% END %]
    </table>
  [% ELSE %]
      <p class="indent">No records with outstanding gross description found</p>
  [% END %]
<!-- END [% template.name %] -->
