Sha256: 5c82c5331a9f6789470198d3237e923283149ca78b0d3d9de730191a68d571dd

Contents?: true

Size: 528 Bytes

Versions: 158

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/transplants"

module Renalware
  module Transplants
    class PatientPresenter < SimpleDelegator
      def initialize(patient)
        patient = patient.__getobj__ if patient.respond_to?(:__getobj__)
        super(Transplants.cast_patient(patient))
      end

      def current_registration_status
        @current_registration_status ||= begin
          Transplants::Registration.for_patient(__getobj__).first&.current_status
        end
      end
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
renalware-core-2.0.127 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.126 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.125 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.124 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.123 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.121 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.120 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.119 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.118 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.117 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.116 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.115 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.113 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.112 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.111 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.110 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.109 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.108 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.106 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.105 app/presenters/renalware/transplants/patient_presenter.rb