Class: Renalware::Transplants::WaitListRegistrationPresenter

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

Instance Method Summary collapse

Instance Method Details

#dolObject



51
52
53
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 51

def dol
  entered_on && (Time.zone.today - entered_on).to_i
end

#esrf_dateObject



47
48
49
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 47

def esrf_date
  Renalware::Renal.cast_patient(patient).profile&.esrf_on
end

#hd_hospital_unit_codeObject



43
44
45
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 43

def hd_hospital_unit_code
  Renalware::HD.cast_patient(patient).hd_profile&.hospital_unit&.unit_code
end

#sensObject



55
56
57
58
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 55

def sens
  return if crf_latest_result.blank?
  crf_latest_result.to_i > 60 ? "Sens" : "Unsens"
end

#uk_transplant_centre_summaryObject



38
39
40
41
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 38

def uk_transplant_centre_summary
  return if uk_transplant_centre_status.blank?
  "#{uk_transplant_centre_status} (#{I18n.l(uk_transplant_centre_status_updated_on)})"
end