	[% META title="Record Search" %]
    
<!-- BEGIN record/default.tt -->
    [% # PROCESS dumper.tt dump = history %]
    [% # PROCESS dumper.tt dump = is_locked %]
    [% request_data = data.as_tree; # save multiple lookups if undefined
       # PROCESS dumper.tt dump = request_errors %]
    
    [% PROCESS record/patient_summary.tt %]
    [% IF has_optional.initial_screen # only lab-staff can see unreported report:
            AND ( c.is_lab_staff OR has_optional.report ); 
        PROCESS record/report.tt; END %]

    [% IF c.is_lab_staff;
            PROCESS record/lab_tests.tt; # only lab staff see this
        ELSIF outstanding_tests.size; %]
		   <p class="red">HAS LABORATORY INVESTIGATIONS PENDING</p>
    [% END %]
    
    [% IF c.is_lab_staff %]
    <p align="right" class="classname">Request logs:
        <a href="[% app_url %]/history/request_view/[% data.id %]">view</a> ::
        <a href="[% app_url %]/history/request_print/[% data.id %]">print</a>
    </p>
    [% END %]
<!-- END record/default.tt -->
