episphere / questionnaire

1 stars 2 forks source link

Error message range check incorrect for MENS2 #243

Closed cusackjm closed 1 year ago

cusackjm commented 1 year ago

Successfully replicated 2 participant issues (CS0010233 and CS0010148)

Tested in DEV Incognito Edge on laptop on 7/18/23:

  1. Entered 7/18/2023 at MENSTART in Blood/Urine Survey

  2. In the Menstrual Cycle Survey, the MENSTART date did not pipe into MENSINTRO intro text. Either the data is not saving in the Blood/Urine Survey and/or it is not piping into the Menstrual Cycle Survey image

  3. The range check for MENS2 (calendar picker) is incorrect, should be based off of MENSTART image

If I enter a date to be before 1/1/1998, I get a new error message for 1/1/1999. image

Unable to move on because no date is accepted. Tested in cid: 2162729839 covidtest8@mailinator.com

@danielruss @boyd-mj is this a QUEST and/or markup issue? Is this somehow related to the new code pushed for the Month picker?

danielruss commented 1 year ago

@cusackjm The first problem

Getting data from the Menstrual Cycle Survey to the Blood/Urine Survey is a likely a PWA issue. It is possible that the data is not being filled by the Menstrual Cycle Survey or not being entered by the B/U Survey. We need to add @anthonypetersen to the chat.

I will pass the value in... do you have the concept id for MENSTART?

cusackjm commented 1 year ago

MENSTART CID: 644459734

danielruss commented 1 year ago

@anthonypetersen Do you pass in:

D_112151599 : Have you had a menstrual period in the last 60 days?

D_644459734 : When was the start date of your most recent menstrual period (the first day on which you saw menstrual blood)? If you are not sure or do not remember, please make your best guess.

I see the 1998 error. It is a quest error, unlikely related to the last fix. Looking to fix it now.

anthonypetersen commented 1 year ago

What do you mean, do I pass that in?

danielruss commented 1 year ago

Quest need values from a Blood/Urine Survey. They get passed as arguments to quest.

Look how I think ... AGE ... is passed from Module 1 to module 2.

anthonypetersen commented 1 year ago

It doesn't look like we are passing in extra fields for the Menstrual Cycle survey

danielruss commented 1 year ago

@cusackjm Quest has been updated to fix the bug you pointed out. This does not fix the problem of "previously you said...". How I tested: In the "Previous results Box I add 7/17/2023" image This fixed the error: image Then since I said my period start 7/17/2023 (yesterday) , I say "Yes -- my period started"... and I was able to add 7/17/2023. When I added a date too long ago, I get image likewise if I add a date far in the future. image

I believe this shows quest is working and ready to go.

Davinkjohnson commented 1 year ago

@danielruss was this fix something that needed to be changed as a result of your most recent date picker (or maybe it was month picker)? Just trying to understand for any regression testing needs.

danielruss commented 1 year ago

No, This was a bug that just never came up before. Interestingly, I had fix this for Year-Month and left a comment that I probably had to do it for dates also. Today, we fixed it for dates.

Davinkjohnson commented 1 year ago

@cusackjm can you test, does Daniel's fix resolve the error such that you can complete the survey?

cusackjm commented 1 year ago

@Davinkjohnson I was able to go back in covidtest8@mailinator and submit the survey. I also tested in covidtest9@mailinator to check if the blood/urine date was passed to the MENSINTRO, but it was still "undefined".

danielruss commented 1 year ago

@cusackjm As I said earlier, it needs to be passed in from the PWA.

@anthonypetersen The PWA engages quest in questionnaire.js. Notice the inputData object which is set on line 36. The function is defined on line 335. You need to fill the inputData with data from the appropriate values.

cusackjm commented 1 year ago

Passed testing in: Blood/urine/mtw--> menstrual cycle Blood/urine--> menstrual cycle