RSS Git Download  Clone
Raw Blame History
[% 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 %]
    [% # FOREACH rs IN result_summaries_map; PROCESS dumper.tt dump = rs; END %]

    <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>
            [% # highlight if screened as:
                highlight_screens = [
                    'CLL - pre-treatment / progressive disease'
                    'CLL trial presentation'
                    'TAP CLL - screening'
                    'Aplastic anaemia'
                    'CLEAR screening'
                    'FLAIR baseline'
                    'NCG PNH (BM)'
                    'PNH (BM)'
                ];
            %]
            [% 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;
                results  = result_summaries_map.item(data.id); # INCLUDE dumper.tt dump = results;
                class    = 'normal'; # but override if result summary matches
                    # 'B-LPD, etc' or one of highlighted screens:
                IF results AND
                    results.item('Flow cytometry').match('^B-LPD - CD5\+ non-CLL phenotype');
                    class = 'highlight-blue';
                END; # unless class already set to highlight:
                UNLESS class.match('highlight-blue');
                    FOREACH s IN highlight_screens; # INCLUDE dumper.tt dump = s;
                        IF screened.match(s); class = 'highlight-blue'; LAST; END;
                    END; # INCLUDE dumper.tt dump = screened;
                END;
            %]
                <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 %] -->