Patient Balance

jenjhall wrote on Monday, October 17, 2011:

I am wondering if it is possible to have the patient’s balance displayed rather than, or along with, the total balance in the notes section?  Is there a way to show the patient’s balance that I am missing?  I’m using openEMR 4.1.  Thanks - Jen

bradymiller wrote on Tuesday, October 18, 2011:

Hi,

This is now showing up in the ‘Billing’ widget at the top left of the patient summary screen. Click ‘expand’ to see it. Note there is also a setting in administration->globals->features->‘Force Billing Widget Open’ that will force it to always show on the patient summary screen.

-brady

jenjhall wrote on Thursday, October 20, 2011:

Hi Brady.  Thanks.  What I am looking for is a widget that could keep track of the amount that was owed by clients that don’t have their copays paid up-to-date.  If that information were easily available it would be very helpful.  Perhaps it is and I don’t know where.  At a physical therapy office we see clients often twice+ per week so the accounts receivable is not completed by the next time the client is seen.  Thanks - Jen

bradymiller wrote on Friday, October 21, 2011:

Hi,
My billing knowledge is rather weak. But guessing it would take minimal coding to get what you want. Perhaps somebody with more billing knowledge can chime in.
-brady

biller2 wrote on Wednesday, June 13, 2012:

Sorry for waking up an older topic bit I have a question.  I am currently using OpenEmr version 4.1.0 and running ubuntu-maverick with apache 2.2.16 php 5.3.3-1 mysql 5.1.49-1.  It seems that the patient balance that is displayed when the administration->globals->features->'Force Billing Widget Open is enabled is the total account balance ie., all debits minus all credits.  I was looking for just the amount that the patient owes at this particular point in time.  I found this thread http://sourceforge.net/projects/openemr/forums/forum/202505/topic/3876992 and then following the link the the code.  This link referred to version 3.2 I believe.   It looks like some “programing” was left out in the ~/library/patient.inc file starting about  line 1497.  I like what jenjhall originally asked in the first post in this thread that maybe have both the account total and the patient due both visible from the summary screen.  So I edited ~/librar/patient.inc file and pasted the lines that were in the 3.2 version patient.inc file into the 4.1 version patient.inc file and then edited ~/interface/patient_file/summary/demographics.php file and just added a link to the functions that I added to the patient.inc file.  I did have to change one of the function names ie. I called one get_patient_balance and one get_account balance.  Now when I click on the patient summary I get the patient balance and the account balance. 
Is there an easier way of accomplishing this?  If so it would be greatly appreciated if someone would be so kind to point me in that direction.  If not and I was able to add something worthwhile to the software I would like to find a way to incorporate so I don’t have to go through the whole process every time I upgrade.  I hope all that made sense.
Thanks in advance   John

bradymiller wrote on Wednesday, June 13, 2012:

Hi John,

The best thing to do is to get the code on github. What you are saying sounds like it may be a useful feature to get into the official codebase. Once on git/github, then very easy to get it reviewed/committed.

Here’s a git/github tutorial for OpenEMR:
http://open-emr.org/wiki/index.php/Git_for_dummies

Knowing git/github will be useful for you because:
1. Easy way to get your code reviewed/committed tot he codebase
2. Easy way to keep your customized code that isn’t in the official OpenEMR codebase when you upgrade OpenEMR versions

If unable to do this, then can try to figure out another way (perhaps emailing a developer the changed files, whom can then get it up on github).

-brady
OpenEMR

tmccormi wrote on Wednesday, June 13, 2012:

Here’s how we “tried” to do it, but we got some inconsistent results due to differences in the way payments (specifically COPAY) is handled.    But take a look a the code and use it if you like.

https://github.com/tmccormi/openemr/tree/balance-widget-410

It was based on rel-410 …

biller2 wrote on Wednesday, June 13, 2012:

Brady, thanks much for the link I guess its time to take a dive and learn git it will be nice not to keep having to change all the files when I upgrade =)  What is the best way to ask questions as I start my quest on git.  I don’t want to keep adding/cluttering this thread with stuff that isn’t related. I figure that since I have already made the changes its worth getting it reviewed and seeing if it works nothing more to loose and will gain some insight into git.

tmccormi, thanks much for your take and the link I will take a look and see what I can glean from it.  Was the “COPAY”  an issue back in version 3.2?  We had some other issues with using the popup payment “COPAY” method so I disabled that option and now payments are only entered through the fee’s payment screen so that might explain why it appears to be working.  I will learn git and get the code there for review and comments, it sure would be nice if it worked.
Thanks again for the comments and will start my learning.  John

