<!-- BEGIN [% component.name %] -->
[% BLOCK chart_url;
flags = {}; # INCLUDE dumper.tt dump = anonymise_chart;
flags.USE_FILE_SESSIONS = use_file_sessions; # eg called via cron;
flags.ANONYMISE_CHART = anonymise_chart; # set in anonymise_report()
# need to pass session ID manually if called 'in memory' ie PDF gen:
# flags.CGISESSID = c.session.id IF url_session_id_required; # using cookies in make_pdf()
# INCLUDE dumper.tt dump = flags;
USE img_url = url(app_url _ '/chart/' _ chart_type _ '/' _ data.id, flags);
%]
<div style="margin: 10px 20px"><img src="[% img_url %]" /></div>
[% END %]
[% # draw graphs/charts if required:
IF format_info.has_glivec AND patient.nhs_number;
chart_type = 'imatinib';
ELSIF format_info.has_hiv;
chart_type = 'hiv';
ELSIF format_info.has_pnh;
chart_type = 'pnh';
ELSIF format_info.has_chimerism;
chart_type = 'chimerism';
END;
INCLUDE chart_url IF chart_type;
%]
<!-- END [% component.name %] -->