lookit / lookit/lookit-api

Adding country of residence/location

Open
#1,818 0 comments 0 reactions 0 assignees View on GitHub
Good First Issue Participant
Dominant language
Python
Stars
12
Forks
21
Avg merge
5d 19h
Merged PRs (30d)
5

Description

# TL;DR

For various *regulatory reasons on CHS's side* but also sometimes researcher's side (regulatory OR research purpose), we want to know what country, or what location, people are in. At the moment, we know as little as possible about families for privacy reasons, so this would be a change we need to consider carefully.

# Narrative

Use cases could include in-person/geographically limited studies, differences in regulatory requirements around data, differences in IRB requirements (e.g. some require US locale).

# Implementation and scope

- Add a current residence field to the account demographics model. This field should allow blank responses and the database migration should set the value to NULL/blank for existing entries.
- Add a current residence question to the demographics form. This should be a drop-down if we are just asking for a country. We could consider asking for state as a follow-up if the user selects "United States" as the country.
- Consider edge cases, such as people who split their time across different locations, and add help text about how they should answer. (This may be important for differentiating good-faith users from those who are lying about their location to get access to more studies.)
- Add this field to the set of criteria researchers have access to for setting participant eligibility (study create/edit form).

And while we're adding this new demographics field/question, it might make sense to do the same for race/ethnicity: #1099 (though I think that issue was requesting race/ethnicity on the child model/form rather than demographics)

# Questions

1. If we want existing users to enter this information, how should we encourage them to do this? For instance, we could add a banner message for logged in users who have missing residence info, and say that adding this info may make them eligible for more studies. Or on a particular study participation page, we could have an eligibility message: "This study has a geographic residence requirement. Please enter your country of residence (link) to find out if you are eligible." If we implement this, we should also cover the case where the user has not completed the demographics form at all: #1144
2. Users may try to change their country of residence arbitrarily to see if they're eligible for more studies. Should we limit this somehow (like child birthdays) or otherwise try to confirm their location?

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by locating the account demographics model and form, the database migration setup, and the study create/edit eligibility criteria entry point. Resolve the residence, privacy, validation, and re-entry questions first; done means the nullable field, user-facing question, and researcher eligibility criterion work together.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.