episphere / questionnaire

1 stars 2 forks source link

Put ALCLIFE4 on same screen as ALCLIFE4A-H GRID #257

Closed cusackjm closed 8 months ago

cusackjm commented 1 year ago

image image

joshid-ims commented 10 months ago

Issues in grid are because of the roll back as per Daniel

danielruss commented 10 months ago

@joshid-ims Thank to help from @anthonypetersen I was able to run a local version of quest (now on episphere) through a local version of the PWA (Tony will officially update the PWA). I was able to run ALL modules without an error showing up in the dev console.

The new grids look great and swap to checkboxes without requiring a second element. So the analysts should be happy not to have to worry about XXX_sm.

I dont see this error with the new grids. Once Tony updates the PWA it should work fine.

joshid-ims commented 10 months ago

Thanks Daniel! We will test again.

danielruss commented 10 months ago

@joshid-ims Tony has not pushed the updates to the PWA. You need to wait. You can run it through the dev tool.

anthonypetersen commented 10 months ago

@joshid-ims if you use the PWA in our dev tier you will see the latest Quest updates

joshid-ims commented 10 months ago

We only use Quest renderer, not PWA. Will we see changes on Quest prod now?

anthonypetersen commented 10 months ago

What do you mean Quest prod?

joshid-ims commented 10 months ago

I mean we do not have access to dev environment of Quest, I think. We use this link: https://episphere.github.io/quest/. This is not dev, right?

anthonypetersen commented 10 months ago

There isn't a development or production environment for Quest as far as I know.

joshid-ims commented 10 months ago

Ok, We will start testing then. Thanks!

joshid-ims commented 10 months ago

We still see issues in the renderer that Daniel thought were related to the roll back.

image

cunnaneaq commented 10 months ago

@danielruss do you know why this is the case? Would it be helpful for me to test in dev PWA? Not sure what the next steps are

danielruss commented 9 months ago

@joshid-ims Sorry, there were two conflated issues. 1.) grid displayif and 2.) grid piped variables. They should be both working now.

joshid-ims commented 9 months ago

Thanks! We will test.

joshid-ims commented 9 months ago

@anthonypetersen we are having issues here. The grid works in unconverted code but does not work with converted file.

I am also having issues in grid in Module 2 where a very simple function is not working unconverted. I see that Daniel is out. But can we have a call on Monday to figure this out please? Let me know.

anthonypetersen commented 9 months ago

@joshid-ims I was not involved in the development of this, you will need to wait to speak with Daniel if this is an issue you're seeing in the Quest tool.

joshid-ims commented 9 months ago

Ok. Thanks Tony.

anthonypetersen commented 9 months ago

Based on his Teams status he should be back today

danielruss commented 9 months ago

This is not a quest issue, but a module coding issue.

The question ALCLIFE2 is the text for the grid. Not a separate question.

Current:

[ALCLIFE2,displayif=and(or(equals(D_429228540,132232896),equals(D_429228540,486319890)),and(and(or(doesNotEqual(isDefined(D_556837046,-1),-1),doesNotEqual(isDefined(D_141874857,-1),-1)),doesNotEqual(isDefined(D_338467033,-1),-1)),or(doesNotEqual(isDefined(D_480426504,-1),-1),equals(D_338467033,353358909))))] During the year(s) you were drinking when you were age |displayif=doesNotEqual(isDefined(D_141874857,-1),-1)|{$D_141874857}||displayif=equals(isDefined(D_141874857,-1),-1)|{$D_250456537}| to age  |displayif=and(exists("D_150344905"),doesNotExist("D_480426504"))|{$D_150344905}||displayif=and(doesNotExist("D_150344905"),doesNotExist("D_480426504"))|{$u:age}||displayif=exists("D_480426504")|{$D_480426504}|, about how often did you drink alcohol?

