Sha256: bb989f1cb5c915f06605e3ace9ffe52014866bc3ae9b61e599b6cfc3054e686d

Contents?: true

Size: 472 Bytes

Versions: 6

Compression:

Stored size: 472 Bytes

Contents

require_dependency "renalware"
require_dependency "renalware/address_presenter/single_line"

module Renalware
  class PatientPresenter < SimpleDelegator
    def address
      AddressPresenter::SingleLine.new(current_address)
    end

    def to_s(format: :long)
      super(format)
    end

    def nhs_number
      return unless super.present? && super.length >= 10
      return if super.index(" ")
      "#{super[0..2]} #{super[3..5]} #{super[6..-1]}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta9 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta8 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta7 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta6 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta5 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta4 app/presenters/renalware/patient_presenter.rb