Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72797

Create a unique ID for multiple diagnosis

$
0
0
Hi

I have a very large data set, which involves unique IDs for participants, but each ID is repeated every time the participants are diagnosed with a condition. Looks a bit like this:


ParticipantID DiagnosisCode Date
1 3fe 23apr2010
1 4rt 30mar2009
2 43e 01apr2011
2 2qw 09may2012
3 5yh 10jun2011
3 6ty 08jul2013

How do I create a unique ID which lists the number of diagnosis codes per child as the dates associated with diagnosis. Do I need to use wide format to do this or can it be done in long?

Thanks a lot

Luca

Viewing all articles
Browse latest Browse all 72797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>