renalware-core 2.0.109 → 2.0.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/renalware/loading-gears-animation.gif +0 -0
  3. data/app/assets/javascripts/renalware/drugs.js +3 -4
  4. data/app/assets/javascripts/renalware/letters.js +47 -2
  5. data/app/assets/pdf/blank_page.pdf +56 -0
  6. data/app/assets/stylesheets/renalware/modules/_letters.scss +46 -0
  7. data/app/assets/stylesheets/renalware/partials/_tables.scss +2 -2
  8. data/app/controllers/renalware/base_controller.rb +9 -2
  9. data/app/controllers/renalware/clinics/appointments_controller.rb +8 -3
  10. data/app/controllers/renalware/letters/batches_controller.rb +106 -0
  11. data/app/controllers/renalware/letters/completed_batches_controller.rb +32 -0
  12. data/app/controllers/renalware/letters/lists_controller.rb +34 -5
  13. data/app/controllers/renalware/pathology/requests/requests_controller.rb +1 -1
  14. data/app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb +38 -0
  15. data/app/jobs/renalware/hd/update_rolling_patient_statistics_job.rb +4 -2
  16. data/app/jobs/renalware/letters/printing/batch_print_job.rb +27 -0
  17. data/app/models/concerns/renalware/patients_ransack_helper.rb +1 -1
  18. data/app/models/concerns/renalware/using_temp_folder.rb +14 -0
  19. data/app/models/renalware/clinics/appointment.rb +2 -3
  20. data/app/models/renalware/clinics/appointment_query.rb +5 -1
  21. data/app/models/renalware/hd/sessions/save_session.rb +5 -1
  22. data/app/models/renalware/hd/update_rolling_patient_statistics.rb +1 -1
  23. data/app/models/renalware/letters/batch.rb +37 -0
  24. data/app/models/renalware/letters/batch_item.rb +17 -0
  25. data/app/models/renalware/letters/lists/form.rb +101 -0
  26. data/app/models/renalware/letters/pdf_letter_cache.rb +1 -1
  27. data/app/models/renalware/letters/printing/batch_compile_pdfs.rb +121 -0
  28. data/app/models/renalware/letters/printing/complete_batch.rb +24 -0
  29. data/app/models/renalware/letters/printing/create_pdf_by_interleaving_address_sheet_and_letter_for_each_recipient.rb.dead +90 -0
  30. data/app/models/renalware/letters/printing/duplex_interleaved_pdf_renderer.rb +1 -1
  31. data/app/models/renalware/letters/printing/pdf_combining.rb +24 -21
  32. data/app/models/renalware/pathology/{consultant.rb → consultant.rb.dead} +0 -0
  33. data/app/models/renalware/pathology/observations_grouped_by_date_query.rb +1 -1
  34. data/app/models/renalware/pathology/relevant_observation_description.rb +1 -1
  35. data/app/models/renalware/pathology/requests/global_rule/transplant_date_within_weeks.rb +1 -1
  36. data/app/models/renalware/pathology/requests/global_rule/transplant_registration_status.rb +3 -1
  37. data/app/models/renalware/pathology/requests/request.rb +1 -1
  38. data/app/models/renalware/pathology/requests/request_params_factory.rb +11 -12
  39. data/app/models/renalware/patient.rb +3 -2
  40. data/app/models/renalware/pd/apd_regime.rb +6 -6
  41. data/app/models/renalware/renal/consultant.rb +16 -0
  42. data/app/models/renalware/transplants/registrations/wait_list_query.rb +4 -10
  43. data/app/models/renalware/ukrdc/treatment_timeline/generator_factory.rb +1 -1
  44. data/app/pdfs/renalware/letters/printing/recipient_address_page_pdf.rb +50 -0
  45. data/app/policies/renalware/letters/batch_policy.rb +13 -0
  46. data/app/presenters/renalware/letters/recipient_presenter.rb +1 -1
  47. data/app/presenters/renalware/pathology/requests/request_presenter.rb +1 -1
  48. data/app/presenters/renalware/transplants/mdm_presenter.rb +1 -1
  49. data/app/presenters/renalware/virology/dashboard_presenter.rb +2 -1
  50. data/app/views/renalware/api/ukrdc/patients/_hd_session_observations.xml.builder +2 -2
  51. data/app/views/renalware/clinics/appointments/index.html.slim +5 -4
  52. data/app/views/renalware/clinics/appointments/new.html.slim +3 -0
  53. data/app/views/renalware/letters/batches/_create.html.slim +27 -0
  54. data/app/views/renalware/letters/batches/create.js.erb +3 -0
  55. data/app/views/renalware/letters/batches/index.html.slim +20 -0
  56. data/app/views/renalware/letters/batches/show.html.slim +7 -0
  57. data/app/views/renalware/letters/completed_batches/create.js.erb +9 -0
  58. data/app/views/renalware/letters/completed_batches/new.html.slim +26 -0
  59. data/app/views/renalware/letters/lists/_table.html.slim +1 -1
  60. data/app/views/renalware/letters/lists/_tabs.html.slim +9 -0
  61. data/app/views/renalware/letters/lists/index.html.slim.dead +101 -0
  62. data/app/views/renalware/letters/lists/index.html.slim.dead1 +90 -0
  63. data/app/views/renalware/letters/lists/show.html.slim +57 -11
  64. data/app/views/renalware/medications/prescriptions/_form.html.slim +1 -0
  65. data/app/views/renalware/navigation/_super_admin.html.slim +1 -0
  66. data/app/views/renalware/pathology/requests/requests/_pdf_header.html.slim +2 -3
  67. data/app/views/renalware/pathology/requests/requests/index.html.slim +1 -1
  68. data/app/views/renalware/pathology/requests/requests/new.html.slim +0 -1
  69. data/config/locales/renalware/letters/letter.en.yml +5 -0
  70. data/config/routes/letters.rb +18 -1
  71. data/db/migrate/20190830153416_create_letter_batches.rb +14 -0
  72. data/db/migrate/20190902085216_create_letter_batch_items.rb +13 -0
  73. data/db/migrate/20190919073410_add_filepath_to_letter_batches.rb +7 -0
  74. data/db/migrate/20190920063447_add_status_to_letter_batch_items.rb +15 -0
  75. data/db/migrate/20190925104902_remove_user_from_appointments.rb +19 -0
  76. data/db/migrate/20190925130052_add_telephone_to_renal_consultants.rb +7 -0
  77. data/db/migrate/20190925161724_change_path_request_consultant_id.rb +19 -0
  78. data/db/migrate/20190925173849_renal_consultants_changes.rb +9 -0
  79. data/db/migrate/20190928131032_add_some_more_missing_indexes.rb +18 -0
  80. data/db/views/pathology_observation_digests_v01.sql +1 -1
  81. data/lib/renalware/configuration.rb +2 -0
  82. data/lib/renalware/engine.rb +1 -0
  83. data/lib/renalware/version.rb +1 -1
  84. data/lib/tasks/demo_data.rake +66 -0
  85. data/lib/tasks/pd.rake +32 -0
  86. data/spec/factories/clinics/appointments.rb +1 -1
  87. data/spec/factories/medications/medication_route.rb +5 -0
  88. data/spec/factories/renal/consultants.rb +9 -0
  89. data/spec/support/pages/medications/prescription_fom.rb +54 -0
  90. metadata +43 -7
  91. data/app/models/renalware/letters/printing/create_pdf_by_interleaving_address_sheet_and_letter_for_each_recipient.rb +0 -140
  92. data/spec/factories/pathology/consultant.rb +0 -5
