Skip to content

Commit

Permalink
Merge branch 'release/v24.7.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c committed Jul 10, 2024
2 parents fa8e6d2 + d83e8ea commit cbf74b0
Show file tree
Hide file tree
Showing 48 changed files with 2,782 additions and 461 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[*.py]
# isort settings
# https://github.com/timothycrosley/isort/wiki/isort-Settings
line_length=79
line_length=100
multi_line_output=3
include_trailing_comma=True
known_first_party=tests
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_script:
# test templates
.test_template: &test_definition
# track debian stable version of python3
image: python:3.7
image: python:3.9
script: tox
stage: test

Expand Down
3 changes: 1 addition & 2 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# https://pep8speaks.com/

pycodestyle:
# Default is 79 in PEP8
max-line-length: 79
max-line-length: 100

scanner:
# Errors caused by only the patch are shown, not the whole file
Expand Down
8 changes: 5 additions & 3 deletions docker/docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ services:
command: sh -c '
flask generate-site-cfg &&
nice
celery worker
celery
--app portal.celery_worker.celery
worker
--loglevel debug
'
Expand All @@ -49,9 +50,10 @@ services:
command: sh -c '
flask generate-site-cfg &&
nice -n 15
celery worker
celery
--app portal.celery_worker.celery
--queue low_priority
worker
--queues low_priority
--loglevel debug
'
Expand Down
11 changes: 7 additions & 4 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ services:
<<: *service_base
command: sh -c '
flask generate-site-cfg &&
celery worker
celery
--app portal.celery_worker.celery
worker
--loglevel debug
'
depends_on:
Expand All @@ -55,9 +56,10 @@ services:
<<: *service_base
command: sh -c '
flask generate-site-cfg &&
celery worker
celery
--app portal.celery_worker.celery
--queue low_priority
worker
--queues low_priority
--loglevel debug
'
depends_on:
Expand All @@ -68,8 +70,9 @@ services:
command: bash -c '
(wait-for-it --host=redis --port=6379 --strict -- flask set-celery-beat-healthy) &
wait-for-it --timeout=120 --host=web --port=$$PORT --strict --
celery beat
celery
--app portal.celery_worker.celery
beat
--loglevel debug
--schedule /tmp/celerybeat-schedule.db
--pidfile /tmp/celerybeat.pid
Expand Down
2 changes: 2 additions & 0 deletions portal/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class BaseConfig(object):
TOKEN_LIFE_IN_DAYS = 30 # Used for emailed URL tokens
MULTIPROCESS_LOCK_TIMEOUT = 30 # Lock on QB timeline generation

OPT_OUT_DISABLED_ORG_IDS = os.environ.get('OPT_OUT_DISABLED_ORG_IDS', [])

