Class: Renalware::Transplants::WaitListRegistrationPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Renalware::Transplants::WaitListRegistrationPresenter
- Defined in:
- app/presenters/renalware/transplants/wait_list_registration_presenter.rb
Instance Method Summary collapse
- #dol ⇒ Object
- #esrf_date ⇒ Object
- #hd_hospital_unit_code ⇒ Object
- #sens ⇒ Object
- #uk_transplant_centre_summary ⇒ Object
Instance Method Details
#dol ⇒ Object
52 53 54 |
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 52 def dol entered_on && (Time.zone.today - entered_on).to_i end |
#esrf_date ⇒ Object
48 49 50 |
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 48 def esrf_date Renalware::Renal.cast_patient(patient).profile&.esrf_on end |
#hd_hospital_unit_code ⇒ Object
44 45 46 |
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 44 def hd_hospital_unit_code Renalware::HD.cast_patient(patient).hd_profile&.hospital_unit&.unit_code end |
#sens ⇒ Object
56 57 58 59 60 |
# File 'app/presenters/renalware/transplants/wait_list_registration_presenter.rb', line 56 def sens return if crf_latest_result.blank? crf_latest_result.to_i > 60 ? "Sens" : "Unsens" end |
#uk_transplant_centre_summary ⇒ Object
38 39 40 41 42 |
# 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 |