BookmarkSubscribeRSS Feed
mosadoluwa
Calcite | Level 5

Hello,

 

I need help extracting unique ICD 10 diagnosis codes from a character variable (ICD10_with_Description):

 

Have

ICD9  ICD10_with_Description

431 I61.0 Nontraumatic intracerebral hemorrhage in hemisphere, subcortical I61.1 Nontraumatic intracerebral hemorrhage in hemisphere, cortical I61.2 Nontraumatic intracerebral hemorrhage in hemisphere

431 I61.4 Nontraumatic intracerebral hemorrhage in cerebellum I61.5 Nontraumatic intracerebral hemorrhage, intraventricular

431 I61.6 Nontraumatic intracerebral hemorrhage, multiple localized I61.8 Other nontraumatic intracerebral hemorrhage

437.7 G45.4 Transient global amnesia

 

I want a dataset with 1 var

Unique_dx

I610

I611

I612

I614

I615

I616

I618

G454

 

Thank you for your help!

2 REPLIES 2
ballardw
Super User

Do digits occur anywhere in that description other than in the codes?

 

I would be very leery of discarding that decimal. I don't use ICD codes much but would worry about complications such as

I6.11 and I61.1 ending up as the same value.

mosadoluwa
Calcite | Level 5

@ballardw Digits occur only in the codes.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 738 views
  • 0 likes
  • 2 in conversation