# Medidata integration configuration
# disable creation and editing of patients when active
PROTECTED_ORG = os.environ.get('PROTECTED_ORG') # use organization name
Expand Down
19 changes: 17 additions & 2 deletions portal/config/eproms/AppText.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,30 @@
"resourceType": "AppText"
},
{
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=faab8398-fa93-f1ca-9d81-3ddc38769d96",
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=fbef98f2-53be-316c-a671-c1ebb423ed33",
"name": "empro clinician trigger notification",
"resourceType": "AppText"
},
{
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=86b1c0ef-e3ee-e264-0190-71678d21b6a5",
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=a1f1a57c-b250-0cf5-548b-5b0284e82ae7",
"name": "empro clinician trigger notification partially opted out",
"resourceType": "AppText"
},
{
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=e875dceb-58d9-c8ce-3f44-6b95503e725a",
"name": "empro clinician trigger notification all opted out",
"resourceType": "AppText"
},
{
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=3d1ab756-fe6c-eef5-5eda-78f17ac669ee",
"name": "empro clinician trigger reminder",
"resourceType": "AppText"
},
{
"custom_text": "{config[LR_ORIGIN]}/c/portal/truenth/asset/mail?version=latest&uuid=76eff370-1b98-9387-bbfd-94ffc199ed49",
"name": "empro clinician trigger reminder partially opted out",
"resourceType": "AppText"
},
{
"custom_text": "<p>(greeting),</p><p>This email was sent to you because you are a patient at (clinic name) and consented to participate in the Prostate Cancer Outcomes - (parent org) Registry Study.</p><p>This is an invitation to use the TrueNTH website, where you will report on your health. Your participation will help us collectively improve the care that men receive during their prostate cancer journey.</p><p>To complete your first questionnaire, please first verify your account.</p><div><a class=\"btn\" href=\"{0}\">Verify your account</a></div><p>You can also access the TrueNTH website with this link:<p/><p><a href=\"{0}\">{0}</a></p><p>Save this email so that you can return to TrueNTH any time.</p><p>If you have any queries, please contact your representative at (clinic name).</p>",
"name": "profileSendEmail invite email_body",
Expand Down
8 changes: 7 additions & 1 deletion portal/config/eproms/Questionnaire.json
Original file line number Diff line number Diff line change
Expand Up @@ -8328,10 +8328,16 @@
]
},
{
"type": "date",
"type": "date",
"linkId": "ironman_ss_post_tx.2",
"text": "Date action taken"
},
{
"type": "boolean",
"linkId": "ironman_ss_post_tx.2.1",
"text": "Delayed due to local public holiday",
"required": false
},
{
"type": "choice",
"linkId": "ironman_ss_post_tx.3",
Expand Down
2 changes: 1 addition & 1 deletion portal/config/eproms/ScheduledJob.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"kwargs": null,
"name": "IRONMAN EMPRO Trigger Reminder Emails",
"resourceType": "ScheduledJob",
"schedule": "1 4,10,16,22 * * *",
"schedule": "*/5 * * * *",
"task": "process_triggers_task"
},
{
Expand Down
1 change: 1 addition & 0 deletions portal/config/eproms/site_persistence_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"CONSENT_EDIT_PERMISSIBLE_ROLES = ['staff', 'staff_admin', 'admin']\n",
"CUSTOM_PATIENT_DETAIL = True\n",
"LOCALIZED_AFFILIATE_ORG = 'TrueNTH Global Registry'\n",
"OPT_OUT_DISABLED_ORG_IDS = [14620, 14656]\n",
"ORGS_W_CUSTOM_INVITES = ['TrueNTH Global Registry', 'IRONMAN']\n",
"SHOW_WELCOME = False\n",
"HIDE_TRUENTH_ID_FIELD = True\n",
Expand Down
4 changes: 4 additions & 0 deletions portal/eproms/templates/eproms/assessment_engine.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@
<div class="error error-message"></div>
</div>
{% endif %}
{%- from "eproms/assessment_engine/ae_macros.html" import empro_thankyou_modal, empro_optout_modal -%}
{{empro_optout_modal(user)}}
{{empro_thankyou_modal(user)}}

Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
<section class="portal-main portal-flex-container">
{%- block body -%}{%- endblock -%}
</section>
<div class="loading-container hide"><div class="content"><i class="fa fa-spinner fa-spin fa-2x"></i>{{_("Loading")}} ...</div></div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- from "eproms/assessment_engine/ae_macros.html" import render_header, render_greeting, render_card_content, render_call_to_button, due_card, completed_card, empro_due, empro_completed, empro_expired, completed_cards -%}
{%- from "eproms/assessment_engine/ae_macros.html" import render_header, render_greeting, render_card_content, render_call_to_button, due_card, completed_card, empro_due, empro_completed, empro_expired, completed_cards -%}
{% extends "eproms/assessment_engine/ae_base.html" %}
<!-- baseline due -->
{% block head %}
Expand Down
79 changes: 74 additions & 5 deletions portal/eproms/templates/eproms/assessment_engine/ae_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ <h2 class="section-title">{{_("Completed Questionnaires")}}</h2>
{% endif %}
</div>
{%- endcall -%}
{% if substudy_assessment_status.overall_status == OverallStatus.completed %}
{{empro_thankyou_modal(user)}}
{% endif %}
{%- endif -%}
{%- endmacro -%}
{%- macro empro_thankyou_card(full_name="") -%}
Expand All @@ -227,13 +224,19 @@ <h4>{{_("Your Support Team")}}</h4>

