episphere / quest

experimenting with the idea of a questionnaire markup
https://episphere.github.io/quest/
2 stars 11 forks source link

Possible enhancements in Quest #377

Closed joshid-ims closed 2 years ago

joshid-ims commented 2 years ago

This issue being created as a place holder so that we do not lose it and also because NCI developers are currently working on the next version.

  1. ~Or and AND functions – can have multiple arguments, not just two? E.g. Summaries have long ANDs and CURWORKT3 have long OR~
  2. ~IsDefined – misleading. Returns value of whichever variable is defined and not 0 or 1. So when checking for one ID/value, we need to add some random value for comparison.~
  3. Piping ‘Other’ value in grids and displayif in grids
  4. ~noneExist does not work with And function. Eg. Missing addresses summaries I think Daniel already said this can be done. I sent him an example of the code for this.~
  5. Drop downs for Months and years
  6. Using grids inside loops.
  7. Mathematical functions like multiplication and division. I think it is required for Biospecimen questionnaire.
  8. ~Also required for Biospecimen questionnaire is #currentMonth function (in numbers from 1 to 12 rather than in text like Jan, Feb, etc.).~

1, #2, and #4 are already resolved/implemented as new functions/fixed.

We would also like to see better documentation of functions in Wiki. Most are listed there but we are not sure if that list in Wiki is all that is availbale to be used. We also need descriptions of some functions and examples of the syntax. Also, if we can see the restrictions on them listed in Wiki as well. Like older functions like AND, OR cannot be used with noneExist, where spaces are not allowed, etc.

We will add to this list as we come across more of such issues.

boyd-mj commented 2 years ago

Thanks!


From: joshid-ims @.> Sent: Thursday, February 10, 2022 4:19:19 PM To: episphere/quest @.> Cc: Boyd-Morin, Jennifer (IMS) @.>; Assign @.> Subject: [episphere/quest] Possible enhancements in Quest (Issue #377)

This issue being created as a place holder so that we do not lose it and also because NCI developers are currently working on the next version.

  1. Or and AND functions – can have multiple arguments, not just two? E.g. Summaries have long ANDs and CURWORKT3 have long OR
  2. IsDefined – misleading. Returns value of whichever variable is defined and not 0 or 1. So when checking for one ID/value, we need to add some random value for comparison.
  3. Piping ‘Other’ value in grids and displayif in grids
  4. noneExist does not work with And function. Eg. Missing addresses summaries – I think Daniel already said this can be done. I sent him an example of the code for this.
  5. Drop downs for Months and years
  6. Using grids inside loops.
  7. Mathematical functions like multiplication and division. I think it is required for Biospecimen questionnaire.
  8. Also required for Biospecimen questionnaire is #currentMonth function (in numbers from 1 to 12 rather than in text like Jan, Feb, etc.).

1https://github.com/episphere/quest/pull/1, #2https://github.com/episphere/quest/issues/2, and #4https://github.com/episphere/quest/pull/4 are already resolved/implemented as new functions/fixed.

We would also like to see better documentation of functions in Wiki. Most are listed there but we are not sure if that list in Wiki is all that is availbale to be used. We also need descriptions of some functions and examples of the syntax. Also, if we can see the restrictions on them listed in Wiki as well. Like older functions like AND, OR cannot be used with noneExist, where spaces are not allowed, etc.

We will add to this list as we come across more of such issues.

— Reply to this email directly, view it on GitHubhttps://github.com/episphere/quest/issues/377, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATJL76WXH45LGIZACY74BM3U2QTVPANCNFSM5OCCSBYQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were assigned.Message ID: @.***>


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.

joshid-ims commented 2 years ago

Daniel, Pete is waiting for multiplication and #currentMonth functions as they are needed to code the Biospecimen questionnaire. He cannot finish coding that without these new functions unless you have any workaround/alternative to them.

danielruss commented 2 years ago

@joshid-ims Please create an issue for #currentMonth. 1 request .. 1 issue.

joshid-ims commented 2 years ago

Created new issue #378 .

danielruss commented 2 years ago
  1. Mathematical functions like multiplication and division. I think it is required for Biospecimen questionnaire.
    We use math.js, so multiplication and division are supported. Can you give an example of what you want?
danielruss commented 2 years ago
  1. Piping ‘Other’ value in grids and displayif in grids

Not sure what you mean. If you are talking about the having multiple items labeled other, we warned you against doing it. Nicole and i will have to discuss this. Otherwise, let me know what you mean.

danielruss commented 2 years ago
  1. Drop downs for Months and years There are accessibility issues with drop down menus. We don't support it.

  2. Using grids inside loops. -- This is a very reasonable request that I have been ignoring because it is difficult. I guess it's time to look into this. Is there an issue open?

joshid-ims commented 2 years ago

For Other value in grid, here is the example:

grid? id="grid_PREWORKT2" Typical WORKDAY [ [PREWORKT2A,displayif=equals(PREWORKT1,0)] Car, van, or truck (includes carpools or van pools); [PREWORKT2B,displayif=equals(PREWORKT1,1)] Taxicab (includes, Uber, Lyft, or hired car); [PREWORKT2C,displayif=equals(PREWORKT1,2)] Motorcycle; [PREWORKT2D,displayif=equals(PREWORKT1,3)] Bus or streetcar/trolley, light rail/trolley; [PREWORKT2E,displayif=equals(PREWORKT1,4)] Commuter rail, subway, metro; [PREWORKT2F,displayif=equals(PREWORKT1,5)] Bicycle; [PREWORKT2G,displayif=equals(PREWORKT1,6)] Walking; [PREWORKT2H,displayif=equals(PREWORKT1,55)] Other;] //This should show the text typed in for Other but that is not currently supported

that text is like: [55] Other: Please describe |__|id=PREWORKT1_OTH|

joshid-ims commented 2 years ago

For mathematical functions:

The question involved is #43 (see below) in the biospecimen questionnaire. For the text box # months, Julie wants the max to be the # months between the Month/Year from response to #18 (When was the 1st time that you had COVID-19) to current Month/Year.

[SrvBlU_COV22v1r0] How long did it take you to recover to your usual state of health from the date you first realized you had COVID-19? months days

We were thinking of calculating the number of months in between using formula {(year1-year2)X12} + (month1-month2).

Please let us know if there is a better way to implement this.

boyd-mj commented 2 years ago
  1. Piping ‘Other’ value in grids and displayif in grids

Not sure what you mean. If you are talking about the having multiple items labeled other, we warned you against doing it. Nicole and i will have to discuss this. Otherwise, let me know what you mean.

@danielruss just to clarify, Nicole asked us to create this issue as a placeholder with the list of items for possible Quest enhancements that Deepti had emailed to you a while back after we had a group call. So the intention was to make sure we had an issue with a record of them to revisit as time allows.

The issue(s) that Deepti brought up regarding the Biospecimen questionnaire are more time sensitive and belong in a separate issue, which it looks like she has created now.

@joshid-ims let's keep this issue as the placeholder for the older items in that single email. For anything new, please create a new issue moving forward.

Thanks!