Page 1 of 1

Preloaded Roster

Posted: September 8th, 2017, 5:15 am
by vipul315singhal
Hi All,

Greetings of the day!

Does any one have idea how we can preload some information into a roster, and can modify that too after confirming it from respondent.

I want to preload Household member's information which we already have from baseline data and want to confirm it from same Household weather that member is currently a part of HH or not and can modify some related information.

If any one has some document/Example, please share.

Thanks & Regards

Re: Preloaded Roster

Posted: September 8th, 2017, 4:20 pm
by josh
This is possible in CSPro but takes some advanced programming. The most common approach is to have the information to be preloaded in a lookup file. Then when the interviewer starts the interview, you look up the household in the lookup file using loadcase() based on the identifiers. Then you loop through the household members in the lookup file and copy the values into the corresponding record in the main dictionary to prepopulate the roster. The logic would like something like the following:

// Load in case (household) in preload data file that corresponds to our case ids.
errmsg("Household not found in preload data file");

// Prefill in names in names roster from enumerator data file
numeric numPreloadIndividuals = count(PRELOAD_DICT.PR_INDIVIDUAL);

do numeric i = 1 while i <= numPreloadIndividuals
    PERSON_NUMBER(i) = i;
    NAME(i) = PR_NAME(i);
    SEX(i) = PR_SEX(i);
    AGE(i) = PR_AGE(i);

Here PR_DICTIONARY is the preload lookup file and the variables that start with PR are from that dictionary while the variables that don't are from the main dictionary. PERSON_NUMBER, NAME, AGE and SEX are variables from the roster that are being filled in.

Unfortunately I don't have a full example of this. Maybe someone else on the forum does. I know I've answered similar questions before - like this one: viewtopic.php?f=1&t=1080&p=3029

Re: Preloaded Roster

Posted: September 11th, 2017, 2:50 am
by vipul315singhal
Thanks Josh!
Hope it will help me out, will get back to you in case required something related to this.