Logic to preload list of household members with their previous response into the new application for confirmation

Discussions about CSEntry
Post Reply
sham
Posts: 33
Joined: February 3rd, 2022, 7:30 pm

Logic to preload list of household members with their previous response into the new application for confirmation

Post by sham » May 14th, 2022, 1:33 pm

Hi family,
I was able to push further but still not getting the needed results.
I attached the the latest.
I used the logic below but still not getting the desire results.
//preproc

if loadcase(MEMBER_DICT, HHID1) <> 1 then
errmsg("Household not found in preload data file");
stop(1);
endif;

//preproc
// Prefill in names in names roster from enumerator data file
numeric numPreloadIndividuals = count(MEMBER_DICT.MEMBER_REC);

do numeric i = 1 while i <= numPreloadIndividuals

BLID(i) = PID(i);
SA1_2(i) = S1_2(i);

enddo;

Please I will be glad if you could assist me.
I am very hot... pls!
I want to preload their respective previous baseline response and confirm as well.

Thank you.
Standing by for your response pls!
Attachments
leap1000R.zip
(80.61 KiB) Downloaded 4 times

etuser
Posts: 67
Joined: September 3rd, 2019, 5:57 am

Re: Logic to preload list of household members with their previous response into the new application for confirmation

Post by etuser » May 15th, 2022, 5:02 am

Dear Sir,

I tried to adjust your logic and attched here, It might help you

Cheers
Attachments
leap1000R.zip
(8.27 KiB) Downloaded 6 times

sham
Posts: 33
Joined: February 3rd, 2022, 7:30 pm

Re: Logic to preload list of household members with their previous response into the new application for confirmation

Post by sham » May 15th, 2022, 10:24 pm

Hi etuser,
Thank you soo much for your concern. I relly appreciate your comment and logic... Very helpful.
It is working well.


But the other challenge I have right now is how to merge Roaster SECA1 which contains baseline children and the new children captured in SEC2B in to Roaster SEC3.
I have done that with a logic below;
PROC SEC3000
// Load in case (household) in preload data file that corresponds to our case ids.
preproc
if loadcase(MEMBER_DICT, LEAP1000R_ID) <>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(MEMBER_DICT.MEMBER_REC);

do numeric i = 1 while i <= numPreloadIndividuals
if SA1_5(i) = "Child" then
ID_OF_CHILD(i) = PID(i);
CHILD_S_NAME(i) = S1_2(i);
endif;
enddo;
do numeric i = 1 while i <= count(LEAP1000R_DICT.SEC2B);
ID_OF_CHILD(i) = NEW_MEMBER_ID(i);
CHILD_S_NAME(i) = Concat(SEC2BQ2(i),"",SEC2BQ3(i));

enddo;



After testing the logic I realized if in Roaster SECA1 , the number of children listed are 3 and occupying's Curocc() position 3, 4 ,5 and in Roaster If I capture 1 child and maybe the child occupied curocc() position.
So the results in Roaster SEC3. is messing up...The list either override the other and or it create some gabs especially when the new child added it is just 1. You will see in Roaster SEC3. the new child will occupy Row1 and row2 will be vacant and and the old children w also joined starting from row3,4 and 5 respectively..

Please somebody help.

Sham.
I attached the file
Attachments
leap1000R.zip
(118.85 KiB) Downloaded 1 time

Post Reply