Multiple improvements from IPPF related to layouts. (#1081)
[openemr.git] / interface / patient_file / encounter / diagnosis_full.php
blob4d10e5c32f009c9622f424446f7bf82e91f80c7f
1 <?php
2 require_once("../../globals.php");
3 require_once("$srcdir/billing.inc");
5 if (isset($mode)) {
6 if ($mode == "add") {
7 addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized, $_SESSION['authUserID']);
8 } elseif ($mode == "delete") {
9 deleteBilling($id);
10 } elseif ($mode == "clear") {
11 clearBilling($id);
15 <html>
16 <head>
17 <?php html_header_show();?>
18 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
19 </head>
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>
30 <?php
31 if ($result = getBillingByEncounter($pid, $encounter, "*")) {
32 $billing_html = array();
33 foreach ($result as $iter) {
34 if ($iter["code_type"] == "ICD9") {
35 $html = "<tr>";
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"})) .
39 "</a></div></td>\n";
40 $billing_html[$iter["code_type"]] .= $html;
41 $counter++;
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"})) .
46 "</a></td>\n";
47 } else {
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']);
53 $counter = 0;
54 foreach ($js as $j) {
55 if (!empty($j)) {
56 if ($counter == 0) {
57 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
58 } else {
59 $billing_html[$iter["code_type"]] .= " ($j)";
62 $counter++;
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') .
70 "]</a></td>";
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";
85 </table>
87 </body>
88 </html>