RSS Git Download  Clone
Raw Blame History
	[%
      IF is_results_entry;
        # META title = 'Worklist';
		my.meta_title = "Worklist » Data Entry » ${lab_section.section_name}";
      ELSE; # format for printing:
        skip_wrappers = 1;
      END;
    %]
    
<!-- BEGIN [% template.name %] -->	
    [% # PROCESS dumper.tt dump = user_list %]
    [% # PROCESS dumper.tt dump = request_options_map %]
    [% # PROCESS dumper.tt dump = status_options_map %]
    [% # PROCESS dumper.tt dump = outstanding_investigations %]
    [% # PROCESS dumper.tt dump = lab_section.as_tree %]

  <p class="classname">[% site.html.back_button %]</p>
  
  [% title = is_results_entry ? 'data entry' : 'worksheet' %]
  <h3>[% lab_section.section_name _ ' ' _ title %]</h3>  

  [% IF dfv_errors %]
        <p class="error">[% c.config('msg').dfv_errors %]</p>
    [% END %]

  [% worklist_update_status_dfv_js %]

  [% IF is_results_entry %]
  <form action="[% app_url %]/worklist/update_results/[% lab_section.id %]"
      [% worklist_update_status_onsubmit %] method="post" name="update_results"
        id="update_results">
    <input type="hidden" name="results_entry" value="1" />
	
    [% INCLUDE worklist/snippets/data_entry.tt %]
  [% END %]
  
  <p class="spacer"></p>
  
  <div class="indent">
	[% q = c.query;
	  sort_link = app_url _ '/worklist/display/' _ lab_section.id _ '?'
		_ 'lab_test_id='       _ q.param('lab_test_id')
		_ ';status_option_id=' _ q.param('status_option_id')
		_ ';results_entry='	   _ q.param('results_entry')	
	%]
    <table>
      <tr>
        <td class="borderless"></td>		
        <th>
		  <a href="[% sort_link	%];sort_by=lab_number">Lab No</a>		  
		</th>
        <th>Name</th>
        <th>Date</th>
        <th>Sample</th>
        <th>Source</th>
		<th>Presentation</th>
		<th><a href="[% sort_link %];sort_by=lab_tests">Investigation</th>
		<th>Status</th>
		[% IF is_results_entry %]
		  <th>Done</th>
		[% ELSIF section_has_test_details %]
		  <th>Notes</th>
		[% END %]
      </tr>
      
      [% FOREACH entry IN outstanding_investigations; # PROCESS dumper.tt dump = entry %]
        [% PROCESS worklist/snippets/row.tt type = 'investigation' %]  
      [% END %]
    </table>
  </div>
  
  <p>
	[% site.html.back_button %]
	[% IF is_results_entry; site.html.submit; ' '; site.html.reset; END %]
  </p>
  
  [% IF is_results_entry %]
  </form>
  [% END %]
<!-- END [% template.name %] -->