minor improvement to the fee sheet search code drop down
[openemr.git] / interface / forms / treatment_plan / report.php
blobf77f5f2cb6ea31d64edbdc7d441acd97132b5510
1 <?php
2 /**
4 * Copyright (C) 2012-2013 Naina Mohamed <naina@capminds.com> CapMinds Technologies
6 * LICENSE: This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @package OpenEMR
18 * @author Naina Mohamed <naina@capminds.com>
19 * @link http://www.open-emr.org
23 include_once("../../globals.php");
24 include_once($GLOBALS["srcdir"]."/api.inc");
25 function treatment_plan_report( $pid, $encounter, $cols, $id) {
26 $count = 0;
27 $data = formFetch("form_treatment_plan", $id);
28 if ($data) {
29 print "<table><tr>";
30 foreach($data as $key => $value) {
31 if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
32 continue;
34 if ($value == "on") {
35 $value = "yes";
37 $key=ucwords(str_replace("_"," ",$key));
38 print "<td><span class=bold>".xlt($key). ": </span><span class=text>".text($value)."</span></td>";
39 $count++;
40 if ($count == $cols) {
41 $count = 0;
42 print "</tr><tr>\n";
46 print "</tr></table>";
48 ?>