This smells like somebody is desperately trying to use an INI file in place of a database. This is a very poor idea.
Even then I'm not sure where a RichTextBox makes sense as part of a proposed solution. That sounds really off-the-wall.
However given these requirements (assuming an INI-format file is really involved here) this probably isn't as simple as removing duplicates. It sounds like the goal is to find duplicated numbers and assign new unique numbers to those "patients."
I ginned up a dummy file to work with and did this using a RichTextBox. About the only value added by a RichTextBox was the ability to colorize things to see what is going on.
Lines with duplicate Patient numbers in red
First of each duplicate in blue, renumbered duplicates in green
No attempt is made to sort the results. This kind of thing would be far better accomplished using a database instead of an INI file. But maybe I'm just making assumptions about the data that aren't true. We haven't been told much, after all.




Reply With Quote
