more organization of autoloaded files (#424)
[openemr.git] / contrib / forms / evaluation / report.php
blobc1866129c983871f6aac1ac8a0728e872cdb2e6c
1 <?php
2 //------------Forms generated from formsWiz
3 include_once("../../globals.php");
4 include_once($GLOBALS["srcdir"]."/api.inc");
5 function evaluation_report( $pid, $encounter, $cols, $id) {
6 $count = 0;
7 $data = formFetch("form_evaluation", $id);
8 $sql = "SELECT name from form_evaluation_checks where foreign_id = '" . add_escape_custom($id) . "'";
9 $results = sqlQ($sql);
10 $data2 = array();
11 while ($row = sqlFetchArray($results)) {
12 $data2[] = $row['name'];
14 $data = array_merge($data,$data2);
15 if ($data) {
16 print "<table><tr>";
17 foreach($data as $key => $value) {
18 if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
19 continue;
21 if ($value == "on") {
22 $value = "yes";
25 $key=ucwords(str_replace("_"," ",$key));
26 if (is_numeric($key)){
27 $key = "check";
29 print "<td><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";
37 print "</tr></table>";