Skip to content

Commit

Permalink
must use translate_visit_name as the lookup fails when including th…
Browse files Browse the repository at this point in the history
…e month number.
  • Loading branch information
pbugni committed Nov 20, 2024
1 parent b78a4ec commit c58ed38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portal/views/patients.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ def requested_orgs(user, research_study_id):
options.append({"action_state": [(state[0], _(state[0])) for state in distinct_action]})
distinct_visits = PatientList.query.distinct(PatientList.empro_visit).with_entities(
PatientList.empro_visit)
options.append({"empro_visit": [(visit[0], _(visit[0])) for visit in distinct_visits]})
options.append({"empro_visit": [(visit[0], translate_visit_name(visit[0])) for visit in distinct_visits]})
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_visits = PatientList.query.distinct(PatientList.visit).with_entities(
PatientList.visit)
options.append({"visit": [(visit[0], _(visit[0])) for visit in distinct_visits]})
options.append({"visit": [(visit[0], translate_visit_name(visit[0])) for visit in distinct_visits]})

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

0 comments on commit c58ed38

Please sign in to comment.