2 include_once("../../globals.php");
3 include_once("../../../custom/code_types.inc.php");
4 include_once("$srcdir/billing.inc");
6 //the number of rows to display before resetting and starting a new column:
10 $type = $_GET['type'];
11 $modifier = $_GET['modifier'];
12 $units = $_GET['units'];
14 $code = $_GET['code'];
15 $text = $_GET['text'];
19 if (strtolower($type) == "copay") {
20 addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, sprintf("%01.2f", 0 - $code));
21 } elseif (strtolower($type) == "other") {
22 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, sprintf("%01.2f", $fee));
24 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID'], $modifier, $units, $fee);
31 <?php
html_header_show();?
>
32 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
34 <body
class="body_bottom">
36 <table border
=0 cellspacing
=0 cellpadding
=0 >
44 <a href
="superbill_custom_full.php" onclick
="top.restoreSession()">
45 <span
class=title
><?php
xl('Superbill', 'e'); ?
></span
>
46 <font
class=more
><?php
echo $tmore;?
></font
></a
>
48 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
50 <font
class=more
><?php
echo $tback;?
></font
></a
>
56 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
58 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
62 foreach ($code_types as $key => $value) {
63 $codes[$key] = array();
64 echo " <th align='left'>$key Codes</th>\n";
69 for ($iter = 0; $row = sqlFetchArray($res); $iter++
) {
70 foreach ($code_types as $key => $value) {
71 if ($value['id'] == $row['code_type']) {
72 $codes[$key][] = $row;
81 foreach ($codes as $value) {
82 $numlines = max($numlines, count($value));
85 while ($index < $numlines) {
87 foreach ($codes as $key => $value) {
88 echo " <td valign='top'>\n";
89 if (!empty($value[$index])) {
90 $code = $value[$index];
91 echo " <dd><a class='text' ";
92 echo "href='superbill_codes.php?back=1&mode=add" .
93 "&type=" . urlencode($key) .
94 "&modifier=" . urlencode($code{"modifier"}) .
95 "&units=" . urlencode($code{"units"}) .
96 "&fee=" . urlencode($code{"fee"}) .
97 "&code=" . urlencode($code{"code"}) .
98 "&text=" . urlencode($code{"code_text"}) .
99 "' onclick='top.restoreSession()'>";
100 echo "<b>" . $code['code'] . "</b>" . " " . $code['modifier'] . " " . $code['code_text'] ;