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));
22 elseif (strtolower($type) == "other") {
23 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
26 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
33 <?php
html_header_show();?
>
34 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
36 <body
class="body_bottom">
38 <table border
=0 cellspacing
=0 cellpadding
=0 >
46 <a href
="superbill_custom_full.php" onclick
="top.restoreSession()">
47 <span
class=title
><?php
xl('Superbill','e'); ?
></span
>
48 <font
class=more
><?php
echo $tmore;?
></font
></a
>
50 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
52 <font
class=more
><?php
echo $tback;?
></font
></a
>
58 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
60 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
64 foreach ($code_types as $key => $value) {
65 $codes[$key] = array();
66 echo " <th align='left'>$key Codes</th>\n";
70 for ($iter = 0; $row = sqlFetchArray($res); $iter++
){
71 foreach ($code_types as $key => $value) {
72 if ($value['id'] == $row['code_type']) {
73 $codes[$key][] = $row;
82 foreach ($codes as $value)
83 $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'] ;