episphere / questionnaire

1 stars 2 forks source link

HOUSE2 and ALCLIFE4 grid not displayed #316

Closed cusackjm closed 5 months ago

cusackjm commented 5 months ago

HOUSE2 GRID was not displayed when it should have been (HOUSE1 grid= (582006876:2 to 3 days a month))

cusackjm commented 5 months ago

ALCLIFE4 GRID not displayed

cusackjm commented 5 months ago

@danielruss @anthonypetersen is this a quest or PWA issue? IMS is unable to see it in their testing. (This was mentioned in another issue, but I separated them for clarity)

anthonypetersen commented 5 months ago

are they using the dev tool or the pwa to test?

cusackjm commented 5 months ago

@anthonypetersen the renderer, is that the dev tool?

anthonypetersen commented 5 months ago

yes

danielruss commented 5 months ago

@cusackjm I think the grids are working as expected. I assume that there is an error in the coding. I simplified the grids to use the new functions in order to simplify the logic. I don't guarantee that the functionality is what you want. It is the functionality I think you want.

|grid?|id="GRID_SITTING"|During the <b>past 12 months</b>, about how many <b>hours per day</b> did you usually spend doing each of these activities %displayif=valueEquals("WORK",1)%outside of work%<p><p>|[
[SITTINGA] Driving or sitting in a car, bus or train. %displayif=equals("WORK",1)%<i>(This includes commuting to and from work.</i>)%;
[SITTINGB] Sitting and watching television shows, movies, or other video content on a television, tablet, phone, or computer;
[SITTINGC] Sitting and browsing the internet, playing video games, using social media, or using any other apps or programs on a tablet, phone, computer, or television;
[SITTINGD] Other sitting outside of work (such as for reading, crafts, and hobbies);]|

(0:None)
(1:Less than 30 minutes)
(2:30 minutes)
(3: 45 minutes)
(4: 1 hour)
(5: 2 hours)
(6: 3 to 4 hours)
(7: 5 to 6 hours)
(8: 7 to 8 hours)
(9: 9 hours or more)|

//< #NR -> HOUSE1 >

[HOUSE1]<b>Household Chores, Caring for Others, and Shopping</b>

|grid?|id="GRID_HOUSE"|During the <b>past 12 months</b>, about how often did you do each of these household or shopping activities%displayif=equals(WORK,1)% outside of work%? |[ [HOUSE1A] Light household chores (such as cooking, tidying up, laundry, or dusting); [HOUSE1B] Moderate to vigorous household chores (such as vacuuming, or sweeping); [HOUSE1C] Caring for pets (walking dogs, feeding, playing, grooming); [HOUSE1D] Caring for children or adults (pushing stroller or wheelchair, lifting, bathing); [HOUSE1E] Walking while shopping or doing errands (do not count walking for exercise);]|(44:Never) (1:Once a month or less) (2:2 to 3 days a month) (3: 1 to 2 days a week) (4: 3 to 4 days a week) (5: 5 to 6 days a week) (6: Every day)|

|grid?|id="GRID_HOUSE2" displayif=someSelected('HOUSE1A_1','HOUSE1A_2','HOUSE1A_3','HOUSE1A_4','HOUSE1A_5','HOUSE1A_6','HOUSE1B_1','HOUSE1B_2','HOUSE1B_3','HOUSE1B_4','HOUSE1B_5','HOUSE1B_6','HOUSE1C_1','HOUSE1C_2','HOUSE1C_3','HOUSE1C_4','HOUSE1C_5','HOUSE1C_6','HOUSE1D_1','HOUSE1D_2','HOUSE1D_3','HOUSE1D_4','HOUSE1D_5','HOUSE1D_6','HOUSE1E_1','HOUSE1E_2','HOUSE1E_3','HOUSE1E_4','HOUSE1E_5','HOUSE1E_6') |On the days that you did these household or shopping activities, about how much time per day did you spend doing each activity? |[
    [HOUSE2A,displayif=someSelected('HOUSE1A_1','HOUSE1A_2','HOUSE1A_3','HOUSE1A_4','HOUSE1A_5','HOUSE1A_6')] Light household chores (cooking, cleaning up, laundry, dusting, etc.);
    [HOUSE2B,displayif=someSelected('HOUSE1B_1','HOUSE1B_2','HOUSE1B_3','HOUSE1B_4','HOUSE1B_5','HOUSE1B_6')] Moderate to vigorous household chores (vacuuming, sweeping, etc.);
    [HOUSE2C,displayif=someSelected('HOUSE1C_1','HOUSE1C_2','HOUSE1C_3','HOUSE1C_4','HOUSE1C_5','HOUSE1C_6')] Caring for pets (walking dogs, feeding, playing, grooming);
    [HOUSE2D,displayif=someSelected('HOUSE1D_1','HOUSE1D_2','HOUSE1D_3','HOUSE1D_4','HOUSE1D_5','HOUSE1D_6')] Caring for children or adults (pushing stroller or wheelchair, lifting, bathing);
    [HOUSE2E,displayif=someSelected('HOUSE1E_1','HOUSE1E_2','HOUSE1E_3','HOUSE1E_4','HOUSE1E_5','HOUSE1E_6')] Walking while shopping or doing errands (Do not count walking for exercise);
]|
    (0: 15 minutes or less)
    (1: 16 to 30 minutes)
    (2: 31 to 44 minutes)
    (3: 45 to 59 minutes)
    (4: 1 hour)
    (5: 2 hours)
    (6: 3 hours or more)
