Sha256: 7f33acdc9213a1f0ebbd8b82d49fdee7bc68da0f3dca82c18ef3b61cc2c2c99d

Contents?: true

Size: 449 Bytes

Versions: 18

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module HD
    class PrescriptionLastAdministrationComponent < ApplicationComponent
      pattr_initialize [:prescription!]

      def last_administration
        return if prescription.blank?

        @last_administration ||=
          PrescriptionLastAdministrationQuery.call(prescription: prescription)
      end

      def render?
        last_administration.present?
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.1.0 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.167 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.166 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.165 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.164 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.163 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.162 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.161 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.160 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.159 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.158 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.157 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.156 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.155 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.153 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.152 app/components/renalware/hd/prescription_last_administration_component.rb
renalware-core-2.0.151 app/components/renalware/hd/prescription_last_administration_component.rb