Choice of questionnaires to synchronize

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
titeuf
Posts: 4
Joined: October 7th, 2019, 5:46 am

Choice of questionnaires to synchronize

Post by titeuf »

Hello,
I wanted to know if it's possible to select the questionnaires to send.
I have indeed managed to set up an application that allows to create a data file for each questionnaire number. I would like to suggest to the investigator to select the questionnaires to send.
Thank you in advance for your reactions.
PS: Sorry if it's not too clear, I do not understand English well.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Choice of questionnaires to synchronize

Post by htuser »

Hi Titeuf,
Yes it's possible both using CSDB and old fashion text file.
1.- With CSDB, it's more easy.
a) You can use keylist function or query CSDB with sqlquery and in both, fill a list with all ID or ID's of you data file;
b) You can use list.show to display a radio button of ID/ID's and choice which questionnaire ID you want to sync;
c) Use the result of b) as an universe for sync() function
This will sync only the questionnaire you choose in b)

2.- With text file, as you mentioned having multiple data files:
a) You can use only dirlist function to retrieve a list with the name including of whatever data file including path. I recommend you to
use it with wildcard_filter with *.dat or *.txt, depending of the format of your data file;
b) You can use list.show to display a radio button of your data file list and choice which data file you want to sync;
c) Use the result of b) as a from_path for syncfile() function;

Please let me know if this explanation help you,
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Choice of questionnaires to synchronize

Post by aaronw »

A CSDB file will only upload cases that are new or modified. Why not upload them all, every time? I think that would simplify the application for you and the enumerator.
titeuf
Posts: 4
Joined: October 7th, 2019, 5:46 am

Re: Choice of questionnaires to synchronize

Post by titeuf »

Good evening @htuser and @aaronw,
@htuser thank you for the proposed solution I am trying to try even if I diffcult to put into practice your second option because I can not use list.show with dirlist.
@aaronw, I would have liked to facilitate my task but my boss wants the investigator to send his questionnaires to the supervisor who will check and return only the items that have been corrected.
Thank you for your recations !
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Choice of questionnaires to synchronize

Post by josh »

For sending questionnaires to the supervisor for review rather than sending only selected questionnaires I would still send everything to the supervisor but control which questionnaires the supervisor is allowed to review through an assignments file. The assignments file is a lookup file that maps case ids to users (interviewers/supervisors). In your menu program you limit access of the interviewer and supervisor to only those cases that are assigned to them. So even if they have all the cases in the data file on their device, they are only allowed to view/modify a subset of those cases. When you send the questionnaires for the supervisor to review, you send all the cases but you modify the assignments file so that the supervisor can now work on the cases that they are supposed to review. When the supervisor has completed the review the assignments file is modified again to assign those cases back to the interviewer.

This is the approach that I have seen most of the bigger household surveys use, however implementing this of course is not simple. It takes quite a bit of CSPro programming expertise. The Labor Force example in the examples directory shows an example of using an assignments file to limit which cases the interviewer can modify but it doesn't deal with modifying the assignments. The session 3 example here http://teleyah.com/cspro/RwandaNov2018/ has an example of managing assignments of clusters which is similar to managing assignments of households. Between those two examples you can get an idea of what is involved.
Post Reply