I have a question about how to check whether certain diagnosis fall into ICD-10 range in R.
Here is my diagnosis code:
C349
A219
B003
C509
B700
A090
And here is the standard ICD-10 range I wish to compare to:
C01.0-C17
A74.8-A75.9
B00.1-B33.1
B69-B72.0
C00.0-C94.2
I tried to split the character strings into values but since they are still not numeric, I cannot compare them.
This is the kind of problem icd was designed to solve. Ranges of ICD-10 codes are hard because there are so many of them compared to ICD-9 codes. In addition, there is no ICD-10 code C01.0 in either World Health Organization or US Clinical Modification. With that in mind:
I recommend trying to be consistent with ICD codes with or without decimal places. I prefer dropping them.
If you are using non-WHO or non-ICD-10-CM codes, you can still work with ICD, but be careful to check that discrepancies, like C01.0, are accounted for correctly. This may mean manually entering codes in a code range in some cases. @thelatemail is correct that you have to be very careful when expanding ranges not to expand through a 'parent' code, and thus be broader than planned. The range expanding code in
icd
is extremely careful with this.