[% SET skip_wrappers = 1 %]
<!-- BEGIN history/previous_diagnosis.tt -->
[% # PROCESS dumper.tt dump = request_data %]
[% patient = request_data.patient_case.patient %]
<h4>Previous diagnoses for
[% PROCESS site/lab_number.tt want_url = 0 , data = request_data %]
[ [% patient.last_name | upper %], [% patient.first_name | ucfirst %] ]
</h4>
[% # PROCESS dumper.tt dump = previous_diagnoses %]
<table class="indent">
<tr>
<th scope="col">Old diagnosis</th>
<th scope="col">Changed by</th>
<th scope="col">Reason</th>
<th scope="col">Day/Date</th>
</tr>
[% FOREACH d IN previous_diagnoses %]
<tr>
<td>
[% d.diagnosis.name | html %]
</td>
<td>
[% d.user.first_name | ucfirst %]
[% d.user.last_name | ucfirst %]
</td>
<td>
[% d.reason %]
</td>
<td>
[% d.time.strftime('%a %d.%b.%Y @ %T') %]
</td>
</tr>
[% END %]
</table>
<p align="right">
<a href="javascript:window.close();">[ close window ]</a>
</p>
<!-- END history/previous_diagnosis.tt -->