The situation is that prices change. But the billing review pulls the fees from the billing table. So, when a provider changes the fees in the system. The review is showing the old charges and not the new charges.
hi @juggernautsei, when the fees are changed at Admin->Codes they are only for new charges to be added in the future. If understanding your situation correctly then wouldn’t want this to change charges already entered in the fee sheet right?
I am going through the fee sheet review code now.
First yes, don’t want to change the values in the billing table. That would mess up a whole lot of stuff.
But what needs to happen is that in the review, I am trying to figure out where is it getting the fees from. It can’t be the fee table so the information has to be coming from the billing table. In the fee_sheet_queries.php, the billing table is the only table addressed. See below.
What would be a nice addon here is to check that the price has not changed. L313 is where this needs to happen in my opinion.
I was thinking of creating a function to check the value of the fee to see if has changed from the original.
This should populate the fee sheet with the correct value not solely depending on what is in the billing table.
function checkFee($code,$fee){
$currentPrice = sqlQuery ("SELECT codes.id, prices.pr_price FROM `codes` LEFT JOIN prices ON prices.pr_id = codes.id WHERE codes.code = ?", array($code));
if($currentPrice != $fee){
return $currentPrice;
} else {
return $fee;
}
}
I am thinking this should fix the issue and make sure that the most current fee is returned in the review.
had to click on @zbig01 nice help ? to see what the purpose was but will basically allow you to select previous cpts you’ve billed for from past encounters
In the code the fees that are brought into the visit are from the billing table and not from the price table. So, when there is a change in prices/fees. The old fee will always be selected causing the doctors to have to keep changing the fees.
This is a simple check of the fee/price to see if it has changed. If it is changed use the price it changed to instead of the price in the billing table.
That is all it needs to do at this time. I didn’t do elegant this time. I just hacked it in there. We can work on a more elegant solution now.
Thanks for clarification and sorry to make ya type it out. Good idea with only suggestion that comes to mind is maybe change price color to red in review if different from feesheet. ie could add a bg-danger class or color style via javascript to field. Certainly not needed though.