</div>
{%- endmacro -%}
{%- macro empro_no_contact_notice() -%}
<div class="no-contact-list-wrapper hide">
<b>Note:</b> You have chosen not to be contacted about <span id="noContactTriggerList"></span>. Your care team will not discuss these issues this month.
</div>
{%- endmacro -%}
{%- macro empro_modal_hardTrigger_supportTeam_block(organization="") -%}
<div class="item">
<h4>{{_("Your Support Team")}}</h4>
<p>{{_("You reported experiencing or feeling:")}}</p>
<ul class="hardTriggersDisplayList">
<!-- dynamically populated based on user trigger domain(s) -->
</ul>
{{empro_no_contact_notice()}}
<p><b>{{_("To help address any issues, we've informed your care team and they'll be in contact with you soon.")}}</b></p>
{% if organization %}
<p>{{_("In the meantime, if you have any questions or need assistance, please contact your team at %(organization)s directly. They're happy to help.", organization=organization)}}</p>
Expand Down Expand Up @@ -270,8 +273,8 @@ <h4>{{_("Your Health Tips")}}</h4>
<!--sub-study macro -->
{%- macro empro_thankyou_modal(user) -%}
<!-- sub-study modal for display domain topic(s), resources link and summary report link to the user -->
<div class="modal fade" tabindex="-1" role="dialog" id="emproModal" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog">
<div class="modal fade" role="dialog" id="emproModal" tabindex="-1" aria-hidden="true" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog modal-xl">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="{{_('Close')}}">
<span aria-hidden="true">&times;</span>
Expand Down Expand Up @@ -311,6 +314,72 @@ <h2 class="title">
</div>
{{empro_script()}}
{%- endmacro -%}
<!--sub-study optout modal macro -->
{%- macro empro_optout_modal(user) -%}
<!-- sub-study modal for display domain topic(s), resources link and summary report link to the user -->
<div class="modal fade" role="dialog" id="emproOptOutModal" data-backdrop="static" tabindex="-1" aria-hidden="true" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog modal-lg">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="{{_('Close')}}">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-body">
<div class="header-section">
<h2 class="title">{{_("We want to check with you ...")}}</h2>
<div class="subtitle" style="margin-bottom: 8px">
{{_("About your preference to be contacted by your care team for these ongoing issues.")}}
</div>
</div>
<!-- <div class="items-section">
<div class="item wrap">
<ul>
<li>anxious</li>
<li>discouraged</li>
<li>fatigue</li>
</ul>
</div>
</div> -->
<p>{{_("We’ve noticed you’re continuing to experience challenges with the issues listed below.")}}</p>
<p class="text-warning">
<b>{{_("If you prefer not to be contacted by your care team for any (or all) of these issues, please check the box(es) below.")}}</b>
</p>
<p>
{{_("Your care team will continue to contact you as usual for other identified issues.")}}<br/>
{{_("If you have any questions or need assistance, please contact your team directly at %(organization)s. They'll be happy to help.", organization=user.organizations[0].name if user else "")}}
</p>
<div class="items-wrapper">
<p><b>{{_("Please do not contact me about:")}}</b></p>
<div class="items optout-domains-checkbox-list">
<!--
<div class="item">
<input type="checkbox">
<span>anxious</span>
</div>
<div class="item">
<input type="checkbox">
<span>discouraged</span>
</div>
-->
</div>
</div>
<div class="error-message"></div>
<div class="continue-container hide">
<button class="btn btn-default continue-button">Continue</button>
</div>
</div>
<div class="modal-footer">
<div>
<button class="btn btn-empro-primary btn-submit btn-large">Submit</button>
<!-- uncomment if want Dismiss button back -->
<!-- <button class="btn btn-default btn-dismiss">Dismiss</button> -->
</div>
<div class="saving-indicator-container hide"><i class="fa fa-spinner fa-spin"></i> {{_("Saving your choices...")}}</div>
<div class="save-success-indicator-container text-success hide"><i class="fa fa-check"></i> {{_("Your choices are saved successfully.")}}</div>
</div>
</div>
</div>
</div>
{%- endmacro -%}
{%- macro empro_script() -%}
<script src="{{ url_for('static', filename='js/dist/empro.bundle.js') }}" defer></script>
{%- endmacro -%}
Loading

0 comments on commit cbf74b0

Please sign in to comment.