Two Level: Example Application

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Two Level: Example Application

Post by khurshid.arshad »

Dear Users,

Here is the “Two Levels” example application in CSPro 7.0.2. In this application, we have two teams under one supervisor. Each team will consist of one male and one female.
The application’s purpose is to;
• Create PRN based on the listing exercise
• Assign households for interview; and
• How to develop “Two Levels” application
We have three sections;
• HH1 (Cover page and Roster information),
• IND Section (Education, Health and Employment section) and
• HH2 (Consumption)

Female enumerator will get the Roster, Individual information from all female members and consumption module. Male enumerator will get the Individual information from all male members and consumption module.

As the female enumerator sends the roster to the male enumerator after the completion of the roster, male enumerator can conduct interview on his tablet.

You can perform following activities step by step in this application.
1. Login and keep track of login information next time
2. Update application on login screen
3. Assign Enumeration Area before listing exercise on the supervisor tablet
4. Send Assign Enumeration Area to enumerators for listing exercise
5. Conduct the listing based on the Assigned Enumeration Area
6. Receive listing data of Assigned Enumeration Area and “Merged” on the Supervisor Tablet
7. Create PRN ( in this case we will select 17 households for interview from the listing data)
8. Based on the PRN, assign household to each team
9. Share PRN with enumerator
10. Each team can see only the Assigned household
11. Send the interviewed households to the Supervisor
12. Supervisor sends the data to the Server (DropBox)

You will find username and password information under “107_Excel Data” folder.
Please save as batch file “Create Deployment” to make deployment.

Your comments for further improvement are welcome.

Best.
a.
Attachments
Supervisor_Menu.rar
(750.51 KiB) Downloaded 606 times
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Re: Two Level: Example Application

Post by sah »

Hi a,
Great supervisor setup. My suggestion:
  • can you add additional variable to indicate if a respondent or household interview has been conducted so that it will be easy to choose from and also
    A review variable, to indicate, the interview conducted by the interviewer have been reviewed and approved by the supervisor.
    On "receive assign listing is ti possible to have another option so it can be assigned from headquarters, thus office through dropbox/csweb/ftp"


Still reviewing and will comment again.
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Two Level: Example Application

Post by khurshid.arshad »

Dear Sah;

Thank you. I will make changes soon.
Best.
a.
Yana
Posts: 51
Joined: October 6th, 2016, 6:57 am

Re: Two Level: Example Application

Post by Yana »

Dear khurshid
Please give more explanation how to perform the tasks where from to where because whe i started from the login app the password id dont support the keyboard or els. So please add some comment. Otherwise it is what I want type of example app for ever.
Thanks in advance.
Yihun_Shegnew
Posts: 25
Joined: November 30th, 2017, 11:56 am

Re: Two Level: Example Application

Post by Yihun_Shegnew »

Dear khurshi
Your supmenu app is enterestig. and I want make as an example app for me but i have got error arround selected hhs and hh serial number. I have post the codes i have created from the merging data to write prn files

