[% # 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; %] [% IF skip_url; param.field_label; ELSE %] [% param.field_label %] [% END %] [% param.result %] [% IF param.lower_limit; 10 * param.lower_limit / 10; END %] - [% IF param.upper_limit; 10 * param.upper_limit / 10; END %] [% param.units.replace('10/9', '109') %] [% END %] [% PROCESS site/popup.tt height=280, width=300, top=250 %]
[% 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; %]
Param Result Range Units
[% 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; %]
Param Result Range Units