Sha256: 93824ed84a87d0c2885c5971e05b38f69f698b6ffba83ee7b3461c3134b1a705

Contents?: true

Size: 817 Bytes

Versions: 68

Compression:

Stored size: 817 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/letters"

module Renalware
  module Letters
    class Event::ClinicVisit < Event
      include ::ActionView::Helpers

      def initialize(event, clinical:)
        super(event, clinical: true)
      end

      def description
        "(Clinic Date #{::I18n.l(date.to_date, format: :long)})"
      end

      def part_classes
        super.merge!({ clinical_observations: Part::ClinicalObservations })
      end

      def to_s
        "Clinic Visit"
      end

      def clinical?
        true
      end

      def to_link
        lambda { |patient, event = self|
          link_to(
            event.to_s,
            ::Renalware::Engine.routes.url_helpers.edit_patient_clinic_visit_path(patient, event)
          )
        }
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
renalware-core-2.0.61 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.60 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.58 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.57 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.56 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.55 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.54 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.53 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.52 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.51 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.50 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.48 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.47 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.46 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.45 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.44 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.43 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.42 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.41 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.40 app/models/renalware/letters/event/clinic_visit.rb