2 include_once("../../globals.php");
3 include_once("../../../custom/code_types.inc.php");
4 include_once("$srcdir/billing.inc");
5 include_once("$srcdir/sql.inc");
7 //the number of rows to display before resetting and starting a new column:
12 if (strtolower($type) == "copay") {
13 addBilling($encounter, $type, sprintf("%01.2f", $code), $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", 0 - $code));
15 elseif (strtolower($type) == "other") {
16 addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
19 addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
26 <link rel
=stylesheet href
="<?echo $css_header;?>" type
="text/css">
28 <body
<?
echo $bottom_bg_line;?
> topmargin
=0 rightmargin
=0 leftmargin
=2 bottommargin
=0 marginwidth
=2 marginheight
=0>
30 <table border
=0 cellspacing
=0 cellpadding
=0 >
36 <dt
><a href
="superbill_custom_full.php" ><span
class=title
>Superbill
</span
><font
class=more
><?
echo $tmore;?
></font
></a
>
37 <a href
="patient_encounter.php?codefrom=superbill" ><font
class=more
><?
echo $tback;?
></font
></a
></dt
>
41 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
43 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
47 foreach ($code_types as $key => $value) {
48 $codes[$key] = array();
49 echo " <th align='left'>$key Codes</th>\n";
53 for ($iter = 0; $row = sqlFetchArray($res); $iter++
){
54 foreach ($code_types as $key => $value) {
55 if ($value['id'] == $row['code_type']) {
56 $codes[$key][] = $row;
65 foreach ($codes as $value)
66 $numlines = max($numlines, count($value));
68 while ($index < $numlines) {
70 foreach ($codes as $key => $value) {
71 echo " <td valign='top'>\n";
72 if(!empty($value[$index])) {
73 $code = $value[$index];
74 echo " <dd><a class='text' target='Main' href='superbill_codes.php?back=1&mode=add" .
75 "&type=" . urlencode($key) .
76 "&modifier=" . urlencode($code{"modifier"}) .
77 "&units=" . urlencode($code{"units"}) .
78 "&fee=" . urlencode($code{"fee"}) .
79 "&code=" . urlencode($code{"code"}) .
80 "&text=" . urlencode($code{"code_text"}) . "'>";
81 echo "<b>" . $code['code'] . "</b>" . " " . $code['modifier'] . " " . $code['code_text'] ;