Sha256: 9427d922ea6081da03a637ff7576352623ebc5844f6e410d11f24dfd6e2943c9

Contents?: true

Size: 813 Bytes

Versions: 81

Compression:

Stored size: 813 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

81 entries across 81 versions & 1 rubygems

Version Path
renalware-core-2.0.127 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.126 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.125 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.124 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.123 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.121 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.120 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.119 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.118 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.117 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.116 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.115 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.113 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.112 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.111 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.110 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.109 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.108 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.106 app/models/renalware/letters/event/clinic_visit.rb
renalware-core-2.0.105 app/models/renalware/letters/event/clinic_visit.rb