Hello,

I am working with NHANES data and have been merging datasets together using a 1:1 merge with a unique identifier "seqn." Each survey respondent is assigned a different sequence number (seqn) which makes it easy to merge the different datasets. This was all going well, but one of the datasets I want to merge (on prescription drug data) with the others contains multiple entries for each "seqn" so that it is not a unique identifier. In other words, if a person were taking multiple prescription drugs there would be multiple data entries that correspond to the same sequence number. I am trying to figure out a way to reorganize the data so that there is a single sequence number that corresponds to each drug a person is taking. Please let me know how best I can do this. I am new to stata.