08-09-2011 05:18 PM
I have a new question regarding collapsing consecutive dates.
For my study I am looking at antibiotic prescriptions. I have already determined the patients who would have been given a single primary antibiotic. However, now I have to address those individuals who would fall into the mixed therapy category. For these individuals I want to collapse the start and stop dates for antibiotics given on consecutive dates. In addition to collapsing to a single date, I need to retain the antibiotic given on those dates (see example below).
However, not all individuals will have multiple treaments that can be collapsed into one set of consecutive dates. In those cases I need a data set that will look something like this
The overall data set has up to 8 different prescription (RX), start, and stop dates that have to be collapsed.
08-10-2011 09:29 AM
Take a look at this thread from SAS-L last year. Two approaches are discussed/provided for capturing date ranges:
I would think that either approach could be modified to meet your needs.