RSS Git Download  Clone
Raw Blame History
[% content_only = 1 # no html wrappers %]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
  <base href="http://localhost" />
  
  <title>HMDS Outreach Report</title>
  <link type="text/css" media="all" rel="stylesheet" href="/css/outreach.css" />
  <link type="text/css" media="print" rel="stylesheet" href="/css/print.css" />
  <style type="text/css">
    <!--/* <![CDATA[ */
        @media screen {
            body { margin: auto; width: 800px }
            #patient_details, #data_summary { font-size: smaller }
        }
        @media print { /* ignored by pdf generation */
            body { margin: 0px 20px; }
        }
    /* ]]> */-->
    </style>
</head>

<body>
  [%
    data     = request.data; # PROCESS dumper.tt dump = data.data.as_tree;
    patient  = data.patient_case.patient;
    outreach = request.outreach; # PROCESS dumper.tt dump = outreach;
    history  = request.history;
  %]

    <div align="right">
		<a href="[% app_url %]">
			<img class="href" src="/images/logo.jpeg" alt="" />
		</a>
	</div>

    <div align="center">
        <p>
            <font size="+1" color="blue">
                Haematological Malignancy Diagnostic Service
            </font>
        </p>
    
        <p>
            [% c.cfg('settings').service_address %]
            [% c.cfg('settings').service_telno %]
        </p>
    
        <h3 align="center">
            Outreach Report on Ref. [% PROCESS site/lab_number.tt; want_url=0 %]
        </h3>
    </div>
		
	<p class="h4">Patient details:</p>
	
    <table id="patient_details">		
		<tr>
			<td class="header">Name:</td>
			<td>
                [% patient.last_name   | upper %],
                [% patient.first_name  | ucfirst %]
                [% patient.middle_name | ucfirst %]

                <b>DoB</b>: [% patient.dob.strftime('%d.%b.%Y') %]
                <b>NHS No</b>:
                [% INCLUDE site/nhs_number.tt nhs_number = patient.nhs_number %]
            </td>
		</tr>
		
		<tr>
			<td class="header">Address:</td>
			<td>[% outreach.demographics.address %]</td>
		</tr>

		<tr>
			<td class="header">GP:</td>
			<td>
                [% outreach.demographics.practitioner || 'UNKNOWN' %],
                [% outreach.demographics.display_name %]
              </td>
		</tr>			
    </table>
		
	<p class="h4">Laboratory results:</p>
    
	<div id="report">
        <p class="indent">
          <img src="[% app_url %]/chart/outreach/[% data.patient_case.patient_id %]" />
          [% # append "?CGISESSION=c.session.id" to pass session from URL %]
        </p>
    
        <div id="data_summary" align="center">
            [% INCLUDE outreach/data_summary.tt skip_url = 1 # switches off td hrefs %]
        </div>
        
		<p class="h4">Comment:</p>
		<p id="comment">
            <div>
              [% 
                formatted_comment = symbolise(data.request_report.comment);
                formatted_comment | html_line_break;
              %]
            </div>
			[%
                follow_opt_id = outreach.followup.followup_option_id;
                option = outreach.menu_options.followup_options.item(follow_opt_id).option;
                label  = outreach.menu_options.followup_options.item(follow_opt_id).label;
            %]

            [% IF option.match('month') %]
                Suitable for community monitoring: a pack will be sent out 
                [% UNLESS option.match('zero') %]in[% END %]
                [% label %].
            [% ELSIF option.match('clinic_return') %]
                Currently unsuitable for community monitoring: an appointment
                will be made at the haematology clinic.
            [% END %]
        </p>	
	
		<p class="h4">Diagnosis:</p>
		<p><b>[% data.request_report.diagnosis.name | html %]</b></p>	
	
		<div align="right">
            <div>
              <i>Reported by</i>:
              [% history.reported.user.first_name | ucfirst %]
              [% history.reported.user.last_name  | ucfirst %]
              on [% history.reported.time.strftime('%d.%b.%Y at %H:%M') %]
            </div>
  
            [% IF history.authorised %]
            <div>
                <i>Authorised by</i>:
                [% history.authorised.user.first_name | ucfirst %]
                [% history.authorised.user.last_name  | ucfirst %]
                on [% history.authorised.time.strftime('%d.%b.%Y at %H:%M') %]
            </div>
            [% END %]  
        </div>
	</div>
</body>
</html>