I have two datasets and I need to merge them together. These datasets will require a many to many merge. One is a healthcare visit dataset and the other is a medication pick-up dataset. Two of the variables I need to merge on are a patient id and provider id and then I also need to merge on a visit date. However I do not need the visit date to be the same, I need it to be either on the same day or within the following X amount of days (7 for example). I am not sure how I can merge two datasets on an inexact but specified timeframe rather than a single variable. Is there a way to do this? Is there another approach for this outside of also merging on date? Thank you!
... View more