Sha256: fad28ed950959d1ff9256812948ba0bd13b44306d0a0bdf77c1d106de3110416

Contents?: true

Size: 580 Bytes

Versions: 12

Compression:

Stored size: 580 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module HD
    class AdministerPrescriptionDropdownComponent < ApplicationComponent
      include DropdownButtonHelper
      include PresenterHelper
      attr_reader :patient

      def initialize(patient:)
        @patient = patient
      end

      def prescriptions_to_give_on_hd
        @prescriptions_to_give_on_hd ||= begin
          prescriptions = patient.prescriptions.includes([:drug]).to_be_administered_on_hd
          present(prescriptions, Medications::PrescriptionPresenter)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
renalware-core-2.0.149 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.148 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.147 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.146 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.145 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.144 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.143 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.142 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.141 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.140 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.139 app/components/renalware/hd/administer_prescription_dropdown_component.rb
renalware-core-2.0.138 app/components/renalware/hd/administer_prescription_dropdown_component.rb