Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

icd9 regex pattern

Tags:

I cannot find a definitive guide to icd9 code formats.

Can anyone explain the format - especially the use of trailing and leading zeros?

A C# regex for icd9 and icd10 codes would also be nice.

Thanks!

like image 662
mson Avatar asked Apr 08 '11 05:04

mson


People also ask

When was ICD-9 discontinued?

Therefore, CMS is to eliminating the 90-day grace period for billing discontinued ICD-9- CM diagnosis codes, effective October 1, 2004.

Can I still use ICD-9 codes?

Generally, if the non-covered entity wants to use ICD-9 codes, they can continue to do so unless mandated by law, just like in the case of worker's compensation insurance.

When did we switch from ICD-9 to icd10?

CMS requires medical practices and RCM companies to make the switch from ICD-9 to ICD-10 by October 1, 2015, the last day for ICD-9 being September 30, 2015. This is not new. Organized, managed, and maintained by the World Health Organization, ICD codes are changed approximately once every 10 years.

How many ICD-9 codes are there?

The current ICD-9-CM system consists of ∼13,000 codes and is running out of numbers.


Video Answer


1 Answers

I was looking for the same thing and found what I believe to be a more complete answer. Thought I'd help anyone else coming in the future.

ICD-9 Regex

The ICD 9 format has a bunch of ways it can be formatted. It can begin with V, E, or a number.

  • If it begins with V, then it has 2 numbers, a decimal, then up to two numbers
    • Examples: V10.12 and V12
  • If it begins when E, then it has 3 numbers, the decimal place, then up to two numbers
    • Examples: E000.0 and E002
  • If it begins with a number, then it is up to 3 numbers, a decimal, then up to two numbers
    • Examples: 730.12 and 730

A good regex that checks all these rules is (Credit goes to sascomunitt)

^(V\d{2}(\.\d{1,2})?|\d{3}(\.\d{1,2})?|E\d{3}(\.\d)?)$

ICD-10 Regex

According to www.cms.gov ICD-10 has the following rules:

  • 3-7 Characters
  • Character 1 is alpha (cannot be U)
  • Character 2 is numeric
  • Characters 3-7 are alphanumeric
  • After 3 characters you use a decimal
  • Use of dummy placeholder "x" (This is the only one I am not accounting for in my regex...)
  • Alpha characters are not case sensitive

Here is the regex I came up with:

^[A-TV-Z][0-9][A-Z0-9](\.[A-Z0-9]{1,4})?$

Note These regexes are for javascript and may need tweaked for C# (I'm too lazy to test it right now)

like image 174
Gordon Tucker Avatar answered Jan 03 '23 16:01

Gordon Tucker