In CM data, I want to find out if we have any medication with overlapping dates with eachother. data test; input subjid cmseq cmtrt cmstdtc cmendtc ; data lines; 101 1 Paracetomal 2019-10-20 2019-10-30 101 2 Acitretin 2019-10-21 2019-11-01 101 3 Apixaban 2019-11-05 2019-11-10 102 1 Paracetomal 2019-01-01 2019-01-30 102 2 Acitretin 2019-01-05 2019-01-10 102 3 Apixaban 2019-01-09 2019-02-10 ; run; in the above example, for subject#102, at 09jan, we have all 3 medication on going and should come in the output. where as subject #101, have only 2 medication time is overlapping.
... View more