Added support for a more expanded immunization data recording
[openemr.git] / interface / patient_file / summary / stats.php
blob04b9de3271140667557cf7b0211d2f5ba3a8ab9a
1 <?
2 include_once("../../globals.php");
3 include_once("$srcdir/lists.inc");
4 ?>
6 <html>
8 <head>
9 <link rel=stylesheet href="<?echo $css_header;?>" type="text/css">
10 </head>
13 <body <?echo $bottom_bg_line;?> topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
16 <table ><tr>
17 <td width="20%" valign="top">
18 <a href="stats_full.php?active=all" target="Main"><font class="title">Medical Problems</font><font class=more><?echo $tmore;?></font></a><br>
20 if ($result = getListByType($pid, "medical_problem", "id,title,comments", 1, "all", 0)){
21 foreach ($result as $iter) {
22 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
26 </td>
27 </tr>
28 <tr>
30 <td width="20%" valign="top">
31 <a href="stats_full.php?active=all" target="Main"><font class="title">Medications</font><font class=more><?echo $tmore;?></font></a><br>
33 if ($result = getListByType($pid, "medication", "id,title", 1, "all", 0)){
34 foreach ($result as $iter) {
35 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
39 </td>
40 </tr>
41 <tr>
42 <td width="20%" valign="top">
43 <a href="stats_full.php?active=all" target="Main"><font class="title">Allergies</font><font class=more><?echo $tmore;?></font></a><br>
45 if ($result = getListByType($pid, "allergy", "id,title", 1, "all", 0)){
46 foreach ($result as $iter) {
47 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . "</a><br>\n";
52 </td>
53 </tr>
54 <tr>
55 <td width="20%" valign="top">
56 <a href="stats_full.php?active=all" target="Main"><font class="title">Surgeries</font><font class=more><?echo $tmore;?></font></a><br>
58 if ($result = getListByType($pid, "surgery", "id,title,comments", 1, "all", 0)){
59 foreach ($result as $iter) {
60 echo "<a class=link target=Main href='stats_full.php?active=1'>" . $iter{"title"} . ": ".strterm($iter{"comments"},20)."</a><br>\n";
65 </td>
66 </tr>
67 <tr>
68 <td width="20%" valign="top">
69 <a href="immunizations.php" target="Main"><font class="title">Immunizations</font><font class=more><?echo $tmore;?></font></a><br>
70 <?$sql = "select if(i1.administered_date
71 ,concat(i1.administered_date,' - ',i2.name)
72 ,substring(i1.note,1,20)
73 ) as immunization_data
74 from immunizations i1
75 left join immunization i2
76 on i1.immunization_id = i2.id
77 where i1.patient_id = $pid
78 order by administered_date desc";
80 $result = sqlStatement($sql);
82 while ($row=sqlFetchArray($result)){
83 echo "<a class=link target=Main href='immunizations.php'>" . $row{'immunization_data'} . "</a><br>\n";
86 </td>
87 </tr>
88 <tr>
89 <td width="20%" valid="top"
91 $cwd= getcwd();
92 chdir("../../../");
93 require_once("library/classes/Controller.class.php");
94 $c = new Controller();
95 echo '<font class="title">Prescriptions</font>';
96 echo $c->act(array("prescription" => "", "block" => "", "patient_id" => $pid));
99 </td>
100 </tr>
101 </table>
106 </body>
107 </html>