Sha256: eab42488c49216d266f16868d794d7514dea3e9daf04577918bc0279b628085b

Contents?: true

Size: 454 Bytes

Versions: 3

Compression:

Stored size: 454 Bytes

Contents

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

3 entries across 3 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta11 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.beta10 app/presenters/renalware/transplants/patient_presenter.rb
renalware-core-2.0.0.pre.beta9 app/presenters/renalware/transplants/patient_presenter.rb