Visolve: Clear Active Patient Changes
[openemr.git] / interface / patient_file / encounter / diagnosis_full.php
blobfda9ad315145d1d13827f1ee35a1899d9e93189c
1 <?php
2 require_once("../../globals.php");
3 require_once("$srcdir/billing.inc");
4 require_once("$srcdir/formdata.inc.php");
6 $targparm = $GLOBALS['concurrent_layout'] ? "" : "target='Main'";
8 if (isset($mode)) {
9 if ($mode == "add") {
10 addBilling($encounter, $type, $code, strip_escape_custom($text),$pid, $userauthorized,$_SESSION['authUserID']);
12 elseif ($mode == "delete") {
13 deleteBilling($id);
15 elseif ($mode == "clear") {
16 clearBilling($id);
20 <html>
21 <head>
22 <?php html_header_show();?>
23 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
24 </head>
26 <body class="body_top">
28 <?php if ($GLOBALS['concurrent_layout']) { ?>
29 <a href="encounter_bottom.php" onclick="top.restoreSession()">
30 <?php } else { ?>
31 <a href="patient_encounter.php" target="Main" onclick="top.restoreSession()">
32 <?php } ?>
34 <span class=title><?php xl('Billing','e'); ?></span>
35 <font class=more><?php echo $tback;?></font></a>
37 <table border=0 cellpadding=3 cellspacing=0>
39 <?php
40 if ($result = getBillingByEncounter($pid,$encounter,"*") ) {
41 $billing_html = array();
42 foreach ($result as $iter) {
43 if ($iter["code_type"] == "ICD9") {
44 $html = "<tr>";
45 $html .= "<td valign=\"middle\"></td>" .
46 "<td><div><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
47 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
48 "</a></div></td>\n";
49 $billing_html[$iter["code_type"]] .= $html;
50 $counter++;
52 elseif ($iter["code_type"] == "COPAY") {
53 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
54 "<td><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
55 $iter{"code"}."</b> " . ucwords(strtolower($iter{"code_text"})) .
56 "</a></td>\n";
58 else {
59 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
60 "<td><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
61 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
62 "</a><span class=\"small\">";
63 $js = split(":",$iter['justify']);
64 $counter = 0;
65 foreach ($js as $j) {
66 if(!empty($j)) {
67 if ($counter == 0) {
68 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
70 else {
71 $billing_html[$iter["code_type"]] .= " ($j)";
73 $counter++;
77 $billing_html[$iter["code_type"]] .= "</span></td>";
78 $billing_html[$iter["code_type"]] .= "<td>" .
79 "<a class=\"link_submit\" href='diagnosis_full.php?mode=clear&id=" .
80 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[" . xl('Clear Justification') .
81 "]</a></td>";
84 $billing_html[$iter["code_type"]] .= "<td>" .
85 "<a class=\"link_submit\" href='diagnosis_full.php?mode=delete&id=" .
86 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[Delete]</a></td>";
87 $billing_html[$iter["code_type"]] .= "</tr>\n";
90 foreach ($billing_html as $key => $val) {
91 print "<tr><td>$key</td><td><table>$val</table><td></tr><tr><td height=\"5\"></td></tr>\n";
96 </table>
98 </body>
99 </html>