Bug fix and improvements to lab display on onsite patient portal
authorbradymiller <bradymiller@users.sourceforge.net>
Sat, 19 Jan 2013 11:48:07 +0000 (19 03:48 -0800)
committerbradymiller <bradymiller@users.sourceforge.net>
Wed, 23 Jan 2013 00:16:01 +0000 (22 16:16 -0800)
 -Fixed bug to show both order names and result names
 -Reorganized column ordering to clarify results
 -Added some more columns to clarify results
 -Internationalized the items for Abnormal,Units,Result/Report Status

patients/get_lab_results.php

index 2c2b09e..e6afe49 100644 (file)
@@ -32,7 +32,8 @@
         //
 
        $ignoreAuth=true;
-       include_once('../interface/globals.php');
+       require_once('../interface/globals.php');
+        require_once('../library/options.inc.php');
 
        $selects = "po.procedure_order_id, po.date_ordered, " .
                "po.procedure_type_id AS order_type_id, pt1.name AS procedure_name, " .
                        <tr class="header">
                                <th><?php echo htmlspecialchars( xl('Order Date'),ENT_NOQUOTES); ?></th>
                                <th><?php echo htmlspecialchars( xl('Order Name'),ENT_NOQUOTES); ?></th>
-                               <th><?php echo htmlspecialchars( xl('Report Status'),ENT_NOQUOTES); ?></th>
-                               <th><?php echo htmlspecialchars( xl('Results Group'),ENT_NOQUOTES); ?></th>
+                                <th><?php echo htmlspecialchars( xl('Result Name'),ENT_NOQUOTES); ?></th>
                                <th><?php echo htmlspecialchars( xl('Abnormal'),ENT_NOQUOTES); ?></th>
                                <th><?php echo htmlspecialchars( xl('Value'),ENT_NOQUOTES); ?></th>
+                                <th><?php echo htmlspecialchars( xl('Range'),ENT_NOQUOTES); ?></th>
+                                <th><?php echo htmlspecialchars( xl('Units'),ENT_NOQUOTES); ?></th>
+                                <th><?php echo htmlspecialchars( xl('Result Status'),ENT_NOQUOTES); ?></th>
+                                <th><?php echo htmlspecialchars( xl('Report Status'),ENT_NOQUOTES); ?></th>
                        </tr>
                <?php
                $even=false;
                        echo "<tr class='".$class."'>";
                        echo "<td>".htmlspecialchars($date[1]."/".$date[2]."/".$date[0],ENT_NOQUOTES)."</td>";
                        echo "<td>".htmlspecialchars($row['procedure_name'],ENT_NOQUOTES)."</td>";
-                       echo "<td>".htmlspecialchars($row['report_status'],ENT_NOQUOTES)."</td>";
-                       echo "<td>".htmlspecialchars($row['result_status'],ENT_NOQUOTES)."</td>";
-                       echo "<td>".htmlspecialchars($row['abnormal'],ENT_NOQUOTES)."</td>";
+                        echo "<td>".htmlspecialchars($row['result_name'],ENT_NOQUOTES)."</td>";
+                        echo "<td>".generate_display_field(array('data_type'=>'1','list_id'=>'proc_res_abnormal'),$row['abnormal'])."</td>";
                        echo "<td>".htmlspecialchars($row['result'],ENT_NOQUOTES)."</td>";
+                        echo "<td>".htmlspecialchars($row['result_def_range'],ENT_NOQUOTES)."</td>";
+                        echo "<td>".generate_display_field(array('data_type'=>'1','list_id'=>'proc_unit'),$row['result_def_units'])."</td>";
+                        echo "<td>".generate_display_field(array('data_type'=>'1','list_id'=>'proc_res_status'),$row['result_status'])."</td>";
+                        echo "<td>".generate_display_field(array('data_type'=>'1','list_id'=>'proc_rep_status'),$row['report_status'])."</td>";
                        echo "</tr>";
                }
                echo "</table>";