This would be in SAS after run all the code i have right now, so there would be 3 separate datasets for one ID with 3 different drugs and I want to calculate the score from all those 3 separate datasets but I need to figure out how to concatenate the datasets to count the overlaping days, the problem is that each of those variables have the same name so when I merge them in the last step, Step 3, it only transfers data from one drug with the data values and assigns missing values to the other drugs, therefore, i can figure out the overplaping days with the code. My data in SAS before i run any of my SAS codes looks something like this: ID NCD (drug) filldate1 Supply1 filldate2 Supply2 filldate3 Supplly3 1 10 1/1/2013 30 2/2/2013 60 4/6/2013 30 1 35 1/1/2013 30 3/5/2013 30 8/6/2013 60 1 68 5/5/2013 60 8/10/2013 60 10/1/2013 60 2 50 2/2/2013 30 5/10/2013 30 11/1/2013 30 Here's what i want to do: 1. Figure out the number of days per person each drug covers during a 180 day period 2. Calculate the numbers of days overlapping for each person for all their drugs combined, then calculate the score for Total of days covered for all drugs /180 days
... View more