RSS Git Download  Clone
Raw Blame History
[% META title = 'Haematological Malignancy Research Network » Potential New Malignancies' %]

<!-- BEGIN [% template.name %] -->
    [% # PROCESS dumper.tt dump = cases.6.as_tree %]

    <p class="title">
        [% USE date(format = '%d.%m.%Y', locale = 'en_GB') %]
        Potential new malignancies [[% cases.size %]] for dates
        [% c.query.param('date_from') || date_from.dmy('.') %] to
        [% c.query.param('date_to')   || date.format %]        
        [% site.html.back_button %]
    </p>
    
    [% IF cases.size %]
    <table id="hmrn">
        <tr>
            <th scope="col">LabNo</th>
            <th scope="col">Name</th>
            <th scope="col">DoB</th>
            <th scope="col">Referrer</th>
            <th scope="col">Source</th>
            <th scope="col">AuthDate</th>
            <th scope="col">Unit Number</th>
            <th scope="col">NHS&nbsp;Number</th>
            <th scope="col">Diagnosis</th>
        </tr>
        [% FOREACH data IN cases;
            patient = data.patient_case.patient;
        %]
        <tr>
            <td>[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
            <td>
                [% patient.last_name   | upper   %],
                [% patient.first_name  | ucfirst %]
                [% patient.middle_name | ucfirst %]
            </td>
            <td>[% patient.dob.strftime('%d.%m.%Y') %]</td>
            <td>[% data.referrer_department.referrer.name %]</td>
            <td>
                [% INCLUDE site/display_name.tt
                    location = data.patient_case.referral_source.display_name %]
            </td>
            <td>[% data.request_history.time.dmy('.') %]</td>
            <td>[% data.patient_case.unit_number || site.html.grey_null %]</td>
            <td>[% INCLUDE site/nhs_number.tt nhs_number = patient.nhs_number %]</td>
            <td>
                [% IF data.request_report.status == 'new' %]
                    <strong>[% data.request_report.diagnosis.name %]</strong>
                [% ELSE %]
                    [% data.request_report.diagnosis.name %]
                    [% IF data.request_report.status == 'relapse' %][R][% END %]
                [% END %]
            </td>
        </tr>
        [% END %]
    </table>
    [% ELSE %]
        <p class="info">No records found for specified duration</p>
    [% END %]
<!-- END [% template.name %] -->