ODK for longitudinal RCT w/ multiple visits

Good morning, everyone
My name is Javier and we are using ODK as the EDR/CFR of a randomized control trial (RCT). We need to set up two features that I would like to discuss here to see if there are solutions already implemented by the community

  1. Randomization.
    Our RCT has two branches, and each patient should be ramdonly assinged to one at the beggining. However, the only random tool I have been able to find so far is the ramdom() function, but I´m not quite sure this is an optimal implementation. I haven´t found any specific guide or post to this issue, maybe it is easier to link an external randomization algorithm, but I would like to keep my form as simple as possible and within ODK features, since our context of work is a low-income setting.

  2. Longitudinal follow-up tool
    Since every patient is going to need multiple visits, I wanted to know if there is a way to keep al the records from the same individual all linked through some ID or code. The only workflow I can think about (new user here) is to build one form for each visit, but i fear that would lead to potential mistakes such a spelling names, ID code mistakes, data loss, etc. Maybe if from second form we could add a constrain that looked up behing to find matches or something similar we could solve this.

So I would love to know if anyone have had to deal with something similar and can guide me through it.
Any help would be much apreciated.

Have a great day!

1 Like

There are several posts on the forum that discuss randomization. Have you seen these and do they help?

For follow-up, it would be possible to use an ID code to lookup some additional details that are pulled from a form dataset and used to confirm that the ID was entered correctly.

Hello @danbjoseph and thanks for replying.

Unfortunatly, none of the answers fit my original question. When I´m talking about randomization we mean that each patient shall be ramdonly assigned to one group (e.g. 50% chances getting 0-1 to be assigned to one treament group).

This random assignment has consequencies in the following forms to be applied, of course, so this is crucial.

In addition, and given the above, the follow up setting I´m looking is one that allows the data collector on the field to be able to FIRST introduce the patient´s ID/Codebar and THEN get showed the full set of forms availiable for that given patient, both past or completed forms and the rest.

Otherwise each collector is going to face a list of 20 forms to choose from (10 visits * 2 treatment arms) and THEN fill in a first variable of patient´s ID. That´s twice the chance of commiting a mistake and twice the effort by the data checking team.

If anyone has an idea on anything of that I would be very happy to hear.
Thanks you very much again, have a nice day!


Hi @Javidelaguila,
Responding to the Longitudinal follow-up tool: please see the attached case_start and case_follow-up examples.
case_follow_up.xlsx (12.9 KB)
case_start.xlsx (12.8 KB)

In Summary: I'm using the case_register as a list_choice in the follow-up form. To achieve this,

  1. Include a name and label variables in the case register (done using calculate) - name contains case_id eg. 001 and label is the case label that I intend to search in the followup form, here implemented as combination of case id and farmer name eg. 001 - Farmer 1.
  2. In the follow_up form, use select_one_from_file case_register.csv to pick the case id from the case register, - I like to use a minimal search for this.
  3. Once the case follow up is uploaded, go to form settings and under form media files, select a dataset to link. - this should enable you to link to the case_register form data.
  4. Now you should be able to search for a registered case. - a refresh is needed to access a case that has just been registered

I hope this helps.