BookmarkSubscribeRSS Feed
jsyang56
Fluorite | Level 6

Hello experts, could you guys help me out and show me the most efficient way to solve the problem I have?

 

How can I identify the first observed claims for drugs of interest within the first 28 days after the first claim to identify the first line of therapy associated with each ID? 

 

Also, if the treatments change after the first 28 days, how can I capture the change and record for the next LOT? 


Here is an example of the dataset I currently have,

 

IDClaim dateDrug Name - hospital administeredDrug - pharmacy prescription Drug ClassDays Supply
111106/20/2016JA.
111106/27/2016.A.
111107/05/2016J.A.
111107/14/2016J.A.
111107/19/2016J.A.
111108/03/2016 KB28
111108/03/2016 LC28
111108/10/2016 dd84
222205/01/2016 KB28
222205/01/2016J A 
222205/01/2016 dd28
222205/29/2016 KB28
222205/29/2016J A 
222205/29/2016 dd28

 

 

From the table above, I would like to change to look like this, 

 

IDLOT1LOT_start dateLOT_end dateLOT2LOT2_start dateLOT2_ end date
1111A06/20/201608/03/2016B + C + d08/03/2016  08/31/2016
2222B + A + d05/01/2016    

 

Please let me know if this is possible! 

1 REPLY 1
HB
Barite | Level 11 HB
Barite | Level 11

You'll need to explain how 1111/ d is part of lot 2 given that its claim date is different from b and c.
What defines a lot? What define a treatment change?

You'll need to explain the derivation of the lot2 end date.
You'll need t explain why 2222 isn't finished

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 685 views
  • 0 likes
  • 2 in conversation