Code type module improvements:
[openemr.git] / interface / patient_file / report / report_title.php
blob054706869a030dd2f0a1684e690f98dd53f9f3fb
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/patient.inc");
4 require_once("$srcdir/classes/Pharmacy.class.php");
5 ?>
7 <html>
8 <head>
9 <?php html_header_show();?>
11 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
13 </head>
14 <body class="body_title">
16 <?php
17 $result = getPatientData($pid, "fname,lname,pid,pubpid,phone_home,pharmacy_id,DOB,DATE_FORMAT(DOB,'%Y%m%d') as DOB_YMD");
18 $provider_results = sqlQuery("select * from users where username='" . $_SESSION{"authUser"} . "'");
19 $age = getPatientAge($result["DOB_YMD"]);
21 $info = 'ID: ' . $result['pubpid'];
22 if ($result['DOB']) $info .= ', DOB: ' . $result['DOB'] . ', Age: ' . $age;
23 if ($result['phone_home']) $info .= ', Home: ' . $result['phone_home'];
25 if ($result['pharmacy_id']) {
26 $pharmacy = new Pharmacy($result['pharmacy_id']);
27 if ($pharmacy->get_phone()) $info .= ', Pharm: ' . $pharmacy->get_phone();
31 <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
32 <tr>
33 <td style="width:45%; text-align: left; vertical-align:middle; white-space: nowrap">
34 <span class="title_bar_top"><?php echo $result{"fname"} . " " . $result{"lname"};?></span>
35 <span style="font-size:0.7em;">(<?php echo $info ?>)</span>
36 </td>
37 <td style="width:35%; text-align: center; vertical-align:middle; white-space: nowrap">
38 <span class="title_bar_top"><?php xl('Logged in as','e'); ?>: <?php echo $provider_results{"fname"}.' '.$provider_results{"lname"};?></span>
39 </td>
40 <td style="width:20%; text-align: right; vertical-align:middle; white-space: nowrap">
41 &nbsp;
42 </td>
43 </tr>
44 </table>
46 </body>
47 </html>