* @author Brady Miller * @copyright Copyright (c) 2005 Rod Roark * @copyright Copyright (c) 2021 Brady Miller * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ require_once("../../globals.php"); require_once($GLOBALS["srcdir"] . "/api.inc"); function clinic_note_report($pid, $encounter, $cols, $id) { $cols = 1; // force always 1 column $count = 0; $data = sqlQuery("SELECT * " . "FROM form_clinic_note WHERE " . "id = ? AND activity = '1'", array($id)); if ($data) { print "\n\n"; foreach ($data as $key => $value) { if ( $key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0.00" ) { continue; } if ($key == 'followup_required') { switch ($value) { case '1': $value = 'Yes'; break; case '2': $value = 'Pending investigation'; break; } } $key = ucwords(str_replace("_", " ", $key)); print "\n"; $count++; if ($count == $cols) { $count = 0; print "\n\n"; } } print "\n
" . xlt($key) . ": " . text($value) . " 
\n"; } }