BookmarkSubscribeRSS Feed
jsyang56
Fluorite | Level 6

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

  • In general, a LOT consists of ≥ 1 complete cycle of one of the following,
    • Single drug or
    • A regimen that consists of a combination of different drugs 

 

  • If one of the following conditions are met, it will be considered as an advancement in LOT
    • All drugs of an existing regimen are discontinued, and a new regimen of different combinations of drugs is initiated
    • Unplanned addition or substitution of a new drug to an existing regimen
    • If the previously discontinued regimen is restarted later, the restarted regimen will be counted as a new LOT if
      • There is evidence of ≥ 1 other regimen administered in between the discontinued period
      • The regimen is modified through the addition of ≥1 drug

 

  • The following conditions do not meet the criteria for the advancement of LOT definition and will be considered as a single LOT,

    • If a LOT is interrupted or discontinued for any reason and the same LOT is restarted <60 days after without any evidence of receiving other intervening LOT in between the gap

 

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.

  • For example,
    • Patient A completed the first LOT containing drug class A + B,
    • Then advanced to the second LOT containing drug class C based on the definitions above,
    • Then advanced to the third LOT containing drug class A + C
      • The first date of starting this LOT will be considered the index date

 

An example of my current dataset looks like this 

 

IDDate of serviceDrug class received 
101/13/2015A
101/13/2015B
101/21/2015A
101/21/2015B
102/05/2015A
102/05/2015B
104/01/2015C
104/15/2015C
104/27/2015C
105/16/2015A
105/16/2015B

 

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. 

 

 

2 REPLIES 2
SASJedi
SAS Super FREQ

Using your current dataset as a base, please provide an example of what the desired dataset would look like.

Check out my Jedi SAS Tricks for SAS Users
jsyang56
Fluorite | Level 6

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: 

https://communities.sas.com/t5/SAS-Programming/How-to-identify-observed-claims-within-a-period-of-ti...

 

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
  • 2 replies
  • 726 views
  • 0 likes
  • 2 in conversation