I am working on registration data of a clinic. Some patients return to the clinic more than once. Each visit is a new case in the data file, but with the same patient number. What I want to do is make a new variable indicating whether a woman has returned to the clinic. Therefore, I want this new variable to have the value 1 if there is another case with the same patient number and with a later date. Furthermore, I want to copy the date of the return visit to another new variable for the current case. In order to do this, I have to combine data from different cases. Is that possible in SPSS (22)?
I hope somebody can help me. I have almost 100,000 cases, so it's a lot of work if I need to do this by hand.