  	[% META title = 'Request &raquo; New' -%]

	[% # PROCESS dumper.tt dump = data %]
    [% SET patient = data.case.patient %]

    <h3>New request successful</h3>

    <div class="indent">
    <table>
        <tr>
            <td class="label">Last Name:</td>
            <td class="data">
                <input type="text" value="[% patient.last_name | upper %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">First Name(s):</td>
            <td class="data">
            [% SET fname = patient.first_name; SET mname = patient.middle_name %]
                <input type="text" value="[% fname | ucfirst %] [% mname | ucfirst %]"
					[% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">D.o.B:</td>
            <td class="data">
                <input type="text" value="[% patient.dob.strftime('%d.%b.%Y') %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">NHS Number:</td>
            <td class="data">
                <input type="text" value="[% patient.nhs_number %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">Unit Number:</td>
            <td class="data">
                <input type="text" value="[% data.case.unit_number %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">Lab. Number:</td>
            [% SET lab_number = c.cfg('settings').lab_number_prefix _ data.lab_number %]
            <td class="data">
                <input type="text" value="[% lab_number %]" [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">Specimen:</td>
            <td class="data">
                <input type="text" value="[% data.specimen | upper %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
		[% IF data.year %]
		<tr>
            <td class="label">Taken:</td>
            <td class="data">
				<input type="text" value="[% data.day _ '.' _ data.month _ '.'
					_ data.year	_ ' @ ' _ ( data.hour || '00' ) _ ':'
					_ ( data.minute || '00' ) %]" [% site.html.readonly %] />
			</td>		
		</tr>
		[% END %]
        <tr>
            <td class="label">Source:</td>
            <td class="data">
                <input type="text" value="[% data.referral_source %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">Referrer:</td>
            <td class="data">
                <input type="text" value="[% data.referrer_name %]"
                    [% site.html.readonly %] />
            </td>
        </tr>

		[% IF data.trial_name %]
        <tr>
            <td class="label">Trial name:</td>
            <td class="data">
                <input type="text" value="[% data.trial_name %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
        <tr>
            <td class="label">Trial number:</td>
            <td class="data">
                <input type="text" value="[% data.trial_number %]"
                    [% site.html.readonly %] />
            </td>
        </tr>
		[% END %]

		[% IF data.external_reference %]
        <tr>
            <td class="label">External ref:</td>
            <td class="data">
                <input type="text" value="[% data.external_reference %]"
					[% site.html.readonly %] />
            </td>
        </tr>		
		[% END %]
        <tr>
            <td colspan="2" align="right">
                <a href="[% app_url %]/register">Next &#187;</a>
            </td>
        </tr>

    </table>
    </div>