Skip to content
Merged
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
2 changes: 1 addition & 1 deletion app/views/sessions/edit/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
row.with_action(text: "Change", href: register_attendance_session_edit_path(@session), visually_hidden_text: "register attendance")
end

if Flipper.enabled?(:delegation) && @session.supports_delegation?
if @session.supports_delegation?
summary_list.with_row do |row|
row.with_key { "Use patient specific direction (PSD)" }
row.with_value { @session.psd_enabled? ? "Yes" : "No" }
Expand Down
7 changes: 2 additions & 5 deletions config/feature_flags.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
basic_auth: Require users to sign in with basic authentication before they
can use the service.

delegation: Allow prescribers to create a PSDs for healthcare workers to administer
nasal vaccines or supply injected vaccines to healthcare works using the PGD protocol.

dev_tools: Developer tools useful for testing and debugging.

enqueue_sync_vaccination_records_to_nhs: Send new vaccinations recorded by
Expand All @@ -25,6 +22,6 @@ pds_lookup_during_import: Perform PDS lookups as part of the patient import

testing_api: Basic API useful for automated testing.

reporting_api: Enables the Commissioner reporting component to authenticate to Mavis via OAUTH 2.0
Authorization Code Flow (https://datatracker.ietf.org/doc/html/rfc6749#section-4.1), and retrieve
reporting_api: Enables the Commissioner reporting component to authenticate to Mavis via OAUTH 2.0
Authorization Code Flow (https://datatracker.ietf.org/doc/html/rfc6749#section-4.1), and retrieve
statistics from /api/reporting/
33 changes: 6 additions & 27 deletions spec/features/delegation_spec.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
# frozen_string_literal: true

describe "Delegation" do
after { given_the_feature_flag_is_disabled }

scenario "feature flag off and in a flu session" do
given_the_feature_flag_is_disabled
and_a_flu_session_exists
scenario "in a HPV session" do
given_an_hpv_session_exists

when_i_visit_the_session_as_a_nurse
and_i_go_to_the_edit_page
then_i_see_nothing_about_delegation
end

scenario "feature flag on and in a HPV session" do
given_the_feature_flag_is_enabled
and_an_hpv_session_exists

when_i_visit_the_session_as_a_nurse
and_i_go_to_the_edit_page
then_i_see_nothing_about_delegation
end

scenario "feature flag on and in a flu session" do
given_the_feature_flag_is_enabled
and_a_flu_session_exists
scenario "in a flu session" do
given_a_flu_session_exists

when_i_visit_the_session_as_a_nurse
and_i_go_to_the_edit_page
Expand All @@ -33,23 +20,15 @@
then_i_see_the_options_are_enabled
end

def given_the_feature_flag_is_enabled
Flipper.enable(:delegation)
end

def given_the_feature_flag_is_disabled
Flipper.disable(:delegation)
end

def and_a_flu_session_exists
def given_a_flu_session_exists
@programme = create(:programme, :flu)
@team = create(:team, programmes: [@programme])
@nurse = create(:nurse, teams: [@team])

@session = create(:session, programmes: [@programme], team: @team)
end

def and_an_hpv_session_exists
def given_an_hpv_session_exists
@programme = create(:programme, :hpv)
@team = create(:team, programmes: [@programme])
@nurse = create(:nurse, teams: [@team])
Expand Down
6 changes: 0 additions & 6 deletions spec/features/flu_vaccination_hca_psd_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# frozen_string_literal: true

describe "Flu vaccination" do
before { given_delegation_feature_flag_is_enabled }

scenario "Prescriber bulk add PSDs to patients that don't require triage" do
given_a_flu_session_exists(user_type: :with_one_nurse)
and_patients_exist
Expand Down Expand Up @@ -85,10 +83,6 @@
then_i_should_not_see_the_record_vaccination_section
end

def given_delegation_feature_flag_is_enabled
Flipper.enable(:delegation)
end

def given_a_flu_session_exists(user_type:, national_protocol_enabled: false)
@programme = create(:programme, :flu)
@programmes = [@programme]
Expand Down
5 changes: 0 additions & 5 deletions spec/features/triage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
end

scenario "prescriber can add add PSD instruction" do
given_delegation_feature_flag_is_enabled
and_a_flu_programme_with_a_running_session_with_psd_enabled
and_a_patient_with_nasal_consent_who_needs_triage_exists
and_i_am_signed_in_as_a_prescriber
Expand Down Expand Up @@ -205,10 +204,6 @@ def and_a_patient_who_doesnt_need_triage_exists
).patient
end

def given_delegation_feature_flag_is_enabled
Flipper.enable(:delegation)
end

def and_i_am_signed_in
@user = @team.users.first
sign_in @user
Expand Down