2 require_once("../../globals.php");
3 require_once("$srcdir/billing.inc");
7 addBilling($encounter, $type, $code, strip_escape_custom($text),$pid, $userauthorized,$_SESSION['authUserID']);
9 elseif ($mode == "delete") {
12 elseif ($mode == "clear") {
19 <?php
html_header_show();?
>
20 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
23 <body
class="body_top">
25 <a href
="encounter_bottom.php" onclick
="top.restoreSession()">
27 <span
class=title
><?php
xl('Billing','e'); ?
></span
>
28 <font
class=more
><?php
echo $tback;?
></font
></a
>
30 <table border
=0 cellpadding
=3 cellspacing
=0>
33 if ($result = getBillingByEncounter($pid,$encounter,"*") ) {
34 $billing_html = array();
35 foreach ($result as $iter) {
36 if ($iter["code_type"] == "ICD9") {
38 $html .= "<td valign=\"middle\"></td>" .
39 "<td><div><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
40 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
42 $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"})) .
52 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
53 "<td><a class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
54 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
55 "</a><span class=\"small\">";
56 $js = explode(":",$iter['justify']);
61 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
64 $billing_html[$iter["code_type"]] .= " ($j)";
70 $billing_html[$iter["code_type"]] .= "</span></td>";
71 $billing_html[$iter["code_type"]] .= "<td>" .
72 "<a class=\"link_submit\" href='diagnosis_full.php?mode=clear&id=" .
73 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[" . xl('Clear Justification') .
77 $billing_html[$iter["code_type"]] .= "<td>" .
78 "<a class=\"link_submit\" href='diagnosis_full.php?mode=delete&id=" .
79 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[Delete]</a></td>";
80 $billing_html[$iter["code_type"]] .= "</tr>\n";
83 foreach ($billing_html as $key => $val) {
84 print "<tr><td>$key</td><td><table>$val</table><td></tr><tr><td height=\"5\"></td></tr>\n";