@@ -5,6 +5,7 @@ ruby:
5
5
  end
6
6
 
7
7
  .document
8
+ br
8
9
  = simple_form_for prescription,
9
10
  url: url,
10
11
  html: { class: "prescription-form", autocomplete: "off" },
@@ -13,3 +13,4 @@ li.has-dropdown
13
13
  li= link_to "HD Dialysates", hd_dialysates_path
14
14
  li= link_to "HD Dialysers", hd_dialysers_path
15
15
  li= link_to "HD Cannulation Types", hd_cannulation_types_path
16
+ li= link_to "Print batches", letters_batches_path
@@ -6,9 +6,8 @@ html lang="en"
6
6
  title= content_for?(:title) ? yield(:title) : "Renalware v#{Renalware::VERSION}"
7
7
 
8
8
  / CSS needs to be inlined to work with wicked_pdf gem
9
- style[type="text/css"] = find_asset_str("application.css")
10
- style[type="text/css"] = find_asset_str("print/pathology_request_forms.css")
11
-
9
+ = wicked_pdf_stylesheet_link_tag "renalware/application"
10
+ = wicked_pdf_stylesheet_link_tag "renalware/print/pathology_request_forms.css"
12
11
  = csrf_meta_tag
13
12
 
14
13
  body
@@ -36,7 +36,7 @@
36
36
  td = link_to "View", pathology_requests_request_path(id: request.id, format: "pdf")
37
37
  td = request.patient.full_name
38
38
  td = request.clinic.name
