Forcing the download of cases from the server

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Forcing the download of cases from the server

Post by AriSilva »

The scenario is the following:
1. The enumerator executed some interviews, but did not finish all of them, they were pending from one reason or other.
2. The enumerator uploaded the interviews to the server.
3. The DMC crashed for some reason, the enumerator took another DMC and started to work in the same sector. The problem is that to start the work, the system creates the cases from a cadaster (this is not an statistical survey, it is more like a control survey), and these "new" cases start blank, with all the answers notappl.
4. Now we need to download back to the DMC the cases that were stored in the server, but tow problems will (might) arise:
4.1 the new cases that we want to be overwritten by the ones in the server are newer than the ones in the server, so the syncdata(GET) might not bring back the cases from the server.
4.2 as we are talking about different DMCs, although the case ID is exactly the same, the syncdata(GET) might create duplicates in the DMC.
So, the question is:
How can we enforce the download to overwrite the cases in the DMC, even if the have different dates and UUIDs?
Or, do you have another approach to solve this problem?
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Forcing the download of cases from the server

Post by aaronw »

When you say the enumerator took another DMC what do you mean? Does that mean another device?
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: Forcing the download of cases from the server

Post by AriSilva »

DMC = device = tablet.
We use it for (Dispositivo Movil de Coleta) in Spanish and Portuguese.
Yes, the interviewer used another device to continue his work.
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Forcing the download of cases from the server

Post by aaronw »

If you run syncdata(GET) from device 2 it will download all the cases from device 1 and you will have a duplicate for each sector. Even though the case id appears unique the underlying uuid is not. For instance the cases may look like:

Device 1

Code: Select all

ID: 00001- UUID: 20b8443c-1c86-471b-a65e-4567ec1478a2
ID: 00002- UUID: 0eba04b5-4bd2-4284-8797-3f7a035110a8
Device 2

Code: Select all

ID: 00001- UUID: 7e090d65-55d6-46c1-9b76-6cae4718d7fe
ID: 00002- UUID: 11a656ed-bd4c-4de7-a89d-6b3bee0b7ac8
I'm not sure how your application is designed and whether it will allow you to use cases from device 1 and device 2 for the same sector. If it does one approach would be to delete cases off the server from device 1 (that were done on device 2) and delete cases off device 2 (that were done on device 1). Then synchronize device 2 with the server.

Alternatively, you could copy the data from device 1's cases to device 2's cases. Depending on the number of cases and amount of data this might make sense by simply re-keying the data or writing a batch application. Then you could ignore the cases from device 1 or delete them.

You need to test either approach to verify the server, client, and application are in a good state afterwards. I would not make this change on the production server until everything has been tested. First, create a back up of device 1, device 2, and the server. Then create another instance of CSPro, and test the approach on a non-production server.
Post Reply