[% META title = 'Haematological Malignancy Research Network » Delete Data' -%] [% patient = data.patient_case.patient; request_id = c.param('id'); data_section = c.param('Id'); # e.g. lymphoid # PROCESS dumper.tt dump = data.as_tree; # PROCESS dumper.tt dump = c.param('id'); # e.g. 1 # PROCESS dumper.tt dump = data_section; # PROCESS dumper.tt dump = hmrn_data.params.$data_section; # PROCESS dumper.tt dump = hmrn_data.maps.parameters; # PROCESS dumper.tt dump = hmrn_data; # PROCESS dumper.tt dump = shared_data; %] [% IF shared_data.size; # do we have any sections with its own (non-shared) data? have_unique_section_data = 0; FOREACH d IN shared_data; # INCLUDE dumper.tt dump = d; FOREACH pair IN d.value.in_categories; # INCLUDE dumper.tt dump = pair; NEXT UNLESS pair.value; # to avoid Argument "" isn't numeric in addition have_unique_section_data = have_unique_section_data + pair.value; END; END; %]
NOTE:
* deleting data items from the [% data_section.upper %] section will also remove them from other sections
[% IF have_unique_section_data %]
* sections highlighted in red also contain additional (non-shared) data
[% END %]

[% FOREACH entry IN shared_data %] [% END %]
Parameter Value Will Be Deleted From Section
[% entry.key %] [% entry.value.result; %] [% FOREACH x IN entry.value.in_categories; IF x.value %] [% x.key %] [% ELSE; x.key; END %] [% END %]
[% END # IF shared_data %]

Confirm you want to permanently delete the [% data_section.upper.replace('_', ' ') %] dataset for patient [% patient.first_name.ucfirst %] [% patient.last_name.upper %] / [% patient.dob.dmy %] / [% patient.nhs_number %]

[% site.html.back_button %]