How create unique ID numbers?

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
claudia
Posts: 57
Joined: May 9th, 2017, 6:23 am

How create unique ID numbers?

Post by claudia »

Hi,

what do you recommend as the best method to create ID numbers for each participant?

I am doing a survey in different sites and with various tablets. Most questionnaires will be administered on tablets, but some will have to be done on paper (where the interviewers will have to write the ID number on the paper themselves).
Also, for each participant answering the questionnaire on tablet, the interviewers will collect some clinical data on paper, so they will have to use the same ID number as the tablet entry for the paper clinical data form.

How can I ensure that each participant will have a UNIQUE identification number, which can work for tablets and paper questionnaires? Can CsPro create a unique identifier that can easily be retrieved for the clinical form (on paper)? If yes, what is the simplest method to do so?

Many thanks,
Claudia
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How create unique ID numbers?

Post by josh »

You can use the function uuid() to create a globally unique identifier but that is rather long and would be difficult to write on paper.

Another strategy is to add an interviewer code or a site code to the id you already have in order to make it unique.
claudia
Posts: 57
Joined: May 9th, 2017, 6:23 am

Re: How create unique ID numbers?

Post by claudia »

Hi,

thanks for your advice. I'll probably go for the simpler option of creating a unique ID number myself with three variables:
1) Interviewer ID (two digits)
2) Hospital site (1 digit)
3) Participant ID (3 digits)

This way I'll end up with an ID number of 6 digits eg.

interviewer ID: 01
hospital site: 3
participant ID 001

resulting in a unique ID: 013001

I tried doing this in CSPro (see pictures), but the program doesn't seem to take into account the zeros (0) so in this particular case I end up with an ID number of 131, which would cause many problems.

How can I resolve this?
photo_2018-06-05_13-50-13.jpg
photo_2018-06-05_13-50-13.jpg (59.94 KiB) Viewed 4885 times
photo_2018-06-05_13-50-05.jpg
photo_2018-06-05_13-50-05.jpg (140.45 KiB) Viewed 4885 times
Many thanks,
Claudia
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: How create unique ID numbers?

Post by josh »

Set ZeroFill=Yes on the ID variables in the dictionary.
Post Reply