|grid?|id="D_633553324" displayif=and(or(equals(D_429228540,132232896),equals(D_429228540,486319890)),and(and(or(doesNotEqual(isDefined(D_556837046,-1),-1),doesNotEqual(isDefined(D_141874857,-1),-1)),doesNotEqual(isDefined(D_338467033,-1),-1)),or(doesNotEqual(isDefined(D_480426504,-1),-1),equals(D_338467033,353358909))))| |[
     [D_294629316,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),0),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),17))] Age {$e:valueOrDefault("D_141874857",0)} to {$e:min(17,valueOrDefault("D_480426504","D_150344905","age",100)) } ;
    [D_164707243,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),18),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),24))] Age {$e:max(18,valueOrDefault("D_141874857",0))} to {$e:min(24,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_771426895,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),25),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),29))] Age {$e:max(25,valueOrDefault("D_141874857",0))} to {$e:min(29,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_818310825,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),30),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),39))] Age {$e:max(30,valueOrDefault("D_141874857",0))} to {$e:min(39,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_843593800,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),40),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),49))] Age {$e:max(40,valueOrDefault("D_141874857",0))} to {$e:min(49,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_175385712,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),50),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),59))] Age {$e:max(50,valueOrDefault("D_141874857",0))} to {$e:min(59,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_772143730,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),60),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),69))] Age {$e:max(60,valueOrDefault("D_141874857",0))} to {$e:min(69,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_602102163,displayif=greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),70)] Age {$e:max(70,valueOrDefault("D_141874857",0))} and older;]
|
    (265550580:Didn't drink during this time)
    (950039557:A few times per year)
    (402048066:A few times per month)
    (522395860:Once per week)
    (756073829:A few times per week)
    (858624942:Once per day)
    (424768954:2 to 3 times per day)
    (687445652:4 to 5 times per day)
    (333682419:6 or more times per day)
    |

Should read:

|grid?|id="D_633553324" displayif=and(or(equals(D_429228540,132232896),equals(D_429228540,486319890)),and(and(or(doesNotEqual(isDefined(D_556837046,-1),-1),doesNotEqual(isDefined(D_141874857,-1),-1)),doesNotEqual(isDefined(D_338467033,-1),-1)),or(doesNotEqual(isDefined(D_480426504,-1),-1),equals(D_338467033,353358909))))|
During the year(s) you were drinking when you were age %displayif=doesNotEqual(isDefined(D_141874857,-1),-1)%{$D_141874857}%%displayif=equals(isDefined(D_141874857,-1),-1)%{$D_250456537}% to age %displayif=and(exists("D_150344905"),doesNotExist("D_480426504"))%{$D_150344905}%%displayif=and(doesNotExist("D_150344905"),doesNotExist("D_480426504"))%{$u:age}%%displayif=exists("D_480426504")%{$D_480426504}%, about how often did you drink alcohol?|[
     [D_294629316,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),0),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),17))] Age {$e:valueOrDefault("D_141874857",0)} to {$e:min(17,valueOrDefault("D_480426504","D_150344905","age",100)) } ;
    [D_164707243,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),18),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),24))] Age {$e:max(18,valueOrDefault("D_141874857",0))} to {$e:min(24,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_771426895,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),25),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),29))] Age {$e:max(25,valueOrDefault("D_141874857",0))} to {$e:min(29,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_818310825,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),30),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),39))] Age {$e:max(30,valueOrDefault("D_141874857",0))} to {$e:min(39,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_843593800,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),40),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),49))] Age {$e:max(40,valueOrDefault("D_141874857",0))} to {$e:min(49,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_175385712,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),50),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),59))] Age {$e:max(50,valueOrDefault("D_141874857",0))} to {$e:min(59,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_772143730,displayif=and(greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),60),lessThanOrEqual(isDefined(isDefined(D_141874857,D_250456537),0),69))] Age {$e:max(60,valueOrDefault("D_141874857",0))} to {$e:min(69,valueOrDefault("D_480426504","D_150344905","age",100))} ;
    [D_602102163,displayif=greaterThanOrEqual(isDefined(isDefined(D_480426504,D_150344905),age),70)] Age {$e:max(70,valueOrDefault("D_141874857",0))} and older;]
