2

Hi Stack Overflow community!

I first want to say thank you in advance for any help and feedback. I am a current Clinical Psychology PhD student and I am working on a project utilizing a personalized feedback intervention incorporating sleep. I was able to create a sleep diary using flatpickr on Qualtrics. I am asking the time that an individual goes into bed, falls asleep, and wakes up over the past week. However, this is my first time using Java and I have been having a difficult time with the second component of my study.

The problem I am running into is creating the personalized feedback component which provides the time spent in bed (time wake up-time goes into bed), total sleep time (time wake up-time fall asleep), and sleep efficiency (total sleep time/total time in bed x100). Participants will be getting feedback on these three variables for 7 days, plus weekday/weekend averages. Ultimately I want to use this and create a bar graph display for feedback. This is the code I have so far on Qualtrics for the feedback and I attached what the survey question for the feedback looks like in qualtrics. I've been looking through forums but I'm just having a difficult time with this. Thank you in advance for your help and guidance!

Qualtrics.SurveyEngine.addOnReady(function()
{
    /*Place your JavaScript here to run when the page is fully displayed*/

   var start = new Woke1("${q://QID2362/ChoiceTextEntryValue/10/3}");
    var start = newBed1("${q://QID2362/ChoiceTextEntryValue/10/1}");

    Qualtrics.SurveyEngine.setEmbeddedData("hoursDifff",hours);
    
});

Personalized Feedback

Cris1902
  • 21
  • 1

0 Answers0