Sha256: 513c46c0241016626c9490eb3d134e5d0a911d0f79c56b1ba8a8386b4eb6c3b6
Contents?: true
Size: 482 Bytes
Versions: 8
Compression:
Stored size: 482 Bytes
Contents
module Renalware module Clinics class BuildVisitFromAppointment def initialize(appointment) @appointment = appointment end def call(opts = {}) visit = appointment.patient.clinic_visits.build(opts) visit.clinic = appointment.clinic starts_at = appointment.starts_at visit.date = starts_at.to_date visit.time = starts_at visit end private attr_reader :appointment end end end
Version data entries
8 entries across 8 versions & 1 rubygems