supporting data peculiar to ippf issue types
[openemr.git] / interface / patient_file / encounter / diagnosis_full.php
blobe168c69e3a4fd8afe983b7bb1776b2649fb3eb89
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/billing.inc");
5 $targparm = $GLOBALS['concurrent_layout'] ? "" : "target='Main'";
7 if (isset($mode)) {
8 if ($mode == "add") {
9 addBilling($encounter, $type, $code, $text,$pid, $userauthorized,$_SESSION['authUserID']);
11 elseif ($mode == "delete") {
12 deleteBilling($id);
14 elseif ($mode == "clear") {
15 clearBilling($id);
19 <html>
20 <head>
21 <?php html_header_show();?>
22 <link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css">
23 </head>
25 <body class="body_top">
27 <?php if ($GLOBALS['concurrent_layout']) { ?>
28 <a href="encounter_bottom.php" onclick="top.restoreSession()">
29 <?php } else { ?>
30 <a href="patient_encounter.php" target="Main" onclick="top.restoreSession()">
31 <?php } ?>
33 <span class=title><?php xl('Billing','e'); ?></span>
34 <font class=more><?php echo $tback;?></font></a>
36 <table border=0 cellpadding=3 cellspacing=0>
38 <?php
39 if ($result = getBillingByEncounter($pid,$encounter,"*") ) {
40 $billing_html = array();
41 foreach ($result as $iter) {
42 if ($iter["code_type"] == "ICD9") {
43 $html = "<tr>";
44 $html .= "<td valign=\"middle\"></td>" .
45 "<td><div><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
46 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
47 "</a></div></td>\n";
48 $billing_html[$iter["code_type"]] .= $html;
49 $counter++;
51 elseif ($iter["code_type"] == "COPAY") {
52 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
53 "<td><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
54 $iter{"code"}."</b> " . ucwords(strtolower($iter{"code_text"})) .
55 "</a></td>\n";
57 else {
58 $billing_html[$iter["code_type"]] .= "<tr><td></td>" .
59 "<td><a $targparm class='small' href='diagnosis_full.php' onclick='top.restoreSession()'><b>" .
60 $iter{"code"} . "</b> " . ucwords(strtolower($iter{"code_text"})) .
61 "</a><span class=\"small\">";
62 $js = split(":",$iter['justify']);
63 $counter = 0;
64 foreach ($js as $j) {
65 if(!empty($j)) {
66 if ($counter == 0) {
67 $billing_html[$iter["code_type"]] .= " (<b>$j</b>)";
69 else {
70 $billing_html[$iter["code_type"]] .= " ($j)";
72 $counter++;
76 $billing_html[$iter["code_type"]] .= "</span></td>";
77 $billing_html[$iter["code_type"]] .= "<td>" .
78 "<a class=\"link_submit\" href='diagnosis_full.php?mode=clear&id=" .
79 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[" . xl('Clear Justification') .
80 "]</a></td>";
83 $billing_html[$iter["code_type"]] .= "<td>" .
84 "<a class=\"link_submit\" href='diagnosis_full.php?mode=delete&id=" .
85 $iter{"id"} . "' class='link' onclick='top.restoreSession()'>[Delete]</a></td>";
86 $billing_html[$iter["code_type"]] .= "</tr>\n";
89 foreach ($billing_html as $key => $val) {
90 print "<tr><td>$key</td><td><table>$val</table><td></tr><tr><td height=\"5\"></td></tr>\n";
95 </table>
97 </body>
98 </html>