Code type module improvements:
[openemr.git] / interface / patient_file / encounter / encounter_title.php
blob318e5818cebe16987968b52407f81434a4cbbf90
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/forms.inc");
4 include_once("$srcdir/encounter.inc");
5 include_once("$srcdir/patient.inc");
6 require_once("$srcdir/classes/Pharmacy.class.php");
7 ?>
9 <html>
10 <head>
11 <?php html_header_show();?>
13 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
15 </head>
16 <body class="body_title">
18 <?php
19 $result = getPatientData($pid, "fname,lname,pid,pubpid,phone_home,pharmacy_id,DOB,DATE_FORMAT(DOB,'%Y%m%d') as DOB_YMD");
20 $provider_results = sqlQuery("select * from users where username='" . $_SESSION{"authUser"} . "'");
21 $age = getPatientAge($result["DOB_YMD"]);
23 $info = 'ID: ' . $result['pubpid'];
24 if ($result['DOB']) $info .= ', DOB: ' . $result['DOB'] . ', Age: ' . $age;
25 if ($result['phone_home']) $info .= ', Home: ' . $result['phone_home'];
27 if ($result['pharmacy_id']) {
28 $pharmacy = new Pharmacy($result['pharmacy_id']);
29 if ($pharmacy->get_phone()) $info .= ', Pharm: ' . $pharmacy->get_phone();
32 if (!empty($_GET["set_encounter"])) {
33 setencounter($_GET["set_encounter"]);
36 if(!empty($encounter)){
37 $subresult = getEncounterDateByEncounter($encounter);
38 $encounter_date = dateformat(strtotime($subresult['date']));
39 } else {
40 $encounter_date = dateformat(); //otherwise, set today's date
44 <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
45 <tr>
46 <td width="33%" valign="middle" nowrap>
48 <span class="title_bar_top"><?php echo $result{"fname"} . " " . $result{"lname"};?></span>
50 <span style="font-size:8pt;">(<?php echo $info; ?>)</span>
51 </td>
52 <td width="33%" align="center" valign="middle" nowrap>
53 <span class="title"><?php echo xl('Logged in as') . ': ' . $provider_results{"fname"} . ' ' . $provider_results{"lname"}; ?></span>
54 </td>
55 <td width="33%" align="right" valign="middle" nowrap>
56 <span class="title_bar_top"><?php xl('Encounter','e', '', ' '); echo $encounter_date; ?> </span>
57 </td>
58 </tr>
59 </table>
61 </body>
62 </html>