[% content_only = 1 # no html wrappers %]
<html>
<head>
<!-- BEGIN [% template.name %] -->
<title>PCR 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>
[% # FOREACH entry IN requests; PROCESS dumper.tt dump = entry.as_tree; END %]
[% # PROCESS dumper.tt dump = c.query.self_url %]
[% # PROCESS dumper.tt dump = request_specimen_map %]
<p id="back">[% site.html.back_button %]</p>
<h2>PCR Worksheet</h2>
<div class="bold indent">
[% IF test_names.size %]
<p>Test(s): [% test_names.join('; ') %]</p>
[% END %]
<p>Performed by: [% c.authen.username.upper %]</p>
<p>Date: [% USE date(format = '%d.%m.%Y @ %H:%M', locale = 'en_GB');
date.format %]</p>
</div>
<table>
<tr>
<td class="borderless"></td>
<th>HMDS ref</th>
<th>Name</th>
<th>Date</th>
<th>Sample</th>
<th>Lab Test</th>
<th>Comments/Results</th>
</tr>
[% i = 0; # row counter
FOREACH entry IN requests; # PROCESS dumper.tt dump = entry.as_tree; NEXT;
data = entry.request; # for lab_number.tt
patient = data.patient_case.patient;
# want to split specimens into new line for each:
specimens = specimen_map.item(data.id).sample_code;
FOREACH specimen IN specimens; # only show requested specimens:
NEXT UNLESS request_specimen_map.item(data.id).${specimen};
%]
<tr>
<td align="right">[% i = i + 1; i %]</td>
<td>[% PROCESS site/lab_number.tt want_url = 0 %]</td>
<td>
[% patient.last_name | upper %],
[% format_firstname(patient) || patient.first_name | ucfirst %]
</td>
<td>[% data.created_at.strftime('%d.%m.%Y') %]</td>
<td>[% specimen %]</td>
<td>[% entry.lab_test.field_label %]</td>
<td></td>
</tr>
[% END; END %]
[% BLOCK empty_row %]
<tr>
<td align="right">[% i = i + 1; i %]</td>
<td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
[% END; FOREACH n IN [ 1 .. 5 ]; PROCESS empty_row; END %]
</table>
<h4>Tube order checking</h4>
<p class="indent">Tube order and alignment must be checked at all transfer
stages. Initial once done.
</p>
<table class="indent">
<tr>
<td class="label">Performed by:</td><td class="empty50"></td>
</tr>
<tr>
<td class="label">Checked by:</td><td class="empty50"></td>
</tr>
</table>
<h4>Reagent batch numbers</h4>
<table class="indent">
<tr>
<td class="borderless"></td>
<th>Batch number</th>
<th>Batch number</th>
<th>Batch number</th>
<th>Batch number</th>
<th>Batch number</th>
</tr>
<tr>
<td class="label">Mastermix:</td>
<td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td class="label">Taq:</td>
<td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td class="label">PCR machine:</td>
<td></td><td></td><td></td><td></td><td></td>
</tr>
</table>
<h4>Other / comments</h4>
</body>
</html>
<!-- END [% template.name %] -->