Sha256: 9b5eb1796b9093eb25b46f44a65748b275457610054ee5d4fe9cb701b32179ba

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

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 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

1 entries across 1 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta12 app/models/renalware/letters/event/clinic_visit.rb