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