[% # 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; # total B cells calculated so doesn't get value from default_and_ranges table: outreach.calculated.total_b_cells.units = outreach.haematology.wbc.units; outreach.calculated.total_b_cells.param_name = 'total_b_cells'; outreach.calculated.total_b_cells.field_label = 'Total B'; # abnormal B cells calculated so doesn't get value from default_and_ranges table: outreach.calculated.neoplastic_b_cells.units = outreach.haematology.wbc.units; outreach.calculated.neoplastic_b_cells.param_name = 'neoplastic_b_cells'; outreach.calculated.neoplastic_b_cells.field_label = 'Abnormal B'; # PROCESS dumper.tt dump = outreach.calculated; %] [% BLOCK rows; patient_id = request_data.patient_case.patient_id; # if param carries default value, set to N/K: IF is_numerical(param.result) AND param.default # AND param.result AND 100 * param.result == 100 * param.default; # PROCESS dumper.tt dump = param; param.result = 'N/K'; # PROCESS dumper.tt dump = param; END; IF is_numerical(param.result); # no maths funcs unless numerical: IF ( param.lower_flag && param.result < param.lower_flag ) OR ( param.upper_flag && param.result > param.upper_flag ); highlight_class = 'rangeFlag'; # stronger highlight ELSIF ( param.lower_limit && param.result < param.lower_limit ) OR ( param.upper_limit && param.result > param.upper_limit ); highlight_class = 'bold'; # weaker highlight END; result_sig_figs = sig_figs(param.result); END; %] [% IF skip_url; param.field_label; ELSE; var = param.param_name; %] [% param.field_label %] [% END %] [% result_sig_figs || param.result # to 3 sig figs if is_numerical() %] [% 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') %] [% UNLESS skip_url %] [% END %] [% END %] [% PROCESS site/popup.tt height=280, width=420, 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.calculated.total_b_cells; INCLUDE rows param = outreach.calculated.neoplastic_b_cells; 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