[% META title = 'Chimerism data' %] [% # PROCESS dumper.tt dump = data %]

Chimerism data summary

[% IF data.size; USE math = format('%.0f'); i = 0; %]
[% FOREACH request IN data; # INCLUDE dumper.tt dump = request; FOREACH set IN request.value; # INCLUDE dumper.tt dump = set; row = set.value; # INCLUDE dumper.tt dump = row; baseline_data = row.${'baseline chimerism data'}; hmds_ref = row.${'hmds ref'}; result = []; result.push(row.id); result.push(hmds_ref); result.push(row.test); result.push(baseline_data); result.push(row.marker_ref); %] [% IF row.data_ok == 2 OR baseline_data %] [% ELSE %] [% END %] [% END; END %]
LabNo Name Baseline Marker Donor Patient Result Ref Import
[% i = i + 1; i %] [% hmds_ref %] [% row.name %] [% baseline_data %] [% row.test %] [% row.donor_result UNLESS row.donor_result == 1 AND NOT row.patient_result # ie patient == 0 %] [% row.patient_result %] [% # use 'size' here in case result is zero: IF row.donor_result.size AND row.patient_result.size; val = math( row.donor_result / ( row.donor_result + row.patient_result ) * 100 ); result.push(val); val; '%'; END %] [% row.marker_ref %] [% hmds_ref %] X
[% site.html.submit %]
[% END %]