I could really use advice on this one. We have a design that works on paper and I am trying to move it into ODK without losing anything, but the state tracking is beyond what I have built before.
What the fieldwork looks like
The rules that make it hard
Three outcome families, each doing something different to the slot:
| outcome | address | slot | next door uses |
|---|---|---|---|
| interview completed | done | closed | the next slot number |
| refusal, denied entry, language barrier, break-off | dead | stays open | the same slot number again |
| nobody home, come back later | still live, up to 3 attempts | pending | the next slot number |
So a refusal does not consume a slot. If slot 3 refuses, the next household along the route becomes slot 3 again.
A pending slot provisionally holds its address. The interviewer does not wait — they carry on down the route and come back later. Several slots can be pending at once.
If a pending address uses all three attempts without success, that address dies and the slot reopens. But it cannot be refilled immediately: a replacement address only exists beyond the last main household, so every one of the 10 slots must have been attempted before any replacement can be used.
An example. Slots 1, 3–8 are done, slot 2 has failed three attempts, and 9 and 10 have never been touched. Even though 2 is the lowest open slot, the interviewer must do 9 and 10 first, and only then fill slot 2 with a replacement address.
One more constraint: last birthday depends on the current date, so re-listing a household on a later visit can select a different person. Whoever was selected on the first visit has to persist.
Every attempt is recorded, successful or not, with date, time and outcome.
Where it gets complicated
A slot is not an address. If all three attempts at slot 2 fail, that address is finished, but slot 2 stays open. It is later filled by a different address, a replacement, found by continuing the route past slot 10. So the slot number persists and the dwelling behind it can change.
Replacements cannot start early. Because replacement addresses are located beyond the last main household, every one of the 10 slots must have been attempted before any replacement can be used. So if slots 2, 9 and 10 are outstanding and slot 2 has already had three failed attempts, the interviewer must go to 9 and 10 first, and only then use a replacement address to fill slot 2.
The respondent selection cannot be recreated later. Last birthday depends on the current date, so listing the household again on a second visit can select a different person. Whoever was selected on the first visit has to persist.
Every attempt must be recorded, successful or not, with date, time and outcome.
The actual problem
An interviewer may work the same sampling point across several days. When they open the form at the next door, they need to know which slots are closed, which have a pending revisit and how many attempts each has used, whether all ten have been attempted yet, and therefore which slot number to use now.
Today this lives on a paper sheet and in the interviewer's memory. That is what I am trying to eliminate. With several pending revisits at once it is genuinely easy to get wrong, and a mistake corrupts the sample rather than just the paperwork.
What I would like the interviewer to see when they open the form:
Sampling point 042
Slots 1, 3, 4 completed. Slot 2 pending, 2 of 3 attempts used, respondent already selected. Slots 5 to 10 not started.
Next slot to use: 5
My questions
- Are Entities the right tool here, with one entity per slot holding status, attempt count and the selected respondent, updated by each submission? Are there known pitfalls with repeatedly updating the same entity from successive submissions?
- The "all ten slots attempted before any replacement" condition is a rule about the whole sampling point, not one slot. Can that be evaluated inside a form, for example by counting entities in a list that match a condition, or does it have to be precomputed server side?
- Is there any way to show a summary of several entities on one screen, so the interviewer sees the state of the sampling point rather than having to select one entity to inspect it?
- If two interviewers share a sampling point, can entity list updates be relied on to sync between devices, and what delay should I expect?
- Has anyone solved something similar without Entities, and would you recommend that route instead? I would rather use a simpler mechanism if one exists.