I am writing regarding Open Dental Version: 7.6.38 (revision 6320).
I'd like to request the following change to the version controlled source code in a future revision:
File: ContrApptSingle.cs, line 492
revision 6320:
Code: Select all
Match m=Regex.Match(lines[i],"^<span color=\"(-?[0-9]*)\">(.*)$");
Code: Select all
Match m=Regex.Match(lines[i],"^<span color=\"(-?[0-9]*)\">(.*)");
Rational:
My wife is running this version of Open Dental in her office in Ontario, Canada. As the Canadian procedure codes in the Canadian Open Dental were incomplete, I wrote a python script that took advantage of tesseract OCR to automatically generate an XML file of procedure codes for Open Dental from a scanned ODA fee guide. This worked great, but some of the procedure code descriptions span multiple lines (have newline, \n, characters in them). Except for the one case that is the topic of this post, we have found that this works fine in Open Dental so far. However, when the appointment module view is set to take advantage of the ProcsColored case, it causes an exception to be thrown because the regular expression in line 492 doesn't match. I'm not an expert on Open Dental, but I don't see why one needs to enforce the match to the end of the input. Regular expressions are greedy, so the output should be the same for inputs that do not have a newline character, whereas for multi-line procedure code descriptions the regular expression will just grab the first line, which we consider reasonable behavior, and (more importantly) will still produce a valid match and not throw and exception.
Thanks so much,
Philip