episphere / questionnaire

1 stars 2 forks source link

CHILDCANC3X display is not working #305

Closed cusackjm closed 8 months ago

cusackjm commented 10 months ago

Not sure if this is a Quest, markdown, or Quest/markdown issue

Testing Module 1/Stage/Chrome/PC

If I click on just the textbox in CHILDCANC3 [D_812370563?]= 55 [807835037 Another type of cancer] and enter "TEETH" in the textbox [933110091], I do not see CHILDCANC3X [D_278159347?]. If I click outside of the textbox in CHILDCANC3 [D_812370563?]= 55 [807835037 Another type of cancer] and enter "TEETH" in the textbox [933110091], I do see CHILDCANC3X [D_278159347?].

@danielruss is this a Quest issue that was fixed but lost after yesterday's revert back to old Quest code? See: https://github.com/episphere/quest/issues/423 & https://github.com/episphere/questionnaire/issues/242 @boyd-mj could we avoid this issue by changing the display logic for CHILDCANC3X [D_278159347?], so that it's displayed if [D_278159347?,displayif=equals(D_812370563,807835037)] or [933110091] has text? (idk if that's possible to code or even useful to do).

This also occurred for Sibling section

joshid-ims commented 10 months ago

@cusackjm can you please mention question ID instead of concept ID here:

could we avoid this issue by changing the display logic for CHILDCANC3X [D_278159347?], so that it's displayed if [D_278159347?,displayif=equals(D_812370563,807835037)] or [933110091] has text? (idk if that's possible to code or even useful to do).

cusackjm commented 10 months ago

could we avoid this issue by changing the display logic for CHILDCANC3X, so that it's displayed if: CHILDCANC3= Another type of cancer: Please describe or Please describe |__| textbox, has text entered image

Right now the logic is based off of just the radio button being selected, not the textbox entry, and the radio button is not saving as selected if the participant clicks/taps just the textbox

joshid-ims commented 10 months ago

Yes, I guess we can do that. Will make the change and test.

joshid-ims commented 10 months ago

The new logic is working for us. Should we keep it or wait for Quest changes to be pushed to Prod to see if that was the issue?

cusackjm commented 10 months ago

@joshid-ims wait for now, I want to see what Tony says about the other issue being quest related. I'll update you when I hear from him

joshid-ims commented 10 months ago

Thanks!

boyd-mj commented 9 months ago

@cusackjm any updates on this? I believe this is our only outstanding issue for Module 1.

cusackjm commented 9 months ago

@boyd-mj I am meeting with DevOps today to review testing new quest features

cusackjm commented 9 months ago

@danielruss we think this is an issue with Quest. If I select the textbox, enter text, I do not see CHILDCANC3X or the summary. If I select the response (outside of the textbox), enter text, I do see CHILDCANC3X and the summary. Can you take a look at this? IMS can program around this issue, but I am also concerned that the data is not saving and there are also many other 55 Other [textbox] responses throughout the modules

danielruss commented 9 months ago

looking into it..

danielruss commented 9 months ago

@cusackjm I ran through module one and my 14-year old daughter had hair cancer. Notice how D_812370563_1_1 has two values:

1) D_812370563_1_1: which is an array containing one value: 807835037, which is the code for "Another type of cancer". Had my daughter had a second type of cancer, it would be in the array. BTW, don't worry about my daughter, she went to the stylist and her hair cancer is in complete remission.

2) D_933110091: which is the input to the type of cancer entered by the user.

If this is the problem, I don't think this is a quest issue.

image
cusackjm commented 9 months ago

@danielruss could it be PWA? I believe IMS is testing the same renderer, so they would not be able to see it either

Not sure if this is helpful: image

danielruss commented 9 months ago

@cusackjm The "duplicate ID error" is because the age of cancer onset has the same ID for all forms of cancer. The year of cancer onset also has the same id for all cancers. I told you guys not to do it. Not sure about the next error. It is actually wrong. From w3schools:

The for attribute of

From the W3C standard:

The for attribute may be specified to indicate a form control with which the caption is to be associated. If the attribute is specified, the attribute's value must be the ID of a labelable form-associated element in the same Document as the label element.

I am concerned about the 'response was block by CORB'. Not sure what's up with that.

cusackjm commented 8 months ago

@danielruss by "The "duplicate ID error" is because the age of cancer onset has the same ID for all forms of cancer. The year of cancer onset also has the same id for all cancers. I told you guys not to do it. Not sure about the next error. It is actually wrong., do you mean that Age at diagnosis (CID: 206625031) and Year at diagnosis (CID: 261863326) should not be harmonized? Otherwise I am not following

danielruss commented 8 months ago

The way HTML was designed, all elements (html tags like <p> and <br>) should have unique ids (or no ids). We chose to use concept id's as the ID for the question because that is the questionnaires look on paper

