[%- content_only = 1; # no html wrappers -%]
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<!-- BEGIN [% component.name # *after* DOCTYPE for IE <9 formatting %] -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
[%# base href only needed so wkhtmltopdf can find static files as http addr: %]
<base href="[% c.cfg('settings').base_href %]">
<link rel="stylesheet" href="/css/bootstrap.css">
[% UNLESS is_print_request # wrecks span width formatting %]
<link rel="stylesheet" href="/css/bootstrap-responsive.css">
[% END %]
<link rel="stylesheet" href="/css/print_view.css?v1.3" type="text/css">
<style type="text/css">
[% IF is_print_request %]
.demographics a { color: #513775 }
[% END -%]
@media print {
.printHide { display: none; }
.viewHide { display: block; }
.error { color: #c44; }
a[href]:after { /* override idiotic bootstrap css entry: */
content: none;
}
}
@media screen {
.viewHide { display: none; }
}
</style>
<!--[if lt IE 9]>
<style type="text/css">
#nav-bar { /* corrections for noddy browser */
right: 200px;
top: 80px;
}
</style>
<![endif]-->
<script src="/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
</head>
[% # define static vars - don't change between requests if print-run request:
text_str = {
csf => 'absence of involvement of the cerebro-spinal fluid does not'
_ ' exclude the possibility of intracerebral disease',
tests_pending => 'there are further laboratory investigations pending',
service_url => 'the definitive report is available online at '
_ c.cfg('settings').service_url,
pb_sample => 'please send a peripheral blood sample with all bone marrow specimens',
clinic_return => 'Currently unsuitable for community monitoring: an appointment'
_ ' will be made at the haematology clinic.',
pack_dispatch => 'Suitable for community monitoring: a pack will be sent out',
};
acronym_class = is_print_request ? 'normal' : 'acronym'; # don't display if print req
%]
<body>
[% IF reports.size; # print-run request:
offset = c.query.param('offset') || 0; # next offset value
count = c.query.param('total') || 0; # total number of records in print run
start = c.query.param('start') | uri;
end = c.query.param('end') | uri;
offset_next = offset + 50;
offset_lower = offset_next + 1; # start of next offset
offset_upper = offset_next + 50; # end of next offset
url = [];
url.push("total=$count");
url.push("offset=$offset_next");
url.push("start=$start");
url.push("end=$end"); # PROCESS dumper.tt dump = url;
%]
<p class="printHide">[% site.html.back_button %]
<span style="font-weight: bold; float: right">
[% IF count >= offset_lower; # still more records to print: %]
<a class="button" href="[% app_url %]/printrun/do_offset?[% url.join(';') %]">
[% offset_lower %] to [% ( offset_upper > count ) ? count : offset_upper %]
»
</a>
[% ELSE %]
[finished]
[% END %]
</span>
</p>
[% FOREACH entry IN reports;
import(entry); # clobbers all previous keys (history, has_optional, etc):
# need to (re)define vars not set in caller record/default.tt:
request_data = data.as_tree; # save multiple lookups if undefined
report = data.request_report; # PROCESS dumper.tt dump = report.as_tree;
patient = data.patient_case.patient; # PROCESS dumper.tt dump = patient.as_tree;
%]
<div style="page-break-after: always">
[% INCLUDE record/report/body.tt %]
</div>
[% END %]
[% ELSE; INCLUDE record/report/body.tt; END %]
[% UNLESS is_print_request # printed as wkhtmltopdf footer %]
<!-- // interferes with msg links
<div class="footer">
<p class="pull-right"><img src="/images/cpa_logo.png" /></p>
</div>
-->
[% END %]
[% UNLESS c.get_current_runmode.match('_do_print') # print run %]
<div class="viewHide error">THIS PAGE VIEW IS NOT FORMATTED FOR PRINTING.
PLEASE USE THE "PRINT" ICON IN THE UPPER NAVIGATION SECTION.
</div>
[% END %]
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="/js/vendor/bootstrap.min.js"></script>
<script src="/js/main.js"></script>
</body>
</html>
<!-- END [% component.name %] -->