Preloaded Roster

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
vipul315singhal
Posts: 25
Joined: March 28th, 2013, 9:17 am

Preloaded Roster

Post 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
Vipul
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Preloaded Roster

Post 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.
if loadcase(PRELOAD_DICT, DISTRICT, CONSTITUENCY, HOUSEHOLD_NUMBER ) <> 1 then
    
errmsg("Household not found in preload data file");
    
stop(1);
endif;

// 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);
enddo;
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: http://www.csprousers.org/forum/viewtop ... 080&p=3029
vipul315singhal
Posts: 25
Joined: March 28th, 2013, 9:17 am

Re: Preloaded Roster

Post by vipul315singhal »

Thanks Josh!
Hope it will help me out, will get back to you in case required something related to this.

Regards
Vipul
Post Reply