BookmarkSubscribeRSS Feed
Sujithpeta
Quartz | Level 8

I have a data set where a patient and their claim dates, I want to flag the date which is the index disease date. Logic is that the patient must have at least 2 claim with-in 30 days to confirm the patient has the disease (A, B, C have disease). Next, we want to identify the Index date, which is not same as the min date of the patient (ex: Patient B's 1st claim doesn't meet our disease condition as no. of claims between 05/01 and 30days is only 1).

 

Have:

PatientID Dates

A  01/01/2018

A 01/03/2018

A 03/01/2018

A 03/03/2018

B 05/01/2018

B 07/02/2018

B 07/05/2018

C 06/07/2018

C 06/13/2018

 

Want:

PatientID Dates Flag

A  01/01/2018 Index

A 01/03/2018 Treatment

A 03/01/2018 Treatment

A 03/03/2018 Treatment

B 05/01/2018 Screening

B 07/02/2018 Index

B 07/05/2018 Treatment

C 06/07/2018 Index

C 06/13/2018 Treatment

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

What if a patient has multiple set of dates that are within 30 days of each other?

Sujithpeta
Quartz | Level 8
Could you give an example?
Sujithpeta
Quartz | Level 8
Primary goal is to identify the index date, not much worried about flagging the treatment and screening.
ballardw
Super User

@Sujithpeta wrote:
Primary goal is to identify the index date, not much worried about flagging the treatment and screening.

I am going to suggest that you may be suppressing too much information. Since your implication is that these should be somehow related, the within 30 days, then shouldn't we be looking at what was actually done on any given date?

 

Or at least verify that all of the dates that you show have already been filtered to the appropriate tests, diagnosis, treatments, or whatever.

 

From unpleasant experience I know that is very possible to have multiple medical claims on the same date that are not related to other claims.

Sujithpeta
Quartz | Level 8

Hey, I already filtered for appropriate claims without multiple same day claims, my data set is just unique patient ID and dates.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 5 replies
  • 586 views
  • 0 likes
  • 3 in conversation