Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
pbugni committed Oct 9, 2024
1 parent 907ade4 commit 2e187c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions portal/models/patient_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def patient_list_update_patient(patient_id, research_study_id=None):
if (research_study_id == EMPRO_RS_ID or research_study_id is None) and user.clinicians:
rs_id = EMPRO_RS_ID
patient.clinician = '; '.join(
(clinician_name_map().get(c.id, "not in map") for c in
user.clinicians)) or ""
(clinician_name_map().get(c.id, "not in map") for c in user.clinicians)) or ""
qb_status = qb_status_visit_name(
patient.userid, research_study_id=rs_id, as_of_date=now)
patient.empro_status = str(qb_status['status'])
Expand Down
11 changes: 6 additions & 5 deletions portal/views/patients.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def preference_filter(user, research_study_id, arg_filter):
if pref and pref.filters:
# return all but orgs and column selections
return {
k:v for k,v in pref.filters.items()
k: v for k, v in pref.filters.items()
if k not in ['orgs_filter_control', 'column_selections']}


Expand All @@ -98,7 +98,7 @@ def preference_sort(user, research_study_id, arg_sort, arg_order):
pref = users_table_pref_from_research_study_id(
user=user, research_study_id=research_study_id)
if not pref:
return "userid", "asc" # reasonable defaults
return "userid", "asc" # reasonable defaults
return pref.sort_field, pref.sort_order


Expand Down Expand Up @@ -178,9 +178,10 @@ def requested_orgs(user, research_study_id):
PatientList.action_state)
options.append({"action_state": [(state[0], _(state[0])) for state in distinct_action]})
else:
distinct_status = PatientList.query.distinct(PatientList.questionnaire_status).with_entities(
PatientList.questionnaire_status)
options.append({"questionnaire_status": [(status[0], _(status[0])) for status in distinct_status]})
distinct_status = PatientList.query.distinct(
PatientList.questionnaire_status).with_entities(PatientList.questionnaire_status)
options.append(
{"questionnaire_status": [(status[0], _(status[0])) for status in distinct_status]})

viewable_orgs = requested_orgs(user, research_study_id)
query = PatientList.query.filter(PatientList.org_id.in_(viewable_orgs))
Expand Down

0 comments on commit 2e187c3

Please sign in to comment.