DATA Step, Macro, Functions and more

Exclude a set of ICD codes

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 78
Accepted Solution

Exclude a set of ICD codes

Hello, 

 

Is there any efficient way to pick up the characters ICD 9/ICD 10 codes, rang from 140-161 , 200-2093 , C45-C76, from diangosis code ?

 

Thank you,

Ivy 


Accepted Solutions
Solution
‎04-27-2017 01:43 PM
PROC Star
Posts: 7,366

Re: Exclude a set of ICD codes

Couldn't you just use something like?:

 

data want;
  set have;
  if ('140' <=: diag <=: '161') or
     ('200' <=: diag <=: '2093') or
     ('C45' <=: diag <=: 'C76');
run;

Art, CEO, AnalystFinder.com

 

View solution in original post


All Replies
Solution
‎04-27-2017 01:43 PM
PROC Star
Posts: 7,366

Re: Exclude a set of ICD codes

Couldn't you just use something like?:

 

data want;
  set have;
  if ('140' <=: diag <=: '161') or
     ('200' <=: diag <=: '2093') or
     ('C45' <=: diag <=: 'C76');
run;

Art, CEO, AnalystFinder.com

 

Frequent Contributor
Frequent Contributor
Posts: 78

Re: Exclude a set of ICD codes

Thank you very much, art !
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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