<!-- BEGIN outreach/data_summary.tt -->
[% # manipulate some immunology params:
immunology = outreach.immunology;
IF immunology.electrophoresis.result.match('Isotype undetermined');
immunology.electrophoresis.result = '';
END;
FOREACH param IN ['IgG' 'IgA' 'IgM'];
IF immunology.item(param).result;
IF immunology.item(param).result * 100 == immunology.item(param).default * 100;
immunology.item(param).result = '';
END;
END;
END;
IF immunology.paraprotein.result;
IF immunology.paraprotein.result * 100 == immunology.paraprotein.default * 100;
IF immunology.electrophoresis.result.match('Ig');
immunology.paraprotein.result = 'Unquantifiable';
ELSIF immunology.electrophoresis.result.match('No paraprotein');
immunology.paraprotein.result = '';
ELSE;
immunology.paraprotein.result = 'N/K';
END;
END;
END;
IF outreach.flow_cytometry.cd19_neg_pc.result;
IF outreach.flow_cytometry.cd19_neg_pc.result < 0.001;
outreach.flow_cytometry.cd19_neg_pc.result = '< 0.001';
ELSE;
outreach.flow_cytometry.cd19_neg_pc.result =
sig_figs(outreach.flow_cytometry.cd19_neg_pc.result);
END;
END;
IF outreach.calculated.abnormal_b_cells.result;
IF outreach.calculated.abnormal_b_cells.result < 0.01;
outreach.calculated.abnormal_b_cells.result = '< 0.01';
ELSE;
outreach.calculated.abnormal_b_cells.result =
sig_figs(outreach.calculated.abnormal_b_cells.result);
END;
END;
# abnormal B cells calculated so doesn't get value from default_and_ranges table:
outreach.calculated.abnormal_b_cells.units = outreach.haematology.wbc.units;
outreach.calculated.abnormal_b_cells.field_label = 'Abnormal B';
%]
[% BLOCK rows;
DEFAULT class = 'normal';
patient_id = request_data.patient_case.patient_id;
IF is_numerical(param.result); # no maths funcs unless numerical:
IF param.lower_flag && param.result < param.lower_flag; class = 'highlight';
ELSIF param.upper_flag && param.result > param.upper_flag; class = 'highlight';
END;
END;
%]
<tr>
<td align="right">
[% IF skip_url; param.field_label; ELSE %]
<a href="[% app_url %]/chart/outreach_param/[% param.param_name %]/[% patient_id %]"
onclick="return popup(this.href);">
<span class="acronym" title="chart">[% param.field_label %]</span>
</a>
[% END %]
</td>
<td class="[% class %]" align="center">
[% param.result %]
</td>
<td align="center">
[% IF param.lower_limit; 10 * param.lower_limit / 10; END %] -
[% IF param.upper_limit; 10 * param.upper_limit / 10; END %]
</td>
<td>
[% param.units.replace('10/9', '10<span class="superscript">9</span>') %]
</td>
</tr>
[% END %]
[% PROCESS site/popup.tt height=280, width=300, top=250 %]
<table class="indent borderless">
<tr>
<td valign="top">
<table class="outreachResults">
<tr>
<th scope="col">Param</th>
<th scope="col">Result</th>
<th scope="col">Range</th>
<th scope="col">Units</th>
</tr>
[%
INCLUDE rows param = outreach.haematology.hb;
INCLUDE rows param = outreach.haematology.wbc;
INCLUDE rows param = outreach.haematology.plts;
INCLUDE rows param = outreach.haematology.lymphs;
INCLUDE rows param = outreach.flow_cytometry.total_b_cells;
INCLUDE rows param = outreach.calculated.abnormal_b_cells skip_url = 1;
INCLUDE rows param = outreach.flow_cytometry.cd19_neg_pc;
%]
</table>
</td>
<td width="10"></td>
<td valign="top">
<table class="outreachResults">
<tr>
<th scope="col">Param</th>
<th scope="col">Result</th>
<th scope="col">Range</th>
<th scope="col">Units</th>
</tr>
[%
INCLUDE rows param = outreach.biochemistry.creatinine;
INCLUDE rows param = outreach.biochemistry.calcium;
INCLUDE rows param = outreach.immunology.IgA;
INCLUDE rows param = outreach.immunology.IgG;
INCLUDE rows param = outreach.immunology.IgM;
INCLUDE rows param = outreach.immunology.electrophoresis skip_url = 1;
INCLUDE rows param = outreach.immunology.paraprotein;
%]
</table>
</td>
</tr>
</table>
<!-- END outreach/data_summary.tt -->