Hello SAS Gurus,
I am stuck again and need your help. I am working with prescription claims dataset and looking at adherence of a certain class of drugs in each patient. I am looking if the patients are filling this certain drug class for 84 days or more after the first fill but I also have a certain duration which is 114 days from the first prescription date (if we include the first prescription date this duration is 115 days).
Data set I have:
ID First_Pres_Dt Pres_Dt DAYS_SUPP
1 10OCT2022 10OCT2022 30
1 10OCT2022 26OCT2022 30
1 10OCT2022 30DEC2022 30
1 10OCT2022 01FEB2023 30
1 10OCT2022 11APR2023 30
2 11AUG2022 11AUG2022 30
2 11AUG2022 12SEP2022 30
2 11AUG2022 19DEC2022 30
2 11AUG2022 22JAN2022 30
3 17AUG2022 17AUG2022 30
3 17AUG2022 14SEP2022 60
3 17AUG2022 11DEC2022 15
4 04OCT2022 04OCT2022 15
4 04OCT2022 01NOV2022 30
4 04OCT2022 15NOV2022 30
4 04OCT2022 21JAN2023 30
In the above dataset, if you look at ID 4, this pt. has first fill on 4th Oct 2022 and if I will add 114 days the date will be 26th Jan 2023. So this patient has to have at least 84 days of fill till 26th Jan 2023. But he is not meeting the criteria as he only has 81 days of fill (15+30+30+6), the last fill I am including only 6 days as his window is only up to 26th Jan 2023. So pt. 4 is not meeting the criteria but rest of patients are meeting this criteria. Hope the explanation helps.
Thank you
... View more