Misspelled word

cerber98 wrote on Monday, March 19, 2012:

Hello!

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…

Thanks!

yehster wrote on Monday, March 19, 2012:

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"   )) .

cerber98 wrote on Monday, March 19, 2012:

Great, thanks!

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!

yehster wrote on Monday, March 19, 2012:

https://github.com/yehster/openemr/tree/spellingDeductible
https://github.com/yehster/openemr/commit/0865f5c4ce91ab43f18c03bdcd747a66b0dfac1c
I implemented the spelling corrections here, but I’m hesitant to push them to the official repository because of backwards potential compatibility issues.

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.

bradymiller wrote on Tuesday, March 20, 2012:

Hi,

Agree that we can’t do this in this form.

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.

-brady
OpenEMR Project

rhoachr wrote on Thursday, December 18, 2014:

has anyone found an easy answer for this? I can not believe in two years this hasn’t been addressed?

sunsetsystems wrote on Friday, December 19, 2014:

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. :slight_smile:

Rod
http://www.sunsetsystems.com/

blankev wrote on Friday, December 19, 2014:

Do the search in Language Constants/Definitions, but remember the search should only be done for:

ded

fsgl suggested the word might be spelled as: ded’ctable

sunsetsystems wrote on Friday, December 19, 2014:

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.

Rod
http://www.sunsetsystems.com/

tmccormi wrote on Friday, December 19, 2014:

I like Rod’s simple short term solution for now and I agree that dependency on comments in payments is a poor design.