BookmarkSubscribeRSS Feed
Guptashwe
Calcite | Level 5

Cough is identified using ICD-9/10 codes from the claims databases. Whereas, there is no ICD-9/10
code available to define the chronic stage of cough. The objective of the problem is to identify
patients who have been diagnosed with chronic cough between 2007 and 2009. These patients will
be then assessed for their demographic characteristics. The following algorithm is deigned to
identify chronic cough patients:
A patient having at least three inpatient/outpatient claims for cough within the time window of 120
days anytime, between 2007 and 2009.
The following dataset has patients with service dates for cough from 2007 and 2009. Identify
patients diagnosed with chronic cough between 2007 and 2009.

 

Problem 2.jpg

4 REPLIES 4
Guptashwe
Calcite | Level 5
i have attached the bat file.
Guptashwe
Calcite | Level 5
 
Astounding
PROC Star

Assuming that your data already embodies much of the work that needs to be done:

 

  • The observations include only cough-related observations
  • The observations are already subset for the years 2007 through 2009
  • The observations are in order by ENROLID SVCDATE

 

All that remains is to identify patients that have 3 observations within a 120-day window.  Here is an approach to do that:

 

data want;

id_counter=0;

chronic='N';

do until (last.enrolid);

   set have;

   by enrolid svcdate;

   id_counter + 1;

   if dif2(svcdate) <= 120 and id_counter >= 3 then chronic='Y';

end;

do until (last.enrolid);

   set have;

   by enrolid;

   output;

end;

drop id_counter;

run;

 

The top loop processes observations for one ENROLID, setting CHRONIC to Y or N.  The bottom loop processes the same observations, outputting them with the assigned value for CHRONIC.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 732 views
  • 0 likes
  • 3 in conversation