Skip to content

Commit

Permalink
Converting billing scripts and calendar add_edit_event.php to new sec…
Browse files Browse the repository at this point in the history
…urity model.
  • Loading branch information
bradymiller committed May 1, 2012
1 parent cb42b47 commit f631093
Show file tree
Hide file tree
Showing 15 changed files with 753 additions and 773 deletions.
257 changes: 125 additions & 132 deletions interface/billing/billing_report.php

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions interface/billing/print_billing_report.php
@@ -1,4 +1,8 @@
<?php

$fake_register_globals=false;
$sanitize_all_escapes=true;

include_once("../globals.php");

include_once("$srcdir/patient.inc");
Expand Down Expand Up @@ -63,7 +67,7 @@
<body bgcolor="#ffffff" topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>


<a href="javascript:window.close();" target=Main><font class=title><?php xl('Billing Report','e')?></font></a>
<a href="javascript:window.close();" target=Main><font class=title><?php echo xlt('Billing Report')?></font></a>
<br>


Expand Down Expand Up @@ -170,23 +174,23 @@
print "<table border=0><tr>\n"; // small table
$first_time=0;
}
print "<tr><td colspan=5><hr><span class=bold>" . $name{"fname"} . " " . $name{"lname"} . "</span><br><br>\n";
print "<tr><td colspan=5><hr><span class=bold>" . text($name{"fname"}) . " " . text($name{"lname"}) . "</span><br><br>\n";
//==================================


print "<font class=bold>Patient Data:</font><br>";
print "<font class=bold>" . xlt("Patient Data") . ":</font><br>";
printRecDataOne($patient_data_array, getRecPatientData ($iter{"pid"}), $COLS);

print "<font class=bold>Employer Data:</font><br>";
print "<font class=bold>" . xlt("Employer Data") . ":</font><br>";
printRecDataOne($employer_data_array, getRecEmployerData ($iter{"pid"}), $COLS);

print "<font class=bold>Primary Insurance Data:</font><br>";
print "<font class=bold>" . xlt("Primary Insurance Data") . ":</font><br>";
printRecDataOne($insurance_data_array, getRecInsuranceData ($iter{"pid"},"primary"), $COLS);

print "<font class=bold>Secondary Insurance Data:</font><br>";
print "<font class=bold>" . xlt("Secondary Insurance Data") . ":</font><br>";
printRecDataOne($insurance_data_array, getRecInsuranceData ($iter{"pid"},"secondary"), $COLS);

print "<font class=bold>Tertiary Insurance Data:</font><br>";
print "<font class=bold>" . xlt("Tertiary Insurance Data") . ":</font><br>";
printRecDataOne($insurance_data_array, getRecInsuranceData ($iter{"pid"},"tertiary"), $COLS);


Expand All @@ -197,7 +201,7 @@
$old_pid = $iter{"pid"};

}
print "<td width=100><span class=text>" . $iter{"code_type"} . ": </span></td><td width=100><span class=text>" . $iter{"code"} . "</span></td><td width=100><span class=small>(" . date("Y-m-d",strtotime($iter{"date"})) . ")</span></td>\n";
print "<td width=100><span class=text>" . text($iter{"code_type"}) . ": </span></td><td width=100><span class=text>" . text($iter{"code"}) . "</span></td><td width=100><span class=small>(" . text(date("Y-m-d",strtotime($iter{"date"}))) . ")</span></td>\n";
$res_count++;
if ($res_count == $N) {
print "</tr><tr>\n";
Expand Down
345 changes: 174 additions & 171 deletions interface/forms/fee_sheet/new.php

Large diffs are not rendered by default.

327 changes: 165 additions & 162 deletions interface/main/calendar/add_edit_event.php

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions interface/patient_file/encounter/diagnosis.php
Expand Up @@ -4,11 +4,12 @@
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.

include_once("../../globals.php");
include_once("$srcdir/billing.inc");
include_once("$srcdir/sql.inc");
include_once("$srcdir/acl.inc");
require_once("../../globals.php");
require_once("$srcdir/billing.inc");
require_once("$srcdir/sql.inc");
require_once("$srcdir/acl.inc");
require_once("$srcdir/formatting.inc.php");
require_once("$srcdir/formdata.inc.php");

$mode = $_REQUEST['mode'];
$type = $_REQUEST['type'];
Expand Down Expand Up @@ -46,12 +47,12 @@
$provid = $tmp['id'] ? $tmp['id'] : $_SESSION["authUserID"];

if (strtolower($type) == "copay") {
addBilling($encounter, $type, sprintf("%01.2f", $code), $payment_method,
addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($payment_method),
$pid, $userauthorized, $provid, $modifier, $units,
sprintf("%01.2f", 0 - $code));
}
elseif (strtolower($type) == "other") {
addBilling($encounter, $type, $code, $text, $pid, $userauthorized,
addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,
$provid, $modifier, $units, sprintf("%01.2f", $fee));
}
else {
Expand All @@ -63,7 +64,7 @@
"ORDER BY date DESC LIMIT 1");
if (!empty($tmp)) $ndc_info = $tmp['ndc_info'];
}
addBilling($encounter, $type, $code, $text, $pid, $userauthorized,
addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,
$provid, $modifier, $units, $fee, $ndc_info);
}
}
Expand Down
7 changes: 4 additions & 3 deletions interface/patient_file/encounter/diagnosis_full.php
@@ -1,12 +1,13 @@
<?php
include_once("../../globals.php");
include_once("$srcdir/billing.inc");
require_once("../../globals.php");
require_once("$srcdir/billing.inc");
require_once("$srcdir/formdata.inc.php");

