Hi, I'm very new to SAS and it would be great if someone can suggest some solutions because I just can't think of any.
Background: I'm using the IBM MarketScan data for my project and I need to identify index dates based on people's exposure to different drug classes. So far, I have cut my data down to people who have claims for receiving all drug classes of interest during the study period.
Problem: Now, I need some help with the following questions,
1) How do you create an algorithm or macros for a line of therapy (LOT) and apply the algorithm to each patient?
LOT Definitions
The following conditions do not meet the criteria for the advancement of LOT definition and will be considered as a single LOT,
2) Once the LOT definition algorithms have been applied for each patient, I will need to identify the index date for each patient. The index date is defined as the first date of receiving a new LOT after completing a line of therapy with all three drug classes.
An example of my current dataset looks like this
ID | Date of service | Drug class received |
1 | 01/13/2015 | A |
1 | 01/13/2015 | B |
1 | 01/21/2015 | A |
1 | 01/21/2015 | B |
1 | 02/05/2015 | A |
1 | 02/05/2015 | B |
1 | 04/01/2015 | C |
1 | 04/15/2015 | C |
1 | 04/27/2015 | C |
1 | 05/16/2015 | A |
1 | 05/16/2015 | B |
Based on the table above, the index date would be 05/16/2015. Then, I would like my new table to contain the same information, but contain claims after the index date.
If anyone can provide me with some ideas on how to get started, that would be greatly appreciated. Please let me know if you need more information from me.
Using your current dataset as a base, please provide an example of what the desired dataset would look like.
Hello,
Thank you for your reply
I actually posted the same question in a different format for clarity. So, could you please help me figure out the answer to this question?
Link to the post:
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.