[% META title = 'BCR ABL data' %] [% # PROCESS dumper.tt dump = data %] [% BLOCK missing_ct_result %] ERROR!! [% END %]

BCR ABL ratio data summary [% IF data.size; '[' _ data.size _ ']'; END %]

[% IF data.size %]
[% FOREACH entry IN data.keys.sort; # PROCESS dumper.tt dump = data.item(entry).copy_number; patient = data.item(entry).request_data.patient_case.patient; ABL = 0; FOREACH i IN data.item(entry).copy_number.ABL; ABL = ABL + i; END; ABL_VALS = data.item(entry).copy_number.ABL.join(' + '); ABL_CT_DATA = data.item(entry).CT.ABL; ABL_CT = ABL_CT_DATA.join(' / '); ABL_CT_A = ABL_CT_DATA.0 || 0; # to avoid: "isn't numeric in subtraction" ABL_CT_B = ABL_CT_DATA.1 || 0; ABL_CT_DIFF = ABL_CT_A - ABL_CT_B; BCR_ABL = 0; FOREACH i IN data.item(entry).copy_number.${'BCR ABL'}; BCR_ABL = BCR_ABL + i; END; BCR_ABL_VALS = data.item(entry).copy_number.${'BCR ABL'}.join(' + '); BCR_ABL_CT_DATA = data.item(entry).CT.${'BCR ABL'}; BCR_ABL_CT = BCR_ABL_CT_DATA.join(' / '); BCR_ABL_CT_A = BCR_ABL_CT_DATA.0 || 0; # to avoid: "isn't numeric in subtraction" BCR_ABL_CT_B = BCR_ABL_CT_DATA.1 || 0; BCR_ABL_CT_DIFF = BCR_ABL_CT_A - BCR_ABL_CT_B; # reset defaults for loop: class = 'normal'; status = 'normal'; ratio = 0; %] [% IF patient.last_name != data.item(entry).sample_name; status = 'error'; ELSIF data.item(entry).error; status = 'warning'; END; %] [% class = BCR_ABL AND BCR_ABL <= 10 ? 'red' : 'normal' %] [% class = BCR_ABL_CT ? ( BCR_ABL_CT_DIFF > 1.5 OR BCR_ABL_CT_DIFF < -1.5 ) ? 'red' : 'normal' : 'input_error'; %] [% class = ABL < 10000 ? 'blue' : ABL >= 10000 AND ABL < 20000 ? 'warning' : 'normal' %] [% class = ABL_CT ? ( ABL_CT_DIFF > 1.5 OR ABL_CT_DIFF < -1.5 ) ? 'red' : 'normal' : 'input_error'; %] [% END %]
LabNo Name BCR ABL CT ABL CT Result
[% loop.count %] [% entry %] [% data.item(entry).sample_name | upper %] [% IF status == 'error' %] [[% patient.last_name | upper %]] [% END %] [% BCR_ABL %] [% IF BCR_ABL %]([% BCR_ABL_VALS %])[% END %] [% IF BCR_ABL_CT; BCR_ABL_CT; ELSE; PROCESS missing_ct_result; status = 'error'; # disable checkbox END %] [% ABL %] [% IF ABL %]([% ABL_VALS %])[% END %] [% IF ABL_CT; ABL_CT; ELSE; PROCESS missing_ct_result; status = 'error'; # disable checkbox END %] [% messages = c.messages('file_upload').bcr_abl; IF ABL < 10000; messages.poor_quality.summary; ELSIF BCR_ABL; # ie not zero (0.58 conversion factor introduced 26/7/17) ratio = ( BCR_ABL / ABL ) * 0.58 * 100 | format('%.3f'); ratio _ '%'; ELSE; # no bcr abl expression = 100 / ABL | format('%.4f'); '<' _ expression | html; END; %] [% result = []; result.push(entry); # labno for template summary result.push(data.item(entry).request_data.id); result.push(ABL); result.push(BCR_ABL); result.push(ratio); %] [% previous_result = data.item(entry).existing_result.results_summary; IF previous_result; %] WARNING: has previous result [% END %]
[% site.html.submit %]
[% ELSE %]

Error: unable to extract any data from data file(s). Check:

  1. data file is an xls file, or a zip file containing at least 1 xls file
  2. data file contains ABL & BCR ABL data
  3. the 'Experiment File Name' field contains the string 'Q922'
  4. the 'Sample Name' field contains the LabNo & Name data

[% site.html.back_button %]

[% END %]