|
danielruss commented 5 months ago

I think once @joshid-ims makes those changes HOUSE2 should be ok. Moving to ALCLIFE4

danielruss commented 5 months ago

ALCLIFE4 appears to have the same issue as HOUSE2.

|grid?|id="GRID_ALCLIFE4" displayif=someSelected("ALCLIFE2A_1","ALCLIFE2A_2","ALCLIFE2A_3","ALCLIFE2A_4","ALCLIFE2A_5","ALCLIFE2A_6","ALCLIFE2A_7","ALCLIFE2A_8","ALCLIFE2B_1","ALCLIFE2B_2","ALCLIFE2B_3","ALCLIFE2B_4","ALCLIFE2B_5","ALCLIFE2B_6","ALCLIFE2B_7","ALCLIFE2B_8","ALCLIFE2C_1","ALCLIFE2C_2","ALCLIFE2C_3","ALCLIFE2C_4","ALCLIFE2C_5","ALCLIFE2C_6","ALCLIFE2C_7","ALCLIFE2C_8","ALCLIFE2D_1","ALCLIFE2D_2","ALCLIFE2D_3","ALCLIFE2D_4","ALCLIFE2D_5","ALCLIFE2D_6","ALCLIFE2D_7","ALCLIFE2D_8","ALCLIFE2E_1","ALCLIFE2E_2","ALCLIFE2E_3","ALCLIFE2E_4","ALCLIFE2E_5","ALCLIFE2E_6","ALCLIFE2E_7","ALCLIFE2E_8","ALCLIFE2F_1","ALCLIFE2F_2","ALCLIFE2F_3","ALCLIFE2F_4","ALCLIFE2F_5","ALCLIFE2F_6","ALCLIFE2F_7","ALCLIFE2F_8","ALCLIFE2G_1","ALCLIFE2G_2","ALCLIFE2G_3","ALCLIFE2G_4","ALCLIFE2G_5","ALCLIFE2G_6","ALCLIFE2G_7","ALCLIFE2G_8","ALCLIFE2H_1","ALCLIFE2H_2","ALCLIFE2H_3","ALCLIFE2H_4","ALCLIFE2H_5","ALCLIFE2H_6","ALCLIFE2H_7","ALCLIFE2H_8")|
What type(s) of alcoholic beverage did you usually drink when you were age %displayif=doesNotEqual(isDefined(REGALCOHOL_AGE,-1),-1)%{$REGALCOHOL_AGE}%%displayif=equals(isDefined(REGALCOHOL_AGE,-1),-1)%{$ALCOHOL3}% to age %displayif=and(exists("AGE"),doesNotExist("ALCOHOL6"))%{$AGE}%%displayif=and(doesNotExist("AGE"),doesNotExist("ALCOHOL6"))%{$u:age}%%displayif=exists("ALCOHOL6")%{$ALCOHOL6}%? Select all that apply.
 |[

    [ALCLIFE4A,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=0 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=17 and someSelected("ALCLIFE2A_1","ALCLIFE2A_2","ALCLIFE2A_3","ALCLIFE2A_4","ALCLIFE2A_5","ALCLIFE2A_6","ALCLIFE2A_7","ALCLIFE2A_8")] Age {$e:valueOrDefault("REGALCOHOL_AGE",0)} to {$e:min(17,valueOrDefault("ALCOHOL6","AGE","age",100)) };
    [ALCLIFE4B,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=18 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=24 and someSelected("ALCLIFE2B_1","ALCLIFE2B_2","ALCLIFE2B_3","ALCLIFE2B_4","ALCLIFE2B_5","ALCLIFE2B_6","ALCLIFE2B_7","ALCLIFE2B_8")] Age {$e:max(18,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(24,valueOrDefault("ALCOHOL6","AGE","age",100))};
    [ALCLIFE4C,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=25 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=29 and someSelected("ALCLIFE2C_1","ALCLIFE2C_2","ALCLIFE2C_3","ALCLIFE2C_4","ALCLIFE2C_5","ALCLIFE2C_6","ALCLIFE2C_7","ALCLIFE2C_8")] Age {$e:max(25,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(29,valueOrDefault("ALCOHOL6","AGE","age",100))} ;
    [ALCLIFE4D,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=30 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=39 and someSelected("ALCLIFE2D_1","ALCLIFE2D_2","ALCLIFE2D_3","ALCLIFE2D_4","ALCLIFE2D_5","ALCLIFE2D_6","ALCLIFE2D_7","ALCLIFE2D_8")] Age {$e:max(30,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(39,valueOrDefault("ALCOHOL6","AGE","age",100))} ;
    [ALCLIFE4E,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=40 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=49 and someSelected("ALCLIFE2E_1","ALCLIFE2E_2","ALCLIFE2E_3","ALCLIFE2E_4","ALCLIFE2E_5","ALCLIFE2E_6","ALCLIFE2E_7","ALCLIFE2E_8")] Age {$e:max(40,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(49,valueOrDefault("ALCOHOL6","AGE","age",100))} ;
    [ALCLIFE4F,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=50 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=59 and someSelected("ALCLIFE2F_1","ALCLIFE2F_2","ALCLIFE2F_3","ALCLIFE2F_4","ALCLIFE2F_5","ALCLIFE2F_6","ALCLIFE2F_7","ALCLIFE2F_8")] Age {$e:max(50,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(59,valueOrDefault("ALCOHOL6","AGE","age",100))} ;
    [ALCLIFE4G,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=60 and valueOrDefault("REGALCOHOL_AGE","ALCOHOL3",0)<=69 and someSelected("ALCLIFE2G_1","ALCLIFE2G_2","ALCLIFE2G_3","ALCLIFE2G_4","ALCLIFE2G_5","ALCLIFE2G_6","ALCLIFE2G_7","ALCLIFE2G_8")] Age {$e:max(60,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(69,valueOrDefault("ALCOHOL6","AGE","age",100))} ;
    [ALCLIFE4H,displayif=valueOrDefault("ALCOHOL6","AGE","age",0)>=70 and someSelected("ALCLIFE2H_1","ALCLIFE2H_2","ALCLIFE2H_3","ALCLIFE2H_4","ALCLIFE2H_5","ALCLIFE2H_6","ALCLIFE2H_7","ALCLIFE2H_8")]
    |
    [0:Beer or hard cider]
    [1:Liquor or mixed drinks]
    [2:Wine]
    [55:Other alcoholic beverages (such as wine coolers, "hard soda," spiked seltzer (sparkling water), Smirnoff® Ice, malt liquor, or pre-mixed cocktails)]
    |

This works for me. Another grid error popped up. I only create radio buttons, not checkboxes. Fixed

It only shows rows where someone said they drink in the last grid, and handles the age ranges.

danielruss commented 5 months ago

with this adjustments, the two grids should display appropriately.

joshid-ims commented 5 months ago

What I am confused about is that old functions used to work before. If they are not working anymore, then will the old functions not work in many other places going forward or only in grids?

I will make the change and we can test this.

danielruss commented 5 months ago

The old displayif functions probably still work. I am not using the old functions, and I encourage you to use the new functions. So anytime you have an issue and need my assistance, I'm going to use the new functions.

cusackjm commented 5 months ago

COV20 GRID is not being displayed in Covid-19 survey

joshid-ims commented 5 months ago

@cusackjm We made changes and the COV20 grid is displaying. But while testing we found something. From the tester:

If a subject selected 'No, I never had this symptom' for all symptoms in grids COV19A, COV19B, and COV19C but responded 'Yes' to question COV19C6A (experienced any other symptoms?), it goes to grid COV20A, as it should. But, grid COV20A doesn't have a question for 'Other symptoms', so nothing is displayed. See below. Can you check with Julie to see if we need to add a row for grid COV20A for 'Other symptoms'? If Julie says no, then we need to remove "SRVCOV_COV19C6A_V1R0_1" from COV20_SKIP.

image

Would you like to add a row for this option in the grid? Or would you like to remove the condition to display this grid based on COV19C6A question?

cusackjm commented 5 months ago

@joshid-ims If a subject selected 'No, I never had this symptom' for all symptoms in grids COV19A, COV19B, and COV19C but responded 'Yes' to question COV19C6A (experienced any other symptoms?), it goes to grid COV20A, as it should. (COV20A should not be displayed. COV19C6A is separate from COV19C. If COV19C6A= 1, the corresponding follow up question is SrvCov_COV20A17_v1r)

cusackjm commented 5 months ago

@joshid-ims image (I removed the prefix/suffix from the variables for the sake of space)

guinevere83 commented 5 months ago

(Think I put this post in the wrong thread)

For the second display condition for ALCOHOL9, I'm a little confused about what we're wanting to happen:

image

However, if ALCOHOL5 = 0, the user will get routed to ALCOHOL7 inevitably, and therefore skip to the ALCLIFE grids:

image

Are we now wanting ALCOHOL7 to route to ALCOHOL9? If so, and one answers NR for ALCOHOL6, then the ALCLIFE grids won't display when previously they would have.

cusackjm commented 5 months ago

@guinevere83 I will review this today and get back to you

cusackjm commented 5 months ago

@guinevere83 @joshid-ims I updated the skip logic directions to improve clarity, although I do not think this impacted the skip logic anyways. Let me know if you have any questions.

If ALCOHOL5= 0 (did not drink in past 12 months), the user will go to ALCOHOL6, ALCOHOL7. They will skip ALCOHOL8 - OTHALC2 because they pertain to drinking in the past 12 months. They will skip ALCOHOL9 because that also pertains to drinking in the past 12 months (this is the edit that I just made. BUT I do not think this is a major change, because if a participant saw ALCOHOL7 they would not see ALCOHOL9 and go to ALCLIFE1 anyways)

If the participant responded ALCOHOL5= 0 AND provided a response to ALCOHOL6, they will see ALCLIFE1. If the participant responded ALCOHOL5= 0 AND did NOT provide a response to ALCOHOL6, they will NOT see ALCLIFE1 and instead go to INTROSE

cusackjm commented 5 months ago

confirmed that HOUSE2 grid is now being displayed in dev testing on 1/22/24 (removing mod 2 label)

cusackjm commented 5 months ago

COV24 grid is not being displayed in dev now (new issue) COV20 gris is being displayed (fixed)

@joshid-ims

cusackjm commented 5 months ago

@joshid-ims do you have an eta for the COV24 fix?

boyd-mj commented 5 months ago

Hi Julie, we're looking into what might be happening here and will get back to you.

joshid-ims commented 5 months ago

Sorry, I was on another call. I have fixed the issue and it has passed testing too.

Gwen added a comment about the range limits issue as we are not seeing it. This is also in Covid survey.

From: boyd-mj @.> Sent: Thursday, January 25, 2024 2:48 PM To: episphere/questionnaire @.> Cc: Joshi, Deepti (IMS) @.>; Mention @.> Subject: [EXTERNAL] Re: [episphere/questionnaire] HOUSE2 and ALCLIFE4 grid not displayed (Issue #316)

Hi Julie, we're looking into what might be happening here and will get back to you.

— Reply to this email directly, view it on GitHubhttps://github.com/episphere/questionnaire/issues/316#issuecomment-1910885544, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APPZ4435WODSPUKEDFO7LKDYQKZIRAVCNFSM6AAAAABBNQC456VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHA4DKNJUGQ. You are receiving this because you were mentioned.Message ID: @.***> External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.


Information in this e-mail may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error.

cusackjm commented 5 months ago

confirmed fixed for COVID survey in dev on 1/31/2024 (removing label)

cusackjm commented 5 months ago

confirmed fix for module 3 in dev testing on 1/31