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:
10 $mode = $_GET['mode'];
11 $type = $_GET['type'];
12 $modifier = $_GET['modifier'];
13 $units = $_GET['units'];
15 $code = $_GET['code'];
16 $text = $_GET['text'];
18 if (!get_magic_quotes_gpc()) $text = addslashes($text);
22 if (strtolower($type) == "copay") {
23 addBilling($encounter, $type, sprintf("%01.2f", $code), $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", 0 - $code));
25 elseif (strtolower($type) == "other") {
26 addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
29 addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
36 <?php
html_header_show();?
>
37 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
39 <body
class="body_bottom">
41 <table border
=0 cellspacing
=0 cellpadding
=0 >
49 <a href
="superbill_custom_full.php" onclick
="top.restoreSession()">
50 <span
class=title
><?php
xl('Superbill','e'); ?
></span
>
51 <font
class=more
><?php
echo $tmore;?
></font
></a
>
53 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
54 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
56 <a href
="patient_encounter.php?codefrom=superbill" onclick
="top.restoreSession()">
59 <font
class=more
><?php
echo $tback;?
></font
></a
>
65 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
67 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
71 foreach ($code_types as $key => $value) {
72 $codes[$key] = array();
73 echo " <th align='left'>$key Codes</th>\n";
77 for ($iter = 0; $row = sqlFetchArray($res); $iter++
){
78 foreach ($code_types as $key => $value) {
79 if ($value['id'] == $row['code_type']) {
80 $codes[$key][] = $row;
89 foreach ($codes as $value)
90 $numlines = max($numlines, count($value));
92 while ($index < $numlines) {
94 foreach ($codes as $key => $value) {
95 echo " <td valign='top'>\n";
96 if(!empty($value[$index])) {
97 $code = $value[$index];
98 echo " <dd><a class='text' ";
99 if (!$GLOBALS['concurrent_layout']) echo "target='Main' ";
100 echo "href='superbill_codes.php?back=1&mode=add" .
101 "&type=" . urlencode($key) .
102 "&modifier=" . urlencode($code{"modifier"}) .
103 "&units=" . urlencode($code{"units"}) .
104 "&fee=" . urlencode($code{"fee"}) .
105 "&code=" . urlencode($code{"code"}) .
106 "&text=" . urlencode($code{"code_text"}) .
107 "' onclick='top.restoreSession()'>";
108 echo "<b>" . $code['code'] . "</b>" . " " . $code['modifier'] . " " . $code['code_text'] ;