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.
duplicate case_Ids
Re: duplicate case_Ids
Are these cases from one interviewer or did they come from two different interviewers who both sent the same cases?
Re: duplicate case_Ids
Same interviewer, same device-id.
The interviewer id is the last 11 positions of the questionnaire id.
The interviewer id is the last 11 positions of the questionnaire id.
Best
Ari
Ari
Re: duplicate case_Ids
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,
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
Re: duplicate case_Ids
Is the case also empty on the interviewers tablet or is filled in there and blank on the server?
Re: duplicate case_Ids
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
Ari
Re: duplicate case_Ids
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.
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
Ari
Re: duplicate case_Ids
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.