Class: Renalware::PatientPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Renalware::PatientPresenter
- Defined in:
- app/presenters/renalware/patient_presenter.rb
Direct Known Subclasses
Instance Method Summary collapse
- #address ⇒ Object
- #nhs_number ⇒ Object
- #renalreg_decision ⇒ Object
- #rpv_decision ⇒ Object
- #to_s(format = :long) ⇒ Object
Instance Method Details
#address ⇒ Object
8 9 10 |
# File 'app/presenters/renalware/patient_presenter.rb', line 8 def address AddressPresenter::SingleLine.new(current_address) end |
#nhs_number ⇒ Object
16 17 18 19 20 21 |
# File 'app/presenters/renalware/patient_presenter.rb', line 16 def nhs_number return super unless super.present? && super.length >= 10 return if super.index(" ") "#{super[0..2]} #{super[3..5]} #{super[6..-1]}" end |
#renalreg_decision ⇒ Object
30 31 32 33 34 35 |
# File 'app/presenters/renalware/patient_presenter.rb', line 30 def renalreg_decision [ I18n.l(renalreg_decision_on), renalreg_recorded_by ].compact.join(" by ") end |
#rpv_decision ⇒ Object
23 24 25 26 27 28 |
# File 'app/presenters/renalware/patient_presenter.rb', line 23 def rpv_decision [ I18n.l(rpv_decision_on), rpv_recorded_by ].compact.join(" by ") end |
#to_s(format = :long) ⇒ Object
12 13 14 |
# File 'app/presenters/renalware/patient_presenter.rb', line 12 def to_s(format = :long) super(format) end |