2 require_once("../../globals.php");
3 require_once("$srcdir/billing.inc");
10 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID']);
11 } elseif ($mode == "delete") {
13 } elseif ($mode == "clear") {
20 <?php
html_header_show();?
>
21 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
24 <body
class="body_top">
26 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
28 <span
class=title
><?php
xl('Billing', 'e'); ?
></span
>
29 <font
class=more
><?php
echo $tback;?
></font
></a
>
31 <table border
=0 cellpadding
=3 cellspacing
=0>
34 if ($result = getBillingByEncounter($pid, $encounter, "*")) {
35 $billing_html = array();
36 foreach ($result as $iter) {
37 if ($iter["code_type"] == "ICD9") {
39 $html .= "<td valign=\"middle\"></td>" .
40 "<td><div><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
41 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
43 $billing_html[$iter["code_type"]] .= $html;
45 } elseif ($iter["code_type"] == "COPAY") {
46 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
47 "<td><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
48 $iter{"code"}."</b> " . ucwords(strtolower($iter{"code_text"})) .
51 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
52 "<td><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
53 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
54 "</a><span class=\"small\">";
55 $js = explode(":", $iter['justify']);
60 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
62 $billing_html[$iter["code_type"]] .= " ($j)";
69 $billing_html[$iter["code_type"]] .= "</span></td>";
70 $billing_html[$iter["code_type"]] .= "<td>" .
71 "<a class=\"link_submit\" href='diagnosis_full.php?mode=clear&id=" .
72 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[" . xl('Clear Justification') .
76 $billing_html[$iter["code_type"]] .= "<td>" .
77 "<a class=\"link_submit\" href='diagnosis_full.php?mode=delete&id=" .
78 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[Delete]</a></td>";
79 $billing_html[$iter["code_type"]] .= "</tr>\n";
82 foreach ($billing_html as $key => $val) {
83 print "<tr><td>$key</td><td><table>$val</table><td></tr><tr><td height=\"5\"></td></tr>\n";