2 require_once("../../globals.php");
3 require_once("$srcdir/billing.inc");
7 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID']);
8 } elseif ($mode == "delete") {
10 } elseif ($mode == "clear") {
17 <?php
html_header_show();?
>
18 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
21 <body
class="body_top">
23 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
25 <span
class=title
><?php
xl('Billing', 'e'); ?
></span
>
26 <font
class=more
><?php
echo $tback;?
></font
></a
>
28 <table border
=0 cellpadding
=3 cellspacing
=0>
31 if ($result = getBillingByEncounter($pid, $encounter, "*")) {
32 $billing_html = array();
33 foreach ($result as $iter) {
34 if ($iter["code_type"] == "ICD9") {
36 $html .= "<td valign=\"middle\"></td>" .
37 "<td><div><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
38 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
40 $billing_html[$iter["code_type"]] .= $html;
42 } elseif ($iter["code_type"] == "COPAY") {
43 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
44 "<td><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
45 $iter{"code"}."</b> " . ucwords(strtolower($iter{"code_text"})) .
48 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
49 "<td><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
50 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
51 "</a><span class=\"small\">";
52 $js = explode(":", $iter['justify']);
57 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
59 $billing_html[$iter["code_type"]] .= " ($j)";
66 $billing_html[$iter["code_type"]] .= "</span></td>";
67 $billing_html[$iter["code_type"]] .= "<td>" .
68 "<a class=\"link_submit\" href='diagnosis_full.php?mode=clear&id=" .
69 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[" . xl('Clear Justification') .
73 $billing_html[$iter["code_type"]] .= "<td>" .
74 "<a class=\"link_submit\" href='diagnosis_full.php?mode=delete&id=" .
75 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[Delete]</a></td>";
76 $billing_html[$iter["code_type"]] .= "</tr>\n";
79 foreach ($billing_html as $key => $val) {
80 print "<tr><td>$key</td><td><table>$val</table><td></tr><tr><td height=\"5\"></td></tr>\n";