Class: Renalware::Transplants::PatientPresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/renalware/transplants/patient_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(patient) ⇒ PatientPresenter

Returns a new instance of PatientPresenter.



8
9
10
11
# File 'app/presenters/renalware/transplants/patient_presenter.rb', line 8

def initialize(patient)
  patient = patient.__getobj__ if patient.respond_to?(:__getobj__)
  super(Transplants.cast_patient(patient))
end

Instance Method Details

#current_registration_statusObject



13
14
15
16
17
# File 'app/presenters/renalware/transplants/patient_presenter.rb', line 13

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