biocore / american-gut-web

The website for the American Gut Project participant portal
BSD 3-Clause "New" or "Revised" License
5 stars 24 forks source link

some (all?) MULTIPLE questions should have their "unspecified" behavior modified #325

Open adamrp opened 9 years ago

adamrp commented 9 years ago

Working on the porting of the old survey to new when I ran into this dilemma. E.g., Currently, the question "Do you have the following allergies?" has the responses:

But if the user doesn't select any, it goes into the database as "Unspecified". So, we have no way of knowing whether the question was skipped by the user or whether the user is stating that they have none of these allergies.

We should modify these to act as supplemental questions, but not as TEXT supplemental questions. So, the user can select "yes I have nonfood allergies", and then be prompted to select those allergies from a list

wasade commented 9 years ago

Good catch On Oct 20, 2014 11:08 PM, "adamrp" notifications@github.com wrote:

Working on the porting of the old survey to new when I ran into this dilemma. E.g., Currently, the question "Do you have the following allergies?" has the responses:

  • Sun
  • Drug
  • Pet Dander
  • Poison Ivy
  • Bee stings

But if the user doesn't select any, it goes into the database as "Unspecified". So, we have no way of knowing whether the question was skipped by the user or whether the user is stating that they have none of these allergies.

We should modify these to act as supplemental questions, but not as TEXT supplemental questions. So, the user can select "yes I have nonfood allergies", and then be prompted to select those allergies from a list

— Reply to this email directly or view it on GitHub https://github.com/biocore/american-gut-web/issues/325.

wasade commented 9 years ago

@adamrp, is this an "easy" thing to accomplish prior to deploy today?

adamrp commented 9 years ago

I don't think so, unfortunately. To do this right, someone would first have to answer "yes", "no", or "unspecified" to the question ("Do you have any of these allergies?" for example), which would be a dropdown as usual, and then that would spawn a supplemental question div displaying the checkboxes.

On Mon, Oct 27, 2014 at 10:26 AM, Daniel McDonald notifications@github.com wrote:

@adamrp https://github.com/adamrp, is this an "easy" thing to accomplish prior to deploy today?

— Reply to this email directly or view it on GitHub https://github.com/biocore/american-gut-web/issues/325#issuecomment-60622342 .

wasade commented 9 years ago

Tackling this shouldn't be too bad as the solution is to add a multiple choice question that is:

Do you have any of these non-food allergies (sun, drug, pet dander, poison ivy, bee strings)? (Yes/No/Unspecified)

If yes, it triggers a supplemental.

The addition of the question and supplemental should be a light set of inserts and updates to the db, there should not need to be any python-level changes. When this issue is tackled, it will be necessary to promote the current responses to the new structures appropriately, however we will not be able to infer a "no" response.