<!-- BEGIN [% component.name %] -->
 [% # PROCESS dumper.tt dump = entry %]
 
    [% BLOCK details %]
    <table class="details">
      <tr>
        <td width="30%">Surname: [% entry.last_name | upper %]</td>
        <td width="30%">
            [% # generate array of forenames:
                forenames = [];
                first_name  = entry.first_name  | ucfirst;
                middle_name = entry.middle_name | ucfirst;
                forenames.push(first_name);
                forenames.push(middle_name) IF middle_name;
            %]
            Forename(s): [% forenames.join(', ') %]
        </td>
        <td width="40%">Sample date:</td>
      </tr>
      <tr>
        <td>
            NHS number:
            [% INCLUDE site/nhs_number.tt nhs_number = entry.nhs_number %]
        </td>
        <td>Patient number: [% entry.unit_number %]</td>
        <td>Sample time:</td>
      </tr>
      <tr>
        <td>Date of birth: [% entry.dob.strftime('%d.%b.%Y') %]</td>
        <td>Male / Female: [% entry.gender %]</td>
        <td>Phlebotomist name:</td>
      </tr>
      <tr>
        <td>Ward/clinic: HMDS</td>
        <td>Consultant: Rawstron</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    [% END %]
    
    <!-- biochemistry request form -->
    <div class="path_request">
      <table>
        <tr>
          <td>
            <img src='/images/trustlogo_large.png' alt="" />
          </td>
          <td rowspan="2">
            <div id="biochem">
              <div>Biochemistry</div>
              <div>SJUH site</div>
            </diV>
          </td>
        </tr>
        <tr>
          <td>
            <h3>BLOOD SCIENCES: BIOCHEMISTRY SJUH</h3>
          </td>
        </tr>
      </table>
    
      [% INCLUDE details %]
      
      <div class="border">
        <p class="">Diagnosis: [% entry.diagnosis %]</p>
        <p class="strong">Chemistry Requests</p>

       [% request_this = entry.pathology.biochem; # PROCESS dumper.tt dump = request_this %]
        <ul>
          [% IF request_this.albumin %]<li>Albumin</li>[% END %]
          [% IF request_this.calcium %]<li>Calcium</li>[% END %]
          [% IF request_this.creatinine %]<li>Creatinine</li>[% END %]
          [% IF request_this.u_and_e %]<li>U&amp;E</li>[% END %]
          [% IF request_this.lft %]<li>LFT</li>[% END %]
          [% IF request_this.mg %]<li>Magnesium</li>[% END %]
        </ul>
        
        <p class="strong">Please process aged samples</p>
      </div>
    </div>
   
    <div style="padding: 30px">&nbsp;</div>    

  <div class="path_request" style="page-break-after: always">
  [% IF entry.pathology.immunology # not required for CML %]
    <!-- immunology request form -->
      <table>
        <tr>
          <td>
            <img src='/images/trustlogo_large.png' alt="" />
          </td>
          <td rowspan="2">
            <div id="immunol">
              <div>Clinical Immunology</div>
              <div>Old Medical School</div>
              <div>LGI site</div>
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <h3>IMMUNOLOGY LGI</h3>
          </td>
        </tr>
      </table>
      
      [% INCLUDE details %]
      
      <div class="border">
        <p class="">Diagnosis: [% entry.diagnosis %]</p>
        <p class="strong">Immunology</p>

       [% request_this = entry.pathology.immunology; # PROCESS dumper.tt dump = request_this %]
        <ul>
          [% IF request_this.igs %]<li>Immunoglobulins (GAM)</li>[% END %]
          [% IF request_this.sep %]<li>Serum electrophoresis</li>[% END %]
          [% IF request_this.ppq %]<li>Paraprotein/immunofixation if indicated</li>[% END %]
        </ul>
      </div>
  [% END %]
  </div>
<!-- END [% component.name %] -->