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