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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions portal/models/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,14 @@ def empro_row_detail(row, ts_reporting):
# build up data until we find valid cache for patient's history
status = str(qb_stats.overall_status)
row = patient_data(patient)
row["status"] = status
if status == "Expired" and research_study_id == EMPRO_RS_ID:
row["status"] = "Not Yet Available"
else:
row["status"] = status
mcjustin marked this conversation as resolved.
Show resolved Hide resolved
# Expired status ambiguous for EMPRO - either not available
# 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

row["status"] = "Not Yet Available"

if last_viable:
general_row_detail(row, patient, last_viable)
Expand Down