bradymiller wrote on Wednesday, June 13, 2012:

Hi,

For git/github questions, feel free to open a new thread here. Don’t feel guilty about asking hundreds of git type questions; we all went through the same process and we are all aware of the rather steep learning curve for git.

-brady
OpenEMR

cerber98 wrote on Friday, June 15, 2012:

I made some modifications, which display the patient’s actual balance. I have the files, if you want them and Brady has also uploaded them for me to the github. Let me know if you’d like that, I can e-mail you the files.

Alex.

bradymiller wrote on Saturday, June 16, 2012:

Hi,

Here are the links to Alex’s modifications that I uploaded to github:

based on OpenEMR 4.1.0(8) code:
http://github.com/bradymiller/openemr/commits/alex-mixed-mods-rel410pat8_1

based on OpenEMR development code:
http://github.com/bradymiller/openemr/commits/alex-mixed-mods-master_1
(Note this is broken in places secondary to merging conflicts)

(This is the first version; there are also additonal mods to front_payment that I have not had time to upload)

-brady
OpenEMR

cerber98 wrote on Tuesday, June 19, 2012:

To display patient balance, you would need 2 files: demographics.php and patient.inc from the modifications on Brady’s github account above.

Cheers,
Alex.

bradymiller wrote on Wednesday, June 20, 2012:

Hi,

Note Alex’s above branches have been updated with some new code:

based on OpenEMR 4.1.0(8) code:
http://github.com/bradymiller/openemr/commits/alex-mixed-mods-rel410pat8_2

based on OpenEMR development code:
http://github.com/bradymiller/openemr/commits/alex-mixed-mods-master_2
(Note this is broken in places secondary to merging conflicts)

-brady
OpenEMR

bradymiller wrote on Wednesday, June 20, 2012:

Hi,

Here is the Patient Balance specific code. Please review this code by Alex: http://github.com/bradymiller/openemr/commits/alex-patient-balance_1

-brady
OpenEMR

kevmccor wrote on Wednesday, June 20, 2012:

For documentation purposes, may I suggest a DocBloc like this to replace the “//ALB Calculates patient due balance” line?  IMHO this is a valuable addition.  Thanks.

/**
 * ALB Calculates patient due balance if accounting is enabled
 *
 * determines patient balance, but removes pending
 * or not yet billed insurance claims. Data taken from billing,
 * ar_activity, and form_encounter tables.
 * 
 * @param string $pid     patient ID number
 * @return string             formatted balance amount
 */

biller2 wrote on Thursday, June 21, 2012:

Hello all, I tried git and made my changes I have no idea if I did it correctly I hope this is the link to my git https://github.com/biller2/openemr

All I did was add a patient balance “spot” next to the account balance position.  I copied the programing from the version 3.2 file.    Hopefully all this makes sense.  Thanks for your help in adding this to the emr.   John

juggernautsei wrote on Monday, June 03, 2013:

I have an issue that has arisen and wondered did anyone else run into this yet.

The patient balance use to show a credit in the EOB and now it does not after I ran the last patch 12. We are using WAMP and have been for years. Not new this has been installed through a few version changes going all the way back to 3.0. There no recent modifications to this area that we have done that I have recorded.

Like I said above this happened after the last patch update to 12.

Thanks!

fsgl wrote on Tuesday, June 11, 2013:

Hi Sherwin,

Does the credit balance appear in the Billing section of the Patient Summary?

The following cannot possibly be the answer because it is too easy and obvious. When entering an overpayment the software automatically adjusts out the credit. One has to actively override this by entering zero in the adjustment column. See attachment.

juggernautsei wrote on Thursday, June 13, 2013:

Yes it does show where you have pointed out but the software use to show this credit in the patient demographics as well. Now it does not. That is my point. They want the front desk to be able to see this credit again. This is too many clicks for the front desk to be looking for a credit in the system.

Thanks for the follow up but this is a report that the work that was done to display the patient balance in the patient’s demographics broke this function. I wanted to alert the group that who ever worked on this could s/he go back and fix this function. It happened in patch 12. When I take the code back to base 4.1.1 and pull up the patient chart. the credit shows.

Again, thanks for the followup.

fsgl wrote on Friday, June 14, 2013:

I have Patch 12 installed but no problem with the credit balance showing up in all the usual places.

Since you dialed back to Patch 11 and fixed the problem, good.

Let’s hope that with the upgrade to 4.1.2, this problem won’t resurface.