TheBreakingGoodProject / Dalyell-Projects

0 stars 1 forks source link

Adding/Deleting Medicines for the Survey #32

Open carolineson opened 2 years ago

carolineson commented 2 years ago

Hi everyone!

I've been working on the piped text in the survey so that we have just the name of the medicine show up once a medicine has been selected, instead of the medicine and the description and found that it's currently very convoluted. So, I thought I'd write out a simplified description of how to add/delete a medicine to save someone a couple of hours of research and trial and error!

So while we can rename the individual option (under recode values, then change the variable name) for each medicine so that when we import the data the name of the variable is just the medicine and not the medicine and the description (ie "amlodipine" not "amlodipine - used to treat hypertension").

Screen Shot 2021-10-07 at 5 14 54 PM Screen Shot 2021-10-07 at 5 15 07 PM

We basically have to change the data through Qualtrics' "embed data" option. So once we have the question block set up that asks the user which medicine they are choosing, we click on the survey flow option to create some branches. Following the branches already set up, we find the block where we choose the medicine (currently Challenge 2 intro and Challenge 3 intro). We then click to add an element below and click the "Branch" option. Here comes the tedious part, we need to create a branch for each of the medicines available. So in my case, I added 18 branches, and then set the condition if each medicine was selected for each of the branches.

Screen Shot 2021-10-07 at 5 12 29 PM Screen Shot 2021-10-07 at 5 31 59 PM

Then under each of the individual branches, we add another element and click the "Embedded Data" option. Here is where we are actually inputting the individual data/text that we want to pipe. So we create a variable on the left that we will use for all of the medicines (new field created Medicines Selected), and then set the right side to what we now want the new text to be.

Screen Shot 2021-10-07 at 5 35 47 PM

Once we go through and do this for all of the medicine options, we save the changes and now in the survey, we can pipe the new embedded data! Instead of piping the "Selected Choice" of the original question, we will then click the embedded data, and the new field we've created called Medicines Selected!

Screen Shot 2021-10-07 at 5 41 20 PM

So basically, this is repeated for both Challenge 2 and 3 as they both have the medicine name + descriptions, and obviously, the opposite needs to be done (removing the branches) when a medicine is taken off the list! Apologies for the super long post, but hopefully will be helpful when it's needed!

As a side note: At the moment, it seems like we are currently able to change the value number (under the recode value) and pipe that, but, according to my scouring of Qualtrics discussion pages, being able to pipe in the individually changed variable names should be available in the future (and hopefully can avoid the headache that the current system is!). So maybe if we can keep an eye out for that, it will make life a whole lot easier! 😄

olwu3220 commented 2 years ago

Perfect, this is super detailed and makes it a lot easier. I'll fb you if I have any troubles with the technical side of implementing it!! :)))

carolineson commented 2 years ago

@olwu3220 Oh don't worry!! It's already done. I was fiddling around with it anyways because I thought there were some more advanced logic options for my original implementation idea (that I found out doesn't actually exist oops)!