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 <?php
if ($GLOBALS['concurrent_layout']) { ?
>
53 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
55 <a href
="patient_encounter.php?codefrom=superbill" onclick
="top.restoreSession()">
58 <font
class=more
><?php
echo $tback;?
></font
></a
>
64 <table border
=0 width
=100% cellpadding
=0 cellspacing
=1>
66 $res = sqlStatement("select * from codes where superbill = 1 order by code_type, code, code_text");
70 foreach ($code_types as $key => $value) {
71 $codes[$key] = array();
72 echo " <th align='left'>$key Codes</th>\n";
76 for ($iter = 0; $row = sqlFetchArray($res); $iter++
){
77 foreach ($code_types as $key => $value) {
78 if ($value['id'] == $row['code_type']) {
79 $codes[$key][] = $row;
88 foreach ($codes as $value)
89 $numlines = max($numlines, count($value));
91 while ($index < $numlines) {
93 foreach ($codes as $key => $value) {
94 echo " <td valign='top'>\n";
95 if(!empty($value[$index])) {
96 $code = $value[$index];
97 echo " <dd><a class='text' ";
98 if (!$GLOBALS['concurrent_layout']) echo "target='Main' ";
99 echo "href='superbill_codes.php?back=1&mode=add" .
100 "&type=" . urlencode($key) .
101 "&modifier=" . urlencode($code{"modifier"}) .
102 "&units=" . urlencode($code{"units"}) .
103 "&fee=" . urlencode($code{"fee"}) .
104 "&code=" . urlencode($code{"code"}) .
105 "&text=" . urlencode($code{"code_text"}) .
106 "' onclick='top.restoreSession()'>";
107 echo "<b>" . $code['code'] . "</b>" . " " . $code['modifier'] . " " . $code['code_text'] ;