duplicate case_Ids

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

duplicate case_Ids

Post by AriSilva »

I´m having trouble with the case ids of some interviews.
These attached files are a snipped (only 3 cases each), specifically the ones that are causing the problem.
The 22.csdb was generated downloading the file from the server on 2020.01.22. The interviews are OK.
The 24.csdb was generated downloading the file from the server on 2020.01.24. The interviews are bad. It seems that the control program that we have produced a new interview to be done, with the same logical identification, but what I do not understand is that the interviews on both files have the same case_id, that is, considering the logical key. If the system generates an unique case_id, how come the interviews have the same "unique" key.
Attachments
99_Temp.zip
(92.21 KiB) Downloaded 172 times
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: duplicate case_Ids

Post by josh »

Are these cases from one interviewer or did they come from two different interviewers who both sent the same cases?
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: duplicate case_Ids

Post by AriSilva »

Same interviewer, same device-id.
The interviewer id is the last 11 positions of the questionnaire id.
Best
Ari
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: duplicate case_Ids

Post by htuser »

Ari,
To avoid this you can add UUID as an ID item to avoid duplication. There's other option that Greg help me years ago. But the using UUID as a part of the ID item is an easy way.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: duplicate case_Ids

Post by josh »

Is the case also empty on the interviewers tablet or is filled in there and blank on the server?
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: duplicate case_Ids

Post by AriSilva »

Good question. I´ll try to get my hands on the interviewers tablet, the survey is not finished yet, but I´ll see if s/he can send me the .csdb by email.
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: duplicate case_Ids

Post by AriSilva »

Another question related to this problem:
When the program is creating a new record in an external file with the writecase instruction, how the software behaves as far as the uuid generation is concerned? What does the program do? Does it check to see if the file already has a questionnaire withe this "new" case id, and then uses this case id and overwrites the existing case in the file, updating it? Or the program, when processing the writecase, does not care about the existence of the same case in the file and generates another instance of the same key with a different uuid?
I´m talking about a data entry program.
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: duplicate case_Ids

Post by josh »

In an external file (or a main data file in data entry for that matter) you cannot create two cases with the same caseids. So if you do a writecase and there is already a case with the same case id, you will overwrite that case. The ONLY way you can get duplicate caseids is through sync.
Post Reply