1 hour ago · Tech · hide · 0 comments

Seven years ago I wrote a post about regular expressions to match diagnosis codes. I wanted to revisit that post looking at speed and error rates. Regular expressions usually do not exactly match what you’re looking for and nothing else. They have error false positives and false negatives. But they also have advantages, and context determines whether the advantages make the error rates tolerable. The post mentioned above gave the following regular expression for ICD-10 diagnosis codes. [A-TV-Z][0-9][0-9AB]\.?[0-9A-TV-Z]{0,4} As cryptic as this may look at first glance, it’s straight-forward to interpret. It says that an ICD-10 code Begins with a capital letter, excluding U Followed by a digit Followed by a digit or A or B Optionally followed by a period Followed by up to 4 digits or capital letters, excluding U. Speed Now suppose you want to scan a text document for ICD-10 codes. One approach would be to use the regex above. Another would be to compare every alphanumeric sequence in…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.