I’ve noticed that the word “deductible” is misspelled. It’s hardcoded as “Deductable”, which looks embarrassing on printed patient statements. I’ve noticed that it’s hardcoded in file edit_payment.php, but I was reluctant to change it, since it may also be hardcoded somewhere else. Please advise…
Here are the locations where “Deductable” shows up. The problem with just changing this to correct the spelling is that existing systems which expect the in correct spelling are going to have issues.
payment.inc.php
31: {//Function inserts the distribution.Payment,Adjustment,Deductable,Takeback & Follow up reasons are inserted as seperate rows.
117: "', memo = '" . "Deductable $".trim(formData("Deductible$CountRow" )) .
yehster@ubuntu:/var/www/openemr/library$ cd ..
yehster@ubuntu:/var/www/openemr$ ack-grep "Deductable"
ack-grep: sites/default/documents/1: Permission denied
interface/billing/edit_payment.php
273: "' and memo like 'Deductable%'");
279: "', memo = '" . "Deductable $".trim(formData("Deductible$CountRow" )) .
286: "' and memo like 'Deductable%'");
302: "', memo = '" . "Deductable $".trim(formData("Deductible$CountRow" )) .
314: "' and memo like 'Deductable%'");
977: pid ='$PId' and encounter ='$Encounter' and code='$Code' and modifier='$Modifier' and memo like 'Deductable%'");
980: $DeductibleDB=str_replace('Deductable $','',$DeductibleDB);
library/payment.inc.php
31: {//Function inserts the distribution.Payment,Adjustment,Deductable,Takeback & Follow up reasons are inserted as seperate rows.
117: "', memo = '" . "Deductable $".trim(formData("Deductible$CountRow" )) .
I’ll change that in my system, since we are pretty new using OpenEMR, but otherwise, that would just be a fairly simple script to update that in the database, right?
Thanks for the info!
What’s “simple” is all relative to user skill/comfort with MySQL, and the standard for upgrades/patches has generally been that we need to make it work for novices.
Several options include:
1. replace the erroneous character with the mysql wildcard _ character in the LIKE comparisons.
2. in str_replace command, first do one that converts Deductable word to Deductible
And recommend heavy commenting at these changes, so it’s clear for developers why this is done.
Or just simply changing it to the correct spelling before output it (could even modularize a simply fixDeductable() function that simply fixes the spelling of this term) without even changing the database code.
Or could also convert the erroneous word in the ‘memo’ myslq column in the sql upgrade script.
Probably the best “easy” fix is to figure out where in sites/default/statement.inc.php the line is processed, and do a str_replace() to change the word. That way statements generated from prior data will be immediately fixed.
As for why isn’t it fixed yet - like everything else, someone has to care enough to do the work, or to sponsor it.
Translation won’t help in this case. The word is not translated. Which gets to the other problem, that the code makes decisions based on comments in payments. Cleanup is needed there.