Function MergeListingData();
dirlist(FileListing,"..\Data\Listing\", "Listing-" + edit("9999", Pro_code) + "-" + "*.csdb");
errmsg ("The Total Number of Listing Data Files are [..%d..] to Concatenate.", length(FileListing));
iCase=1;
i=1;
do iFile= 1 while iFile <= length(FileListing)
if setfile(LISTING_DICT, FileListing(iFile)) = 0 then
errmsg("Message 0: Failed to Open Listing Data Files %s",
FileListing(iFile));
else
endif;

{*** CONCATENATE LISTIND DATA FILES ***}
if locate(LISTING_DICT, >=, "") = 0 then
errmsg("Message 1: Failed to Read Listing Data File %s",
FileListing(iFile));
endif;
while loadcase(LISTING_DICT) do
{*** Geographical Information as ID ***}
COMBINELISTING_DICT.ZONE_CODE=LISTING_DICT.ZONE_CODE;
COMBINELISTING_DICT.WEREDA_CODE=LISTING_DICT.WEREDA_CODE;
COMBINELISTING_DICT.KEBELE_CODE=LISTING_DICT.KEBELE_CODE;
COMBINELISTING_DICT.EA_C=LISTING_DICT.EA_CODE;
COMBINELISTING_DICT.CL_PROCESSING_CODE=LISTING_DICT.L_PROCESSI
NG_CODE;
{*** HOUSEHOLD INFORMATION ***}
COMBINELISTING_DICT.HOUSE_NUMBER(iCase)=LISTING_DICT.LI_HOUSE
HOLD_NUMBER;
COMBINELISTING_DICT.CL_Q2(iCase)=LISTING_DICT.L_Q2;
COMBINELISTING_DICT.CL_Q3(iCase)=LISTING_DICT.L_Q3;
COMBINELISTING_DICT.CL_Q3_OTH(iCase)=LISTING_DICT.L_Q3_OTH;
COMBINELISTING_DICT.CL_Q4(iCase)=LISTING_DICT.L_Q4;
COMBINELISTING_DICT.CL_Q5(iCase)=LISTING_DICT.L_Q5;
//COMBINELISTING_DICT.CL_Q7(iCase)=LISTING_DICT.L_Q7;
COMBINELISTING_DICT.CL_Q8_LATITUDE_N(iCase)=LISTING_DICT.L_Q8_LATITUDE_N
COMBINELISTING_DICT.CL_Q8_LOGITUDE_E(iCase)=LISTING_DICT.L_Q8_L
OGITUDE_E;
{*** QUALITY CHECK INFORMATION ***}
COMBINELISTING_DICT.SUP_CODE(iCase)=LISTING_DICT.SUP_CODE;
COMBINELISTING_DICT.ENU_CODE(iCase)=LISTING_DICT.ENU_CODE;
COMBINELISTING_DICT.DOI(iCase)=LISTING_DICT.DOI;
COMBINELISTING_DICT.IST(iCase)=LISTING_DICT.IST;
COMBINELISTING_DICT.IET(iCase)=LISTING_DICT.IET;
COMBINELISTING_DICT.CON_F_SR_NUM(iCase)=iCase;
COMBINELISTING_DICT.HH_SR(iCase)=0;
COMBINELISTING_DICT.SAMPLED_HH(iCase)=0;
COMBINELISTING_DICT.FINAL_HH_SR(iCase)=0;
if COMBINELISTING_DICT.CL_Q4(iCase) = 1 then
COMBINELISTING_DICT.HH_SR(iCase)=i;
inc(i);
else
endif;
iCase = iCase + 1;
enddo;
enddo;
if fileexist(concat("..\Data\Listing\CombL-", edit ("9999", Pro_Code),
".csdb")) then
filedelete(concat("..\Data\Listing\CombL-", edit ("9999",
Pro_Code), ".csdb"));
setfile (COMBINELISTING_DICT, concat("..\Data\Listing\CombL-",
edit ("9999", Pro_Code), ".csdb"),create);
if writecase(COMBINELISTING_DICT) = 0 then
errmsg("Message 2: Failed to Write Combined Listing Data
File.");
else
TotalHH=max(COMBINELISTING_DICT.HH_SR);
Totalcount=count(COMBINELISTING_DICT.HH_SR);
errmsg ("The Total Eligibal Households are [...%d...] out of
[...%d..].", TotalHH,Totalcount );
stop(1);
endif;
else
{******************************************}
{**** IF COMBINE FILE DOES NOT EXIST ***}
setfile (COMBINELISTING_DICT, concat("..\Data\Listing\CombL-
",edit("9999", Pro_Code), ".csdb"),create);
if writecase(COMBINELISTING_DICT) = 0 then
errmsg("Message 3: Failed to Write Combined Listing Data
File.");
else
TotalHH=Max(COMBINELISTING_DICT.HH_SR);//Households
Serial number only for available households
Totalcount=count(COMBINELISTING_DICT.HH_SR);// Number
of Households Serial number only for available households
errmsg ("The Total Eligibal Households are [...%d...] out of
[...%d..].", TotalHH,Totalcount );
stop(1);
endif;
endif;
end;
Function CreatePRN();
{**********************************************}
{*** FIND COMBILE LISTING EXIST OR NOT ***}
if fileexist(concat("..\Data\Listing\CombL-",edit("9999", Pro_Code),
".csdb")) then
{***************************}
{*** SET SAMPLE DICT ***}
setfile(SAMPLE_DICT, "..\Ext_Data\Sample.txt");
loadcase(SAMPLE_DICT, Pro_Code);
{***************************}
{*** SET COMBINE DICT ***}
{*** ACCESS GEOGRAPHICAL INFORMATION ***}
setfile (COMBINELISTING_DICT, concat("..\Data\Listing\CombL-
",edit("9999", Pro_Code), ".csdb"));
COMBINELISTING_DICT.ZONE_CODE=Z_CODE;
COMBINELISTING_DICT.WEREDA_CODE=W_CODE;
COMBINELISTING_DICT.KEBELE_CODE=K_CODE;
COMBINELISTING_DICT.EA_C=SEA_CODE;
COMBINELISTING_DICT.CL_PROCESSING_CODE=PRO_CODE;
RandomNUM=RAN_NUM;
RandomNUM=random(0,RandomNUM);
close (SAMPLE_DICT);
loadcase(COMBINELISTING_DICT);
{****************************************************}
{*** SELECT 17 HOUSEHOLD FOR INTERVIEW ***}
TotalCount=count(HH_SR);

TotalHH=count(HH_SR where HH_SR<>0);
I=1;
int1=TotalHH/6; //Total number of Eligibal hh divided by
total required sample in each processing code
int2=(int1*RandomNUM)+1; //Indentify the Starting Point.
RandoNum variable is in Sample Dictionary

set errmsg(operator);
errmsg ("Total Listed Households are %d. \n\n Total Eligibal
Households are %d. \n\n First Selected Household ID without Fraction %d. \n\n
First Selected Household ID with Fraction %f.", TotalCount,TotalHH,int2,int2);
set errmsg(default);
{********************************************************}
{*** MARK THE SELECTED HOUSEHOLDS IN
COMBINE_DICT ***}
while i<=TotalCount do
If COMBINELISTING_DICT.HH_SR(i)<>0 then
If int(int2)=COMBINELISTING_DICT.HH_SR(i) then
COMBINELISTING_DICT.SAMPLED_HH(i)=int(int3);
writecase(COMBINELISTING_DICT);
int2=int2+int1;
inc(i);
else
inc(i); //Increments = 1 +
endif
else
inc(i); //Increments = 1 +
endif;
enddo;
{*** END ***}
TotalCount=count(SAMPLED_HH); //Count Total
Selected households for interview
// This
count will always 17
I=1;
ICase=1;
While i<=TotalCount do
If COMBINELISTING_DICT.SAMPLED_HH(I)>0 then
COMBINELISTING_DICT.FINAL_HH_SR(I)= ICase;
writecase(COMBINELISTING_DICT);
inc(ICase);//Increments = 1+
else
endif;
inc(i); //Increments = 1 +
enddo;
{************************************************}
{*** DELETE IF PRN EXIST ***}
if fileexist(concat("..\Ext_Data\PRN-",edit("9999", Pro_Code),
".txt")) then
if accept ("Do you want Re-write the PRN File.",
"Do not Want Re-Write PRN.",
"Yes Re-Write PRN File.")=1 then
Move to PRO_SUP_ID;
else
filedelete(concat("..\Ext_Data\PRN-",edit("9999",
Pro_Code), ".txt"));
//Flag=1;
endif;
else
{************************************************}
{*** DO NOTHING IF PRN DOES NOT EXIST ***}
endif;
else
set errmsg (operator);
errmsg ("You Can't Create PRN File. \n\n You don't Have Merged
Listing Data of EA [...%d...] in Your Tablet.", Pro_Code);
set errmsg (default);
stop(1);
endif;
end;
{ when i compile the int2, int2in errmsg says notappl and some times default. How to make correction arround that}
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Two Level: Example Application

Post by khurshid.arshad »

Dear Yihun;

Please follow these steps:
1. Assign enumeration area for listing on supervisor tablet;
2. Send assigned enumeration area to the enumerators for listing;
3. Done listing exercise of assigned enumeration area on enumerators tablets;
4. Send listing data to the supervisor;
5. Concatenate listing data on the supervisor tablet and
6. Then create PRN.

I hope it works for you.

Best.
a.
Yihun_Shegnew
Posts: 25
Joined: November 30th, 2017, 11:56 am

Re: Two Level: Example Application

Post by Yihun_Shegnew »

Thanks in advance i hadnt assign the random variable in the excel that was the problem now i fixed it.
Thanks khurshid.
Yihun_Shegnew
Posts: 25
Joined: November 30th, 2017, 11:56 am

Re: Two Level: Example Application

Post by Yihun_Shegnew »

Dear Khurshid
In your SupMenu when the supervisor assign the EA and then when send to the enumerator there an error which says " decompression failed" . Actually I posted the error in past time. If you get the solution pls share us.
Thanks in advance
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Two Level: Example Application

Post by khurshid.arshad »

Dear Yihun;

It is working fine on my end. It will be good if you can share your application with me. My email address is khurshid.arshad@gmail.com.
Best.
Arshad
Yihun_Shegnew
Posts: 25
Joined: November 30th, 2017, 11:56 am

Re: Two Level: Example Application

Post by Yihun_Shegnew »

Dear Arshad
In your listing app after your enunerator listed all the households in the selected EA is there is problem in listing and the supervisor want to delete one case from listing . How do you adjust it the household serial number? I think it will face in your data collection time.
Thanks
Post Reply