a75c64a4b56d3ece53bc563dd774654b3695903b
[openemr.git] / interface / forms / LBF / report.php
bloba75c64a4b56d3ece53bc563dd774654b3695903b
1 <?php
2 // Copyright (C) 2009 Rod Roark <rod@sunsetsystems.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 // of the License, or (at your option) any later version.
9 include_once("../../globals.php");
10 include_once($GLOBALS["srcdir"] . "/api.inc");
12 // This function is invoked from printPatientForms in report.inc
13 // when viewing a "comprehensive patient report". Also from
14 // interface/patient_file/encounter/forms.php.
16 function lbf_report($pid, $encounter, $cols, $id, $formname) {
17 require_once($GLOBALS["srcdir"] . "/options.inc.php");
18 echo "<table>\n";
20 $arr = array();
21 $fres = sqlStatement("SELECT field_id, field_value FROM lbf_data WHERE form_id = '$id'");
22 while ($frow = sqlFetchArray($fres)) {
23 $arr[$frow['field_id']] = $frow['field_value'];
25 display_layout_rows($formname, $arr);
27 echo "</table>\n";