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

IRONN-225 EMPRO month 12 expired vs. not available #4354

Merged
merged 12 commits into from
Jan 5, 2024

Conversation

pbugni
Copy link
Collaborator

@pbugni pbugni commented Dec 12, 2023

fix for https://movember.atlassian.net/browse/IRONN-225

EMPRO qb_status expired status is ambiguous - can mean "not yet available" or "expired". Added comparison with consent to correct in adherence report.

…expired". Added comparison with consent to correct.
@pbugni pbugni requested a review from mcjustin December 12, 2023 00:52
@pbugni
Copy link
Collaborator Author

pbugni commented Dec 12, 2023

Realizing we'll need a migration to catch cached adherence data for the affected patients.

@pep8speaks
Copy link

pep8speaks commented Dec 12, 2023

Hello @pbugni! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 63:1: W391 blank line at end of file

Line 163:80: E501 line too long (80 > 79 characters)
Line 166:80: E501 line too long (82 > 79 characters)

Comment last updated at 2024-01-04 00:43:04 UTC

# due to complex business rules around start or walked off
# the end. Assume if consent + 1year > now, it's the former.
consent = datetime.strptime(row["consent"], "%d-%b-%Y %H:%M:%S")
if consent + timedelta(days=365) > as_of_date:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per https://promowiki.movember.com/pages/viewpage.action?pageId=72941826#SequencingofPROMs-EMPROQUESTIONNAIRE , the actual 12 month expiration date can be significantly later than this.

  1. "If the subject consents to the IRONMAN and EMPRO studies on the same day: the EMPRO questionnaire is made available for four weeks from the date the subject completes their baseline IRONMAN questionnaire". So, this cutoff date can be up to 4 weeks too early in this situation.
  2. "If the subject consents to the EMPRO study after consenting to the IRONMAN study... (and) If the subject consents to the EMPRO study more than four weeks after completing an IRONMAN questionnaire: The EMPRO questionnaires are made available for four weeks from the date the subject completes their next IRONMAN questionnaire" - this may be even longer than four weeks later, as I read it.

Am I reading this correctly? Would we report "Expired" to soon in these situations?

If so, can we look to the timeline for a more accurate date here? If not, we'll need to explain to PCCTC how to interpret this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, yes, you are correct. i'll need to work that in, thanks for remembering this detail @mcjustin

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also of note, found in testing scenarios where row["consent"] == None need to account for this as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I read it, you've addressed this - thanks

…oesn't take that long to update, good to catch any problems with a re-calc on a more regular basis.
…nts.

enables quick, small batch runs, and use from /timeline

corrected an old bug in view lookup due to scope problem.
obtain adherence data if not already in cache on /timeline request
…et available didn't consider delayed start timing.

use the user's timeline, only consider it expired if 12th month visit expiration has passed.
@pbugni pbugni requested a review from mcjustin January 4, 2024 00:52
@pbugni
Copy link
Collaborator Author

pbugni commented Jan 4, 2024

@mcjustin I just requested a fresh review after fixing the issue you found above. testing revealed other details i resolved as well.

anything less than a day old, and expect them to still be in the cache.
@pbugni pbugni merged commit 53da9f3 into develop Jan 5, 2024
2 checks passed
@pbugni pbugni deleted the feature/empro-expired-vs-not_yet_avail branch January 5, 2024 02:35
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.

3 participants