Hello SAS experts, I would like to request for a help to calculate number of days covered & 80% adherence for multiple prescriptions for a patient . Use the Drug ID field of NDC codes to determine if the prescriptions are the same or different. Here are different scenarios I need to capture. Any help would be greatly appreciated. a) If multiple prescriptions for different medications are dispensed on the same day, calculate the number of days covered by a medication using the prescriptions with the longest days supply. b) For multiple different prescriptions dispensed on different days with overlapping days supply, count each day in the treatment period only once . c) If multiple prescriptions for the same medication are dispensed on the same day or on different days, sum the days supply and use the total to calculate the number of days covered by a medication . For example, three prescriptions for the same medication are dispensed on the same day, each with a 30-day supply. Sum the days supply for a total of 90 days covered by the medication. Subtract any days supply that extends beyond December 31 of the measurement year. Here is the sample data: Mbrid NDC DOS supply drug_id 3A790 551110 02/10/2016 90 d04105 3A790 651112 02/10/2016 60 d04106 3A790 012390 05/20/2016 90 d04107 3A790 123456 06/20/2016 90 d04108 3A790 581111 08/24/2016 90 d04109 3A790 581113 08/24/2016 90 d04109 3A790 591114 09/24/2016 90 d04109 3A790 591115 10/16/2016 90 d04109 Thanks, KK
... View more