[QUESTNM] This is a question is what the word doc looks like and is transformed to <form id='QUESTNM>' The responses also do this map |__|id=CONCEPT_ID to <input type="text" id='CONCEPT_ID' This is nice because you can get the results simpler. When you harmonize the Concept ID's, there are 20ish elements with the same id.

How should we go forward. I think the element ID should not be the concept id. The id should be auto generated, and the id should be in html data element. This would be a major rewrite, think blow out and redo. Also, we want backwards compatibility. Edge is right to complain, but it's more of a warning and continues to display correctly. Since nothing is "broken", let's not fix it yet.

I should not have said I told you not to do it. I was not being fair tossing the blame on your team. When we rewrite the renderer, we can discuss fixing this too.

cusackjm commented 8 months ago

Would we have to unharmonize them in all of the modules? Just double checked in the DD and Year of Dx is used 146 times across modules

danielruss commented 8 months ago

I don't think you need to do it. I think it is safe to ignore that error.

cusackjm commented 8 months ago

Is there any way to fix the issue? Otherwise we will not collect Age/year of Dx for children with "other type" of cancer, if the participant clicks inside textbox

danielruss commented 8 months ago

I think this is a coding issue. The version in development (in the private repo) is not the same as the production version. So I am going to comment on the production version.

Starting with [D_812370563?] Which type(s) of <b>cancer</b>? Select all that apply. This question is fine, but the follow up questions all have unnecessary displayif's.

