[% content_only = 1 # no html wrappers %]

<html>
<head>
  <!-- BEGIN [% template.name %] -->
  <title>DNA/RNA stabilisation worksheet</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link type="text/css" rel="stylesheet" href="/css/worksheet.css" />
</head>

<body>
    [% # PROCESS dumper.tt dump = requests %]
    
    <p class="classname">[% site.html.back_button %]</p>

    <h2>DNA/RNA stabilisation worksheet</h2>
      
    [% IF requests.size;
        USE date(format = '%d.%m.%Y @ %H:%M', locale = 'en_GB');
    %]
      <div class="indent">
        <p class="bold">[% c.authen.username | upper %] / [% date.format %]</p>
      
        <table>
            <tr style="font-size: smaller">
                <th>LabRef</th>
                <th>Name</th>
                <th>Type</th>
                <th>Specimen</th>
                <th>Presentation</th>
                <th>Registered</th>
                <th>Location</th>
                <th>Comments</th>
                <th>Sample to&nbsp;lysis</th>
                <th>Transfer&nbsp;to eppendorf</th>
            </tr>
            [% FOREACH entry IN requests; # INCLUDE dumper.tt dump = entry.as_tree;
                data  = entry.request; # for lab_number.tt
                lab_test = entry.lab_test;
                patient  = data.patient_case.patient;
                location = data.patient_case.referral_source.display_name;
                screened = data.request_initial_screen.screen.description;
                class    = screened.match('Probable B-LPD')
                    ? 'highlight-blue' : 'normal';
            %]
                <tr class="[% class %]">
                    <td>[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
                    <td>
                        [% patient.last_name | upper %],
                        [% patient.first_name | ucfirst %]
                    </td>
                    <td>[% lab_test.field_label.remove(' extraction') %]</td>
                    <td>
                        [% specimen_map.item(data.id).sample_code.join(',') %]
                        [% INCLUDE site/snippets/doi.tt
                            IF request_options_map.item(data.id).doi %]
                    </td>
                    <td>[% screened %]</td>
                    <td>[% data.created_at.strftime('%d.%b.%Y') %]</td>
                    <td>[% INCLUDE site/display_name.tt %]</td>
                    <td>[% %]</td>
                    <td>[% %]</td>
                    <td>[% %]</td>
                </tr>
            [% END %]
        </table>
      </div>
    [% ELSE %]
      <h5 class="indent info">No samples to stabilise</h4>
    [% END %]
</body>
</html>
<!-- END [% template.name %] -->