Sha256: d1919ff0cc0cd695a1898303a9ad5b8c33ba867b2382eb7f7219cfd150565a76

Contents?: true

Size: 716 Bytes

Versions: 2

Compression:

Stored size: 716 Bytes

Contents

require_dependency "renalware/medications"
require "collection_presenter"

module Renalware
  module Medications
    class SummaryPart < Renalware::SummaryPart
      def current_prescriptions
        @current_prescriptions ||= begin
          prescriptions = patient.prescriptions
                                 .includes(drug: [:drug_types, :classifications])
                                 .includes(:medication_route)
                                 .current
                                 .ordered
          CollectionPresenter.new(prescriptions, Medications::PrescriptionPresenter)
        end
      end

      def to_partial_path
        "renalware/medications/summary_part"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 app/presenters/renalware/medications/summary_part.rb
renalware-core-2.0.0.pre.rc10 app/presenters/renalware/medications/summary_part.rb