Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TN-3250, incorrect type in check for withdrawn from study #4338

Merged
merged 7 commits into from
Oct 4, 2023

Conversation

pbugni
Copy link
Collaborator

@pbugni pbugni commented Sep 14, 2023

The view used to determine which questionnaires (assessments) a given patient needs to submit, was incorrectly comparing an OverallStatus instance with the string Withdrawn. Thus, patients withdrawn from a given study would incorrectly be administered assessments.

Extending this hotfix to include exclusion of questionnaire responses after withdrawn visits - actually now excluding ALL questionnaire responses that aren't associated with a valid questionnaire bank (i.e. a visit).

@mcjustin
Copy link
Member

The view used to determine which questionnaires (assessments) a given patient needs to submit, was incorrectly comparing an OverallStatus instance with the string Withdrawn. Thus, patients withdrawn from a given study would incorrectly be administered assessments if any had been left in-progress.

@pbugni that might explain the first QR that patient 5596 completed post-withdrawal (#65241), but it doesn't seem to explain what happened with their QR 72971 completed 2023-07-06, many months after their withdrawal in Oct '22.
https://movember.atlassian.net/browse/TN-3250?focusedCommentId=246743

@pbugni
Copy link
Collaborator Author

pbugni commented Sep 14, 2023

@mcjustin sorry for the confusion in my initial comment, the in-progress scenario is not the only one that would incorrectly have been given the chance, I had just watched that scenario in the debugger. The check was in general, for a user being withdrawn from a study.

@pbugni pbugni changed the base branch from master to develop October 4, 2023 22:42
pbugni and others added 7 commits October 4, 2023 15:44
…ad link (#4339)

Address story:
[TN-3259](https://movember.atlassian.net/browse/TN-3259?atlOrigin=eyJpIjoiM2Q1MzQ2ZjE0YzY1NDBjMDk0OTM2OWMxMWMzMTc3ODAiLCJwIjoiamlyYS1zbGFjay1pbnQifQ)
See also Slack convo
[here](https://cirg.slack.com/archives/C5EU4L7PF/p1694733386101599)
Changes include:
- Whenever an data export is initiated on the UI, the frontend will
cache the celery task URL associated with the export
- Address the scenario where the export is left running in the
background, e.g. as when user switches to a different browser tab - when
data export window receives focus again, e.g. as when the user comes
back from a different browser tab, the frontend will now check if the
download has finished by calling the celery task URL cached from the
previous step and update the download link on UI if it has finished
successfully.
- other change - enhance error checking

---------

Co-authored-by: Amy Chen <clone@cesium.cirg.washington.edu>
https://movember.atlassian.net/browse/TN-3250
frontend changes - accounting for when EMPRO questionnaire has expired.
**Note** - the frontend now will display the link to the EMPRO report if
it detects that the user had completed EMPRO previously.
Example screenshot (user completed at least one EMPRO questionnaire
previously):

![emproCompleted](https://github.com/uwcirg/truenth-portal/assets/12942714/ac1af33b-efa4-4e68-b931-cd585501e6d4)

---------

Co-authored-by: Amy Chen <clone@cesium.cirg.washington.edu>
Co-authored-by: Paul Bugni <pbugni@u.washington.edu>
@pbugni pbugni force-pushed the hotfix/correct-type-in-withdrawn-from-study-check branch from 6efa32a to 0873ad8 Compare October 4, 2023 22:44
@pbugni
Copy link
Collaborator Author

pbugni commented Oct 4, 2023

i'd like to rename the branch (from hotfix/x to feature/x) as we're not releasing as hotfix, but that would mean closing out this PR and losing the history, so, we'll live with it.

@pbugni pbugni merged commit 08e6910 into develop Oct 4, 2023
3 checks passed
@pbugni pbugni deleted the hotfix/correct-type-in-withdrawn-from-study-check branch October 4, 2023 23:21
achen2401 added a commit that referenced this pull request Nov 1, 2023
address Error stack:
```
File \"/opt/venvs/portal/lib/python3.9/site-packages/portal/eproms/templates/eproms/assessment_engine/ae_complete.html\", line 42, in block \"body\"\n    {{empro_expired(\njinja2.exceptions.UndefinedError: 'empro_expired' is undefined\n"
```
stemming from `empro_expired` template macro not included in the
`include` statement

The scenario that will likely hits this 500 error is when a subject has
completed the main study questionnaire but the EMPRO questionnaire has
expired.

bug from [front end changes
here](#4338)

Co-authored-by: Ivan Cvitkovic <ivanc@uw.edu>
Co-authored-by: Paul Bugni <pbugni@u.washington.edu>
Co-authored-by: Amy Chen <clone@cesium.cirg.washington.edu>
@ivan-c ivan-c mentioned this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants