Hello,
Not sure how complicated this is but thought maybe some one here would know what to do or have an alternative solution to my issue.
I would like to download ICD 10 codes by its chapter and subchapter names. Using this website (https://icd.codes/icd10cm/chapter1)
I could click on a chapter and then copy and paste each record into excel and clean it up but I was wondering if I could somehow have SAS do it instead. For example, chapter 1 is "Certain infectious and parasitic diseases" (which would be a value in a column called "chapter") and then codes A00-A09 would be the sub chapter "Intestinal infectious diseases" and then each ICD 10 would have its description as a third column (so A00 would be Cholera, A01 would be "Typhoid and paratyphoid fevers" etc. See table below as the result.
But I would want to do this for all the chapters. suggestions?
Code | Chapter | SubChapter | Description |
A00 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Cholera |
A01 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Typhoid and paratyphoid fevers |
A02 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Other salmonella infections |
A03 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Shigellosis |
A04 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Other bacterial intestinal infections |
A05 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Other bacterial foodborne intoxications not elsewhere classified |
A06 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Amebiasis |
A07 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Other protozoal intestinal diseases |
A08 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Viral and other specified intestinal infections |
A09 | Certain infectious and parasitic diseases | Intestinal infectious diseases | Infectious gastroenteritis and colitis unspecified |
There are code books/excel files out there with this information already.
Not worth the effort to scrape it.
https://www.cms.gov/medicare/icd-10/2022-icd-10-cm
This file has the data in txt files you can join
Thank you but this doesnt go up to the chapter level as per my example.
The XML files do seem have it but I haven't tried to parse that.
It does seem possible to map it as well, which seems easier but that's up to you.
NCHS 2022 Table..etc
Thank you I will check that out
I might start here instead if you want all (or close to all) of the codes
https://www.cdc.gov/nchs/icd/Comprehensive-Listing-of-ICD-10-CM-Files.htm
Look at https://ftp.cdc.gov/pub/Health_Statistics/NCHS/Publications/ICD10CM/2022/icd10cm_codes_2022.txt for example with practically all the codes (note the Addendum files)
A nice simple text file which would be easy to read or down load some of the ZIP files.
Might depend on which is more important to you, the description or the chapter (first 2 characters)/subchapter (3rd character)
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.