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");
6 require_once("$srcdir/formdata.inc.php");
8 //the number of rows to display before resetting and starting a new column:
11 $mode = $_GET['mode'];
12 $type = $_GET['type'];
13 $modifier = $_GET['modifier'];
14 $units = $_GET['units'];
16 $code = $_GET['code'];
17 $text = $_GET['text'];
21 if (strtolower($type) == "copay") {
22 addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", 0 - $code));
24 elseif (strtolower($type) == "other") {
25 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
28 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
35 <?php
html_header_show();?
>
36 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
38 <body
class="body_bottom">
40 <table border
=0 cellspacing
=0 cellpadding
=0 >
48 <a href
="superbill_custom_full.php" onclick
="top.restoreSession()">
49 <span
class=title
><?php
xl('Superbill','e'); ?
></span
>
50 <font
class=more
><?php
echo $tmore;?
></font
></a
>
52 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
54 <font
class=more
><?php
echo $tback;?
></font
></a
>
60 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
62 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
66 foreach ($code_types as $key => $value) {
67 $codes[$key] = array();
68 echo " <th align='left'>$key Codes</th>\n";
72 for ($iter = 0; $row = sqlFetchArray($res); $iter++
){
73 foreach ($code_types as $key => $value) {
74 if ($value['id'] == $row['code_type']) {
75 $codes[$key][] = $row;
84 foreach ($codes as $value)
85 $numlines = max($numlines, count($value));
87 while ($index < $numlines) {
89 foreach ($codes as $key => $value) {
90 echo " <td valign='top'>\n";
91 if(!empty($value[$index])) {
92 $code = $value[$index];
93 echo " <dd><a class='text' ";
94 echo "href='superbill_codes.php?back=1&mode=add" .
95 "&type=" . urlencode($key) .
96 "&modifier=" . urlencode($code{"modifier"}) .
97 "&units=" . urlencode($code{"units"}) .
98 "&fee=" . urlencode($code{"fee"}) .
99 "&code=" . urlencode($code{"code"}) .
100 "&text=" . urlencode($code{"code_text"}) .
101 "' onclick='top.restoreSession()'>";
102 echo "<b>" . $code['code'] . "</b>" . " " . $code['modifier'] . " " . $code['code_text'] ;