$targparm = $GLOBALS['concurrent_layout'] ? "" : "target='Main'";

if (isset($mode)) {
if ($mode == "add") {
addBilling($encounter, $type, $code, $text,$pid, $userauthorized,$_SESSION['authUserID']);
addBilling($encounter, $type, $code, strip_escape_custom($text),$pid, $userauthorized,$_SESSION['authUserID']);
}
elseif ($mode == "delete") {
deleteBilling($id);
Expand Down
9 changes: 4 additions & 5 deletions interface/patient_file/encounter/superbill_codes.php
Expand Up @@ -3,6 +3,7 @@
include_once("../../../custom/code_types.inc.php");
include_once("$srcdir/billing.inc");
include_once("$srcdir/sql.inc");
require_once("$srcdir/formdata.inc.php");

//the number of rows to display before resetting and starting a new column:
$N=10;
Expand All @@ -15,18 +16,16 @@
$code = $_GET['code'];
$text = $_GET['text'];

if (!get_magic_quotes_gpc()) $text = addslashes($text);

if (isset($mode)) {
if ($mode == "add") {
if (strtolower($type) == "copay") {
addBilling($encounter, $type, sprintf("%01.2f", $code), $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", 0 - $code));
addBilling($encounter, $type, sprintf("%01.2f", $code), strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", 0 - $code));
}
elseif (strtolower($type) == "other") {
addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,sprintf("%01.2f", $fee));
}
else {
addBilling($encounter, $type, $code, $text, $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
addBilling($encounter, $type, $code, strip_escape_custom($text), $pid, $userauthorized,$_SESSION['authUserID'],$modifier,$units,$fee);
}
}
}
Expand Down

3 comments on commit f631093

@aethelwulffe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

billing_report or criteria_tab issues: Name search query fails.

ERROR: query failed: select distinct billing.id, form_encounter.date, billing.pid, billing.code_type, billing.code, billing.user from form_encounter, billing, patient_data, claims, insurance_data where billing.encounter = form_encounter.encounter and billing.pid = form_encounter.pid and patient_data.pid = form_encounter.pid and claims.patient_id = form_encounter.pid and claims.encounter_id = form_encounter.encounter and insurance_data.pid = form_encounter.pid and insurance_data.type = 'primary' AND (patient_data.fname like 'Mike%' or patient_data.lname like 'Mike%') and billing.code_type like ? and billing.activity = 1 order by billing.pid, billing.date ASC

@aethelwulffe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor value not right. hovering over appointment slots get a flicker when x/y value == .
Appointment pop-up does not submit/save.
Minimizing appointment pop-up in windows results in the window minimizing and restoring about 30 times in an amusing manner.
Reverted installed instance to older calender directory. Might be related to library/encounter_events.inc.php
Setting up testbed or finding demo to verify all above.

@bradymiller
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Art,
This isn't a very good place for bug reports/etc. since lots of developers do now watch this. Much better to post this on the sourceforge forums/tracker.
-brady

Please sign in to comment.