The Third Reminders email bug fix - contributed by arnabnaha
[openemr.git] / interface / patient_file / summary / summary_title.php
blob79b67630b09154f54d3da8e2148a7366d681c9a0
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/patient.inc");
4 include_once("$srcdir/calendar.inc");
5 require_once("$srcdir/classes/Pharmacy.class.php");
6 ?>
7 <html>
8 <head>
9 <?php html_header_show();?>
10 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
11 <script type="text/javascript" src="../../../library/dialog.js"></script>
13 <script language='JavaScript'>
15 function newEvt() {
16 dlgopen('../../main/calendar/add_edit_event.php?patientid=<?php echo $pid ?>',
17 '_blank', 550, 270);
18 return false;
21 </script>
23 </head>
25 <body class="body_title">
27 <?php
28 $result = getPatientData($pid, "fname,lname,pid,pubpid,phone_home,pharmacy_id,DOB,DATE_FORMAT(DOB,'%Y%m%d') as DOB_YMD");
29 $provider_results = sqlQuery("select * from users where username='" . $_SESSION{"authUser"} . "'");
30 $age = getPatientAge($result["DOB_YMD"]);
32 $info = 'ID: ' . $result['pubpid'];
33 if ($result['DOB']) $info .= ', DOB: ' . $result['DOB'] . ', Age: ' . $age;
34 if ($result['phone_home']) $info .= ', Home: ' . $result['phone_home'];
36 if ($result['pharmacy_id']) {
37 $pharmacy = new Pharmacy($result['pharmacy_id']);
38 if ($pharmacy->get_phone()) $info .= ', Pharm: ' . $pharmacy->get_phone();
42 <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
43 <tr>
44 <td style="width:45%; vertical-align:middle; white-space: nowrap; text-align:left">
46 <span class="title_bar_top"><?php echo $result{"fname"} . " " . $result{"lname"};?></span>
48 <span style="font-size:0.7em;">(<?php echo $info ?>)</span>
49 </td>
50 <td style="width:35%; vertical-align:middle; white-space: nowrap; text-align:center">
51 <span class="title_bar_top"><?php xl('Logged in as','e'); ?>: <?php echo $provider_results{"fname"}.' '.$provider_results{"lname"};?></span>
52 </td>
53 <td style="width:20%; vertical-align:middle; white-space: nowrap; text-align:right">
54 <a href='' class='title_bar_top' onclick='return newEvt()'><?php xl('New Appointment','e'); ?></a>
55 </td>
56 </tr>
57 </table>
59 </body>
60 </html>