<!-- BEGIN [% component.name %]  -->
  [%
    lab_data = outreach.immunology; # PROCESS dumper.tt dump = lab_data;
    fields = natural_sort(lab_data.keys); # PROCESS dumper.tt dump = fields;
  %]

  [% outreach_immunology_dfv_js %]

  <form method="post" action="[% app_url %]/outreach/lab_results/[% request_data.id %]"
      name="outreachImmunology" id="outreachImmunology" [% outreach_immunology_onsubmit %]>
     <input type="hidden" name="department" value="immunology" />
    <table class="indent">
      <tr>
        [% FOREACH param IN fields %]
          [% class = # highlight if param result below param lower_limit:
              lab_data.item(param).result AND # have data
              lab_data.item(param).lower_flag AND # and lower_limit
              lab_data.item(param).result.remove('<') # less-than sign
                < lab_data.item(param).lower_flag # data below lower_limit
                    ? 'highlight' : 'normal'
          %]
          <th class="[% class %]">
            [% INCLUDE th_default_val lab_data_param = lab_data.item(param) %]
          </th>
        [% END %]
      </tr>

        [% require_graph = [ 'sflc_kappa' 'sflc_lambda' 'sflc_ratio' ] %]
		<tr>
			[% FOREACH param IN fields; # PROCESS dumper.tt dump = lab_data.item(param);
				# error = errs.item(param); %]
				<td>
					[% IF lab_data.item(param).field_type == 'menu' %]
								<select name="[% param %]">
									<option value="">--select one--</option>
									[% FOREACH opt IN outreach.menu_options.item(param) %]
										<option value="[% opt %]"
										[% 'selected' IF opt == lab_data.item(param).result %]>[% opt %]
										</option>
									[% END %]
								</select>
					[% ELSE %]
						<input type="text" size="3" name="[% param %]" id="[% param %]"
							value="[% lab_data.item(param).result %]" />
					[% END %]
                    [% IF require_graph.grep(param).size %]
                        <a href="[% app_url %]/chart/outreach_param/[% param %]/[%
                            patient.id %]" onclick="return popup(this.href);">
                        <i class="fa fa-line-chart"></i></a>
                    [% END %]
					[% error %]
				</td>
			[% END %]
        <td class="borderless">[% INCLUDE outreach_submit %]</td>
			</tr>
		</table>
	</form>
<!-- END [% component.name %]  -->