39
- td = request.consultant.full_name
39
+ td = request.consultant
40
40
  td = I18n.l request.printed_on
41
41
  td = request.created_by.full_name
42
42
 
@@ -28,7 +28,6 @@ html lang="en"
28
28
  include_blank: false
29
29
  = f.input :consultant_id,
30
30
  collection: all_consultants,
31
- label_method: :full_name,
32
31
  input_html: { class: "small-input" },
33
32
  include_blank: false
34
33
  = f.input :telephone, input_html: { class: "small-input" }
@@ -26,3 +26,8 @@ en:
26
26
  page_title: New Clinical Letter
27
27
  simple:
28
28
  page_title: New Simple Letter
29
+ lists:
30
+ tabs:
31
+ tab:
32
+ all: All
33
+ batch_printable: Batch Printable
@@ -22,13 +22,30 @@ resources :patients, only: [] do
22
22
  end
23
23
 
24
24
  namespace :letters do
25
+ resources :batches, only: [:create, :index, :show] do
26
+ get :status, constraints: { format: :json }, defaults: { format: :json }
27
+ resources :completions, only: [:new, :create], controller: "completed_batches"
28
+ end
25
29
  resource :pdf_letter_cache, only: [:destroy], controller: "pdf_letter_cache"
26
30
  resources :descriptions, only: :search do
27
31
  collection do
28
32
  get :search
29
33
  end
30
34
  end
31
- resource :list, only: :show
35
+
36
+ # Letters::ListsController displays prefined lists of letters. The default list is :all
37
+ # We want to support dynamic urls with letters_list_path(named_parameeter: :all)
38
+ # as well as named routes eg letters_list_all_path.
39
+ # If you use the helper list_batch_printable_path, the named route is used to build the url,
40
+ # but when it is accessed it is actually the first, dynamic route definition that matches first,
41
+ # so the named_filter paramters is populated when we hit the controller.
42
+ constraints(named_filter: /(all|batch_printable)/) do
43
+ get "list/:named_filter", to: "lists#show", as: :filtered_letters_list
44
+ end
45
+ get "list/batch_printable", to: "lists#show", as: :list_batch_printable
46
+ get "list/all", to: "lists#show", as: :list_all
47
+ get "list", to: "lists#show", as: :list, defaults: { named_filter: :all }
48
+
32
49
  resources :letters, only: [] do
33
50
  resources :electronic_receipts, only: [] do
34
51
  patch :mark_as_read, on: :member
@@ -0,0 +1,14 @@
1
+ class CreateLetterBatches < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ create_table :letter_batches do |t|
5
+ t.integer :status, null: false, default: 0, index: true
6
+ t.jsonb :query_params, default: {}, null: false
7
+ t.references :created_by, foreign_key: { to_table: :users }, index: true, null: false
8
+ t.references :updated_by, foreign_key: { to_table: :users }, index: true, null: false
9
+ t.integer :batch_items_count
10
+ t.timestamps null: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # rubocop:disable Rails/CreateTableWithTimestamps
2
+ class CreateLetterBatchItems < ActiveRecord::Migration[5.2]
3
+ def change
4
+ within_renalware_schema do
5
+ create_table :letter_batch_items do |t|
6
+ t.references :letter, foreign_key: { to_table: :letter_letters }, null: false, index: false
7
+ t.references :batch, foreign_key: { to_table: :letter_batches }, null: false, index: false
8
+ end
9
+ add_index :letter_batch_items, [:letter_id, :batch_id], unique: true
10
+ end
11
+ end
12
+ end
13
+ # rubocop:enable Rails/CreateTableWithTimestamps
@@ -0,0 +1,7 @@
1
+ class AddFilepathToLetterBatches < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column :letter_batches, :filepath, :string
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ class AddStatusToLetterBatchItems < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column(
5
+ :letter_batch_items,
6
+ :status,
7
+ :integer,
8
+ default: 0,
9
+ null: false,
10
+ limit: 2 # smallint
11
+ )
12
+ add_index :letter_batch_items, [:batch_id, :status]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ class RemoveUserFromAppointments < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ remove_column :clinic_appointments, :user_id, :integer
5
+
6
+ add_reference :clinic_appointments,
7
+ :updated_by,
8
+ foreign_key: { to_table: :users },
9
+ index: true,
10
+ null: true
11
+
12
+ add_reference :clinic_appointments,
13
+ :created_by,
14
+ foreign_key: { to_table: :users },
15
+ index: true,
16
+ null: true
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ class AddTelephoneToRenalConsultants < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column :renal_consultants, :telephone, :string
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,19 @@
1
+ class ChangePathRequestConsultantId < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ remove_reference(
5
+ :pathology_requests_requests,
6
+ :consultant,
7
+ foreign_key: { to_table: :users },
8
+ index: true
9
+ )
10
+ add_reference(
11
+ :pathology_requests_requests,
12
+ :consultant,
13
+ foreign_key: { to_table: :renal_consultants },
14
+ index: true,
15
+ null: true
16
+ )
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ class RenalConsultantsChanges < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ remove_index :renal_consultants, :code
5
+ change_column_null :renal_consultants, :code, true
6
+ add_index :renal_consultants, :name, unique: true
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,18 @@
1
+ class AddSomeMoreMissingIndexes < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_index :modality_descriptions, :type
5
+ add_index :addresses, :addressable_id
6
+ add_index :letter_recipients, :role
7
+ # add_index :clinic_clinics, :name # this is added in heroic branch so don't add here
8
+ add_index :pathology_requests_global_rules, :rule_set_type
9
+ add_index :event_types, :hidden
10
+ add_index :letter_letters, :type
11
+ add_index :transplant_versions, :item_id
12
+ add_index :access_profiles, :started_on
13
+ add_index :access_profiles, :terminated_on
14
+ add_index :hospital_units, :is_hd_site
15
+ add_index :transplant_registration_status_descriptions, :position
16
+ end
17
+ end
18
+ end
@@ -6,7 +6,7 @@ Example output:
6
6
  patient_id observation_date observations