|
    (265550580:Didn't drink during this time)
    (950039557:A few times per year)
    (402048066:A few times per month)
    (522395860:Once per week)
    (756073829:A few times per week)
    (858624942:Once per day)
    (424768954:2 to 3 times per day)
    (687445652:4 to 5 times per day)
    (333682419:6 or more times per day)
    |
image
danielruss commented 9 months ago

This is the same issue as the next grid.

joshid-ims commented 9 months ago

But the grid ALCLIFE2 displays, not ALCLIFE4.

I will change the code anyways.

joshid-ims commented 9 months ago

hmm, took a look and that is how the code is currently with % and not |.

danielruss commented 9 months ago

my code uses | for the grid and % for the internal displayif's. Note the the displayif for the ENTIRE GRID does not require %.

The important thing is that the text should be within the |grid| not in the previous question.

joshid-ims commented 9 months ago

So this is fine? This is current code.

grid? id="GRID_ALCLIFE4" displayif=or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(or(equals(ALCLIFE2A_1,1),equals(ALCLIFE2A_2,1)),equals(ALCLIFE2A_3,1)),equals(ALCLIFE2A_4,1)),equals(ALCLIFE2A_5,1)),equals(ALCLIFE2A_6,1)),equals(ALCLIFE2A_7,1)),equals(ALCLIFE2A_8,1)),equals(ALCLIFE2B_1,1)),equals(ALCLIFE2B_2,1)),equals(ALCLIFE2B_3,1)),equals(ALCLIFE2B_4,1)),equals(ALCLIFE2B_5,1)),equals(ALCLIFE2B_6,1)),equals(ALCLIFE2B_7,1)),equals(ALCLIFE2B_8,1)),equals(ALCLIFE2C_1,1)),equals(ALCLIFE2C_2,1)),equals(ALCLIFE2C_3,1)),equals(ALCLIFE2C_4,1)),equals(ALCLIFE2C_5,1)),equals(ALCLIFE2C_6,1)),equals(ALCLIFE2C_7,1)),equals(ALCLIFE2C_8,1)),equals(ALCLIFE2D_1,1)),equals(ALCLIFE2D_2,1)),equals(ALCLIFE2D_3,1)),equals(ALCLIFE2D_4,1)),equals(ALCLIFE2D_5,1)),equals(ALCLIFE2D_6,1)),equals(ALCLIFE2D_7,1)),equals(ALCLIFE2D_8,1)),equals(ALCLIFE2E_1,1)),equals(ALCLIFE2E_2,1)),equals(ALCLIFE2E_3,1)),equals(ALCLIFE2E_4,1)),equals(ALCLIFE2E_5,1)),equals(ALCLIFE2E_6,1)),equals(ALCLIFE2E_7,1)),equals(ALCLIFE2E_8,1)),equals(ALCLIFE2F_1,1)),equals(ALCLIFE2F_2,1)),equals(ALCLIFE2F_3,1)),equals(ALCLIFE2F_4,1)),equals(ALCLIFE2F_5,1)),equals(ALCLIFE2F_6,1)),equals(ALCLIFE2F_7,1)),equals(ALCLIFE2F_8,1)),equals(ALCLIFE2G_1,1)),equals(ALCLIFE2G_2,1)),equals(ALCLIFE2G_3,1)),equals(ALCLIFE2G_4,1)),equals(ALCLIFE2G_5,1)),equals(ALCLIFE2G_6,1)),equals(ALCLIFE2G_7,1)),equals(ALCLIFE2G_8,1)),equals(ALCLIFE2H_1,1)),equals(ALCLIFE2H_2,1)),equals(ALCLIFE2H_3,1)),equals(ALCLIFE2H_4,1)),equals(ALCLIFE2H_5,1)),equals(ALCLIFE2H_6,1)),equals(ALCLIFE2H_7,1)),equals(ALCLIFE2H_8,1))] What type(s) of alcoholic beverage did you usually drink when you were age%displayif=valueLength("REGALCOHOL_AGE")>0%{$REGALCOHOL_AGE}%%displayif=doesNotExist("REGALCOHOL_AGE")%{$ALCOHOL3}% to age %displayif=and(exists("AGE"),doesNotExist("ALCOHOL6"))%{$AGE}%%displayif=noneExist("AGE","ALCOHOL6")%{$u:age}%%displayif=valueLength("ALCOHOL6")>0%{$ALCOHOL6}%? Select all that apply. [ [ALCLIFE4A,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),0),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),17)),doesNotEqual(ALCLIFE2A_0,1))] Age {$e:valueOrDefault("REGALCOHOL_AGE",0)} to {$e:min(17,valueOrDefault("ALCOHOL6","AGE","age",100)) }; [ALCLIFE4B,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),18),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),24)),doesNotEqual(ALCLIFE2B_0,1))] Age {$e:max(18,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(24,valueOrDefault("ALCOHOL6","AGE","age",100))}; [ALCLIFE4C,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),25),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),29)),doesNotEqual(ALCLIFE2C_0,1))] Age {$e:max(25,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(29,valueOrDefault("ALCOHOL6","AGE","age",100))} ; [ALCLIFE4D,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),30),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),39)),doesNotEqual(ALCLIFE2D_0,1))] Age {$e:max(30,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(39,valueOrDefault("ALCOHOL6","AGE","age",100))} ; [ALCLIFE4E,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),40),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),49)),doesNotEqual(ALCLIFE2E_0,1))] Age {$e:max(40,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(49,valueOrDefault("ALCOHOL6","AGE","age",100))} ; [ALCLIFE4F,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),50),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),59)),doesNotEqual(ALCLIFE2F_0,1))] Age {$e:max(50,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(59,valueOrDefault("ALCOHOL6","AGE","age",100))} ; [ALCLIFE4G,displayif=and(and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),60),lessThanOrEqual(isDefined(isDefined(REGALCOHOL_AGE,ALCOHOL3),0),69)),doesNotEqual(ALCLIFE2G_0,1))] Age {$e:max(60,valueOrDefault("REGALCOHOL_AGE",0))} to {$e:min(69,valueOrDefault("ALCOHOL6","AGE","age",100))} ; [ALCLIFE4H,displayif=and(greaterThanOrEqual(isDefined(isDefined(ALCOHOL6,AGE),age),70),doesNotEqual(ALCLIFE2H_0,1))] Age {$e:max(70,valueOrDefault("REGALCOHOL_AGE",0))} and older;]
[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)]
|
danielruss commented 9 months ago

