I have a complicated merging question that may not even be possible in SAS. I have two datasets on testing results for a certain condition. One has names of patient, dob, date of visit, site number, and client ID. The other one has dob, date of visit, site number, and client id in addition to risk behavior questions,demographic information, and test results. I want to merge these two datasets to get one observation per each visit for each client, and also have a way to display this information in wide format when I need to do longitudinal analysis . The only thing is, there is a chance that the client ID has been used on multiple people (not that often, but a few instances of it) This is usually because different testing sites might both assign the same number for the respecitve patients. This means I need to merge not only on client ID, but DOB (assuming the chance that two people who have the same ID had the same DOB is close to 0), site number, and date of visit as well. Any ideas on how to execute this?
... View more