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

Changes new referral to new patient #355

Open
wants to merge 1 commit into
base: multiple-episodes
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions rbhl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Application(application.OpalApplication):
@classmethod
def get_menu_items(klass, user=None):
# we import here as settings must be set before this is imported
from rbhl.pathways import NewReferral, LabReferral
from rbhl.pathways import NewPatient, NewLabPatient

if user:
if user.is_authenticated:
Expand All @@ -61,9 +61,9 @@ def get_menu_items(klass, user=None):

if lab_user:
items = [
LabReferral.as_menuitem(
NewLabPatient.as_menuitem(
index=1,
display="New referral"
display="New patient"
),
menus.MenuItem(
activepattern=reverse('unresulted-list'),
Expand All @@ -81,7 +81,7 @@ def get_menu_items(klass, user=None):
)
]
else:
items = [NewReferral.as_menuitem(index=1)]
items = [NewPatient.as_menuitem(index=1)]

items.append(
menus.MenuItem(
Expand Down
16 changes: 8 additions & 8 deletions rbhl/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
from rbhl import models


class NewReferral(WizardPathway):
display_name = 'New referral'
class NewPatient(WizardPathway):
display_name = 'New patient'
icon = 'fa-plus'
slug = 'new_referral'
finish_button_text = "Create new referral"
slug = 'new_patient'
finish_button_text = "Create new patient"
finish_button_icon = None
template = "pathway/base/rbhl_add_patient_base.html"
steps = [
Expand All @@ -33,11 +33,11 @@ def save(self, *args, **kwargs):
return patient, episode


class LabReferral(WizardPathway):
display_name = 'New referral'
class NewLabPatient(WizardPathway):
display_name = 'New patient'
icon = 'fa-plus'
slug = 'new_lab_referral'
finish_button_text = "Create new referral"
slug = 'new_lab_patient'
finish_button_text = "Create new patient"
finish_button_icon = None
template = "pathway/base/rbhl_demographics_search_base.html"
steps = [
Expand Down