7
7
  ------------------------------------------
8
8
  1 2018-02-02 {"CYA": "14"}
9
- 1 2016-06-15 {"CMVDNA": "0.10"}
9
+ 1 2016-06-15 {"CMVD": "0.10"}
10
10
  1 2016-03-15 {"NA": "137", "TP": "74", "ALB": "48", "ALP": "71", ...
11
11
  1 2016-02-29 {"NA": "136", "TP": "78", "ALB": "47", "ALP": "71", ...
12
12
  */
@@ -85,6 +85,8 @@ module Renalware
85
85
 
86
86
  config_accessor(:hd_session_prescriptions_require_signoff) { true }
87
87
 
88
+ config_accessor(:batch_printing_enabled) { true }
89
+
88
90
  # A host app can override this to add/remove/re-order the clinical summary display
89
91
  # Note these have to be strings - they mapped to constants in ClinicalSummaryPresenter.
90
92
  config_accessor(:page_layouts) {
@@ -148,6 +148,7 @@ module Renalware
148
148
  renalware/print-button-example.png
149
149
  renalware/hd/mr_victor.jpg
150
150
  renalware/hd/avf_avg_assessment.jpg
151
+ renalware/loading-gears-animation.gif
151
152
  )
152
153
  app.config.assets.paths <<
153
154
  Rails.root.join(config.root, "vendor", "assets", "javascripts", "renalware")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.109"
4
+ VERSION = "2.0.110"
5
5
  end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require_dependency "renalware/letters"
4
+
5
+ require_relative '../../app/models/concerns/renalware/broadcasting.rb'
6
+
7
+ namespace :demo_data do
8
+ task generate_test_letters: :environment do
9
+ return if Rails.env.production?
10
+
11
+ Renalware::GenerateTestLetters.new(ENV["pages"]).call
12
+ end
13
+ end
14
+
15
+ module Renalware
16
+ class GenerateTestLetters
17
+ include Renalware::Broadcasting
18
+ attr_reader :pages
19
+
20
+ def initialize(pages = 1)
21
+ @pages = pages.to_i
22
+ end
23
+
24
+ def call
25
+ patient = Letters.cast_patient(Patient.find_by(local_patient_id: "Z100001"))
26
+ clinics_patient = Renalware::Clinics.cast_patient(patient)
27
+
28
+ users = User.limit(3).to_a
29
+
30
+ letter_body = ""
31
+
32
+ pages.times do
33
+ letter_body += <<-TEXT
34
+ Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nulla vitae elit libero, a pharetra augue. Nulla vitae elit libero, a pharetra augue.
35
+ Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit. Nulla vitae elit libero, a pharetra augue. Nulla vitae elit libero, a pharetra augue.
36
+ TEXT
37
+ end
38
+ letter_body += <<-TEXT
39
+ Yours sincerely
40
+ TEXT
41
+
42
+ 10.times do
43
+ letter = Letters::Letter::PendingReview.create!(
44
+ patient: patient,
45
+ issued_on: 1.day.ago,
46
+ pathology_timestamp: 1.day.ago,
47
+ event: clinics_patient.clinic_visits.first,
48
+ clinical: true,
49
+ description: Renalware::Letters::Description.last.text,
50
+ main_recipient_attributes: {
51
+ person_role: "patient"
52
+ },
53
+ salutation: "Dear Mr Rabbit",
54
+ body: letter_body,
55
+ letterhead: Renalware::Letters::Letterhead.last,
56
+ author: users.sample,
57
+ by: users.sample
58
+ )
59
+ Renalware::Letters::ApproveLetter
60
+ .build(letter)
61
+ .broadcasting_to_configured_subscribers
62
+ .call(by: users.sample)
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "benchmark"
4
+
5
+ namespace :pd do
6
+ desc "Applies the PD Calculations that are normally done when a user saves a regime. "\
7
+ "Useful post-migration to populate calculated fields. "\
8
+ "We avoid changing the updated_at timestamp in this instance, so it is recommended "\
9
+ "to clear the cache after running, otherwise the PD Summary etc in the UI may not update "\
10
+ "becuase some cache keys are based on the regime.updated_at column."
11
+ # Note if this task fails because the underlying PD regime data is not valid (we call save! so
12
+ # validations run) an alternative is to do this, which you even do in the rails console:
13
+ # regimes.each { |r| Renalware::PD::APD::CalculateVolumes.new(r).call }
14
+ # regimes = Renalware::PD::APDRegime.where(daily_volume: nil);
15
+ # regimes.each { |r| r.update_columns(overnight_volume: r.overnight_volume,
16
+ # daily_volume: r.daily_volume,
17
+ # glucose_volume_low_strength: r.glucose_volume_low_strength,
18
+ # glucose_volume_medium_strength: r.glucose_volume_medium_strength,
19
+ # glucose_volume_high_strength: r.glucose_volume_high_strength) }
20
+ task apply_calculations: :environment do
21
+ Rails.logger = Logger.new(STDOUT)
22
+ # Apply to regimes where the calcs have not been run - ie one of the calculated columns is null.
23
+ regimes = Renalware::PD::APDRegime.where(daily_volume: nil).order(created_at: :asc)
24
+ Rails.logger.info "Applying calcs to #{regimes.count} regimes"
25
+ regimes.find_in_batches(batch_size: 50).each do |batch|
26
+ batch.each do |regime|
27
+ Rails.logger.info "Updating regime##{regime.id}"
28
+ regime.save!(touch: false) # don't change updated_at column
29
+ end
30
+ end
31
+ end
32
+ end
@@ -5,6 +5,6 @@ FactoryBot.define do
5
5
  patient
6
6
  clinic
7
7
  starts_at { Time.zone.now }
8
- association :user
8
+ association :consultant, factory: :renal_consultant
9
9
  end
10
10
  end
@@ -8,6 +8,11 @@ FactoryBot.define do
8
8
  code { "PO" }
9
9
  name { "Per Oral" }
10
10
 
11
+ trait :po do
12
+ code { "PO" }
13
+ name { "Per Oral" }
14
+ end
15
+
11
16
  trait :other do
12
17
  code { "Other" }
13
18
  name { "Other" }
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot.define do
4
+ factory :renal_consultant, class: "Renalware::Renal::Consultant" do
5
+ initialize_with { Renalware::Renal::Consultant.find_or_create_by(name: name) }
6
+ name { "name" }
7
+ code { "code" }
8
+ end
9
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../page_object"
4
+
5
+ module Pages
6
+ module Medications
7
+ # Wraps the Add Prescription form
8
+ class PrescriptionForm < PageObject
9
+ def drug_type=(value)
10
+ select value, from: "Medication Type"
11
+ end
12
+
13
+ def drug=(value)
14
+ select value, from: "Drug"
15
+ end
16
+
17
+ def drug_dose=(value)
18
+ fill_in "Dose amount", with: value
19
+ end
20
+
21
+ def dose_unit=(value)
22
+ select value, from: "Dose unit"
23
+ end
24
+
25
+ def route=(value)
26
+ select value, from: "Route"
27
+ end
28
+
29
+ def route_description=(value)
30
+ fill_in "Route description", with: value
31
+ end
32
+
33
+ def frequency=(value)
34
+ fill_in "Frequency & Duration", with: value
35
+ end
36
+
37
+ def prescribed_on=(value)
38
+ fill_in "Prescribed on", with: value
39
+ end
40
+
41
+ def provider=(value)
42
+ within(".medications_prescription_provider") do
43
+ choose value
44
+ end
45
+ end
46
+
47
+ def save
48
+ within ".actions" do
49
+ click_on "Save"
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end