phpgacl implementation updates
[openemr.git] / interface / patient_file / summary / stats.php
blobf4b71def93d383d721fffaa01677a20dc9ed6507
1 <?
2 include_once("../../globals.php");
3 include_once("$srcdir/lists.inc");
4 include_once("$srcdir/acl.inc");
5 ?>
6 <html>
8 <head>
9 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
10 <style>
11 .link {
12 font-family: sans-serif;
13 text-decoration: none;
14 color: #000000;
15 font-size: 8pt;
17 </style>
18 </head>
20 <body <?echo $bottom_bg_line;?> topmargin='0' rightmargin='0' leftmargin='2'
21 bottommargin='0' marginwidth='2' marginheight='0'>
24 $thisauth = acl_check('patients', 'med');
25 if (!$thisauth) {
26 echo "<p>(Issues not authorized)</p>\n";
27 echo "</body>\n</html>\n";
28 exit();
32 <table ><tr>
33 <td width="20%" valign="top">
34 <a href="stats_full.php?active=all" target="Main"><font class="title">Medical Problems</font><font class=more><?echo $tmore;?></font></a><br>
36 if ($result = getListByType($pid, "medical_problem", "id,title,comments", 1, "all", 0)){
37 foreach ($result as $iter) {
38 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
42 </td>
43 </tr>
44 <tr>
46 <td width="20%" valign="top">
47 <a href="stats_full.php?active=all" target="Main"><font class="title">Medications</font><font class=more><?echo $tmore;?></font></a><br>
49 if ($result = getListByType($pid, "medication", "id,title", 1, "all", 0)){
50 foreach ($result as $iter) {
51 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
55 </td>
56 </tr>
57 <tr>
58 <td width="20%" valign="top">
59 <a href="stats_full.php?active=all" target="Main"><font class="title">Allergies</font><font class=more><?echo $tmore;?></font></a><br>
61 if ($result = getListByType($pid, "allergy", "id,title", 1, "all", 0)){
62 foreach ($result as $iter) {
63 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
68 </td>
69 </tr>
70 <tr>
71 <td width="20%" valign="top">
72 <a href="stats_full.php?active=all" target="Main"><font class="title">Surgeries</font><font class=more><?echo $tmore;?></font></a><br>
74 if ($result = getListByType($pid, "surgery", "id,title,comments", 1, "all", 0)){
75 foreach ($result as $iter) {
76 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . ": ".strterm($iter{"comments"},20)."</a><br>\n";
81 </td>
82 </tr>
83 <tr>
84 <td width="20%" valign="top">
85 <a href="immunizations.php" target="Main"><font class="title">Immunizations</font><font class=more><?echo $tmore;?></font></a><br>
86 <?$sql = "select if(i1.administered_date
87 ,concat(i1.administered_date,' - ',i2.name)
88 ,substring(i1.note,1,20)
89 ) as immunization_data
90 from immunizations i1
91 left join immunization i2
92 on i1.immunization_id = i2.id
93 where i1.patient_id = $pid
94 order by administered_date desc";
96 $result = sqlStatement($sql);
98 while ($row=sqlFetchArray($result)){
99 echo "<a class=link target=Main href='immunizations.php'>" . $row{'immunization_data'} . "</a><br>\n";
102 </td>
103 </tr>
104 <tr>
105 <td width="20%" valign="top">
107 $cwd= getcwd();
108 chdir("../../../");
109 require_once("library/classes/Controller.class.php");
110 $c = new Controller();
111 echo '<font class="title">Prescriptions</font>';
112 echo $c->act(array("prescription" => "", "block" => "", "patient_id" => $pid));
114 </td>
115 </tr>
116 </table>
118 </body>
119 </html>