[% skip_wrappers = 1 %] [% # PROCESS dumper.tt dump = panel_probes %] [% # PROCESS dumper.tt dump = fish_data %] [% patient = data.patient_case.patient; report = data.as_tree.request_report; # as_tree to prevent tt lookup if empty %]

FISH worksheet [% PROCESS site/lab_number.tt want_url = 0 %]

Name DoB ID No. Date Source Clinician Specimen
[% patient.last_name | upper %], [% format_firstname(patient) || patient.first_name | ucfirst %] [% patient.dob.strftime('%d.%b.%Y') %] [% patient.nhs_number || data.patient_case.unit_number %] [% data.created_at.strftime('%d.%b.%Y') %] [% location = data.patient_case.referral_source.display_name; PROCESS site/display_name.tt %] [% data.referrer_department.referrer.name %] [% specimen_map.item(data.id).sample_code.join(', ') %] [% INCLUDE site/snippets/doi.tt IF request_options_map.item(data.id).doi %]

Flow results: [% result_summaries.item(data.id) %]

Request details: [% report.clinical_details %]

Specimen quality: [% report.specimen_quality %]

Reported as: [% report.diagnosis.name %]

Section notes: [% request_section_notes_map.item(data.id) %]

[% BLOCK row %] [% probe %]      [% END %] [% unique_probes = {}; # initialise hash for probes: FOREACH entry IN fish_data.item(data.id); # PROCESS dumper.tt dump = entry; NEXT IF entry.status.description.match('complete'); probe = entry.lab_test; # INCLUDE dumper.tt dump = probe.test_name; NEXT IF probe.test_name.match('^h_and_e_fish$'); # IF probe.test_name.match('^fish$'); # no longer in use # all_probes.push('FISH'); # generic FISH request # unique_probes.FISH = 1; IF probe.test_type.match('test'); # just add test name # all_probes.push(probe.field_label); label = probe.field_label; unique_probes.${label} = 1; ELSIF probe.test_type.match('panel'); # add panel probe-set: # FOREACH pp IN panel_probes.item(probe.field_label); # using db table now FOREACH pp IN panel_probes.item(probe.test_name); # all_probes.push(pp); unique_probes.${pp} = 1; END; END; END; # PROCESS dumper.tt dump = unique_probes; all_probes = natural_sort(unique_probes.keys); # PROCESS dumper.tt dump = all_probes; FOREACH probe IN all_probes; PROCESS row; END; FILTER repeat(3); PROCESS row probe = ''; END; # 3 empty rows %]
Probe Slide quality FISH result Interpretation FISH quality

[% PROCESS site/lab_number.tt want_url = 0 %] :: [% patient.last_name | upper %]