Highway to PSR2
[openemr.git] / contrib / forms / hpi / report.php
blob092486b5926bc65a6d96c81d61b4fabed187f3e7
1 <?php
2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 //------------Forms generated from formsWiz
8 include_once("../../globals.php");
9 include_once($GLOBALS["srcdir"] . "/api.inc");
10 function hpi_report($pid, $encounter, $cols, $id)
12 $count = 0;
13 $data = formFetch("form_hpi", $id);
14 $width = 100/$cols;
15 if ($data) {
16 print "<table cellspacing=3px><tr>";
17 foreach ($data as $key => $value) {
18 if ($key == "id" || $key == "pid" || $key == "user" ||
19 $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "complaint" ||
20 $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
21 continue;
24 if ($value == "on") {
25 $value = "yes";
28 $key=ucwords(str_replace("_", " ", $key));
29 print "<td width='${width}%' valign='top'><span class=bold>$key: </span><span class=text>$value</span></td>";
30 $count++;
31 if ($count == $cols) {
32 $count = 0;
33 print "</tr><tr>\n";
38 print "</tr></table>";