[D_900939817?,displayif=equals(D_812370563,939782495)] How old was |displayif=equals(isNotDefined(D_714001034,false),false)|{$D_714001034}||displayif=doesNotEqual(isNotDefined(D_714001034,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had <b>anal cancer</b>?<br/> |__|__|__|__|xor=CHILDCANC3A id=D_206625031 min=0 max=valueOrDefault("D_299300933","D_182786508",125)| Age at diagnosis

This is NOT needed. The same is true for all the others selections. Whereas this is not a problem for most of these, when you hit the last question you DO have a problem, which is why you don't see the follow-up question for only this case.

[D_845219872?,displayif=equals(D_812370563,178420302)] How old was |displayif=equals(isNotDefined(D_714001034,false),false)|{$D_714001034}||displayif=doesNotEqual(isNotDefined(D_714001034,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had <b>cancer</b>?<br/>
|__|__|__|__|xor=CHILDCANC3Y id=D_206625031 min=0 max=valueOrDefault("D_299300933","D_182786508",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here:<br/> 
|__|__|__|__| xor=CHILDCANC3Y id=D_261863326 minval=difference(difference(#currentYear,isDefined(D_299300933,isDefined(D_182786508,125))),1) max=#currentYear| Year of diagnosis

You are use the old functions to check if D_812370563 equals 178420302. The old functions check if the value is an array, and if the value is an array, it checks if the array CONTAINS the "178420302". In this question the value is an OBJECT

{
   D_812370563: [178420302]
   D_933110091 : "Hair and Nail"
}

So the unnecessary displayif is causing an error. If you REFUSE to get rid of the displayif, you should use displayif=someSelected("D_812370563_807835037"). The someSelected functions takes one or more Id's and check if the any of the ids are selected. So someSelected("D_812370563_807835037","D_812370563_723614811") would check if either uterine or other cancer was selected. These id's are for the RADIO buttons/CHECKBOXES not for the labels.

  [D_845219872?,displayif=someSelected("D_812370563_807835037")] How old was |displayif=equals(isNotDefined(D_714001034,false),false)|{$D_714001034}||displayif=doesNotEqual(isNotDefined(D_714001034,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had <b>cancer</b>?<br/>
|__|__|__|__|xor=CHILDCANC3Y id=D_206625031 min=0 max=valueOrDefault("D_299300933","D_182786508",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here:<br/> 
|__|__|__|__| xor=CHILDCANC3Y id=D_261863326 minval=difference(difference(#currentYear,isDefined(D_299300933,isDefined(D_182786508,125))),1) max=#currentYear| Year of diagnosis

There may be other issues. I will continue to look.

There is another issue. Tracking it down now.

danielruss commented 8 months ago

BUG FOUND AND FIXED. When the user only clicked in the text box and not anywhere else, the 'clicked' radio button was never placed in the results.

joshid-ims commented 8 months ago

@danielruss Do I still need to remove those displayifs?

danielruss commented 8 months ago

You can 1) remove them all 2) remove the last 3) fix the last

Only test in dev. Stage and Prod don't point the latest version and I have not made a release.

joshid-ims commented 8 months ago

We use https://episphere.github.io/quest/. Not sure it is dev or prod.

danielruss commented 8 months ago

if you use that or https://episphere.github.io/connectApp you are using the dev version

joshid-ims commented 8 months ago

Should I remove the last one means from 3Y question (in bold)?

[CHILDCANC3X?,displayif=valueIsOneOf("CHILDCANC2",55) or valueLength("CHILDCANC2_TB")>0] How old was |displayif=equals(isNotDefined(CHILDNAME,false),false)|{$CHILDNAME}||displayif=doesNotEqual(isNotDefined(CHILDNAME,false),false)|your child| when they were first told by a doctor or other health professional that they have or had |displayif=valueLength("CHILDCANC2_TB")>0|{$CHILDCANC2_TB}||displayif=doesNotExist("CHILDCANC2_TB")|another type of cancer|?
|||||xor=CHILDCANC3X id=CHILDCANC3X_AGE min=0 max=valueOrDefault("CHILDAGE_AGE","CHILDDEATH_NUM",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here:
||||| xor=CHILDCANC3X id=CHILDCANC3X_YEAR min=1800 max=#currentYear| Year of diagnosis

[CHILDCANC3Y?,displayif=equals(CHILDCANC2,77)] How old was |displayif=equals(isNotDefined(CHILDNAME,false),false)|{$CHILDNAME}||displayif=doesNotEqual(isNotDefined(CHILDNAME,false),false)|your child| when they were first told by a doctor or other health professional that they have or had cancer?
|||||xor=CHILDCANC3Y id=CHILDCANC3Y_AGE min=0 max=valueOrDefault("CHILDAGE_AGE","CHILDDEATH_NUM",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here:
||||| xor=CHILDCANC3Y id=CHILDCANC3Y_YEAR min=1800 max=#currentYear| Year of diagnosis

danielruss commented 8 months ago

Sorry, CHILDCANC3X not CHILDCANC3Y. You could also remove CHILDCANC3Y but CHILDCANC3X must go

joshid-ims commented 8 months ago

@danielruss I made changes as below and now these questions are showing irrespective of the selection made. Maybe I misunderstood what you suggested.

[CHILDCANC3W?,displayif=equals(CHILDCANC2,22)] How old was |displayif=equals(isNotDefined(CHILDNAME,false),false)|{$CHILDNAME}||displayif=doesNotEqual(isNotDefined(CHILDNAME,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had <b>uterine cancer</b>?<br/>
|__|__|__|__|xor=CHILDCANC3W id=CHILDCANC3W_AGE min=0 max=valueOrDefault("CHILDAGE_AGE","CHILDDEATH_NUM",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here: <br/> 
|__|__|__|__| xor=CHILDCANC3W id=CHILDCANC3W_YEAR min=1800 max=#currentYear| Year of diagnosis

[CHILDCANC3X?] How old was |displayif=equals(isNotDefined(CHILDNAME,false),false)|{$CHILDNAME}||displayif=doesNotEqual(isNotDefined(CHILDNAME,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had |displayif=valueLength("CHILDCANC2_TB")>0|<b>{$CHILDCANC2_TB}</b>||displayif=doesNotExist("CHILDCANC2_TB")|<b>another type of cancer</b>|?<br/>
|__|__|__|__|xor=CHILDCANC3X id=CHILDCANC3X_AGE min=0 max=valueOrDefault("CHILDAGE_AGE","CHILDDEATH_NUM",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here: <br/>
|__|__|__|__| xor=CHILDCANC3X id=CHILDCANC3X_YEAR min=1800 max=#currentYear| Year of diagnosis

[CHILDCANC3Y?] How old was |displayif=equals(isNotDefined(CHILDNAME,false),false)|{$CHILDNAME}||displayif=doesNotEqual(isNotDefined(CHILDNAME,false),false)|your child| when they were <b>first</b> told by a doctor or other health professional that they have or had <b>cancer</b>?<br/>
|__|__|__|__|xor=CHILDCANC3Y id=CHILDCANC3Y_AGE min=0 max=valueOrDefault("CHILDAGE_AGE","CHILDDEATH_NUM",125)| Age at diagnosis

Or, if it is easier to remember the year, enter that here:<br/> 
|__|__|__|__| xor=CHILDCANC3Y id=CHILDCANC3Y_YEAR min=1800 max=#currentYear| Year of diagnosis
danielruss commented 8 months ago

are your edits in github?

danielruss commented 8 months ago

The version in github looks good to me (LGTM)? If I select uterine cancer, I dont see the "OTHER" type of cancer. If I select "OTHER" and uterine they both appear in the summary. -- LGTM

guinevere83 commented 8 months ago

Here's what I'm seeing when I do that:

image

joshid-ims commented 8 months ago

Let me check MOM and DAD sections

cusackjm commented 8 months ago

confirmed fixed in dev testing on 1/11/2024 in chrome/laptop