Class: Renalware::Transplants::DonorDashboardPresenter

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

Instance Method Summary collapse

Instance Method Details

#donationsObject



19
20
21
# File 'app/presenters/renalware/transplants/donor_dashboard_presenter.rb', line 19

def donations
  @donations ||= Donation.for_patient(patient).reversed
end

#donor_operationsObject



23
24
25
# File 'app/presenters/renalware/transplants/donor_dashboard_presenter.rb', line 23

def donor_operations
  @donor_operations ||= DonorOperation.for_patient(patient).reversed
end

#donor_stagesObject



11
12
13
# File 'app/presenters/renalware/transplants/donor_dashboard_presenter.rb', line 11

def donor_stages
  @donor_stages ||= DonorStage.for_patient(patient).ordered
end

#donor_workupObject



15
16
17
# File 'app/presenters/renalware/transplants/donor_dashboard_presenter.rb', line 15

def donor_workup
  @donor_workup ||= DonorWorkup.for_patient(patient).first_or_initialize
end

#investigationsObject



27
28
29
30
31
32
33
34
# File 'app/presenters/renalware/transplants/donor_dashboard_presenter.rb', line 27

def investigations
  @investigations ||= begin
    Events::Investigation
      .for_patient(patient)
      .transplant_donors
      .ordered
  end
end