looks ok. although does ALCLIFE2A_4 equal 1 or some concept id? Best to test.

joshid-ims commented 9 months ago

This is how data is stored, though these 2 are different runs, showing both for comparison. This is where we think the issue is.

{"TOBACCO":["88"],"CURRSM":"44","MARIJUANA":["88"],"ALCOHOL1":"1","ALCOHOL2":"3","ALCOHOL3":"21","ALCOHOL4":{"REGALCOHOL_AGE":"21"},"ALCOHOL5":"1","ALCOHOL8":["0","1","2","55"],"BEER1":"6","BEER2":"5","LIQUOR1":"6","LIQUOR2":"5","WINE1":"6","WINE2":"5","OTHALC1":"6","OTHALC2":"5","ALCOHOL9":"9","GRID_ALCLIFE2":{"ALCLIFE2B":"4","ALCLIFE2C":"4","ALCLIFE2D":"4","ALCLIFE2E":"4","ALCLIFE2F":"4"}}

{"D_947205597":["535003378"],"D_337810964":"648960871","D_830608495":["535003378"],"D_448968121":"353358909","D_429228540":"132232896","D_250456537":"21","D_556837046":{"D_141874857":"21"},"D_338467033":"353358909","D_447720598":["549079588","896953195","889023234","181769837"],"D_726847824":"647504893","D_481662464":"411022152","D_411088265":"647504893","D_880067330":"413495952","D_178665310":"647504893","D_242987943":"355205294","D_228752045":"647504893","D_103045461":"554549266","D_254739443":"647504893","D_633553324":{"D_164707243":"756073829","D_771426895":"756073829","D_818310825":"756073829","D_843593800":"756073829","D_175385712":"756073829"}}

The data is stored as row and column concept IDs. Not as "1" when selected.

joshid-ims commented 9 months ago

Any update?

joshid-ims commented 9 months ago

@danielruss @anthonypetersen any update?

danielruss commented 9 months ago

So use the concept id in the markup. If you are saying that your conversion tool is not converting the "1" to the appropriate concept id, you need to discuss it with the conversion team tool.

joshid-ims commented 9 months ago

Has the data storage in the backend changed? There is that 1 in equals functions not getting converted but it has worked in the past, even converted.

joshid-ims commented 9 months ago

Who knows about back end storage? Will that person be on the call today? That will help us. Kirk, from conversion team from our side will also be on the call.

joshid-ims commented 9 months ago

@danielruss @anthonypetersen @cusackjm

guinevere83 commented 9 months ago

Tested Module 4. Things looked OK unconverted, but converted questions that rely on grid responses were not displaying. These questions include:

CURWORKT3-5 CURWORKT11-13 CURSCHT3-5 CURSCHT11-13

cusackjm commented 9 months ago

@joshid-ims I don't think the backend should have changed, I did not make any DD edits for this issue

joshid-ims commented 9 months ago

Ok, I guess _sm issue will resolve this? I am not sure.

cusackjm commented 9 months ago

@boyd-mj I am also still not seeing ALCLIFE4, @danielruss could you look into this. If it is related to the converter, please loop in Kirk

danielruss commented 9 months ago

When I put Deepti's markup in the dev tool, I get a nice grid: Note: I don't have the start drinking date set because it is only 1 question.

image
cusackjm commented 9 months ago

This issue needs to be fixed first: https://github.com/episphere/questionnaire/issues/316

guinevere83 commented 8 months ago

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 8 months ago

confirmed fixed in dev testing on 1/31/2024