Sha256: fd8bca007edc677eaceff411f76985a711061d544cc487493382e64aad78bd0b
Contents?: true
Size: 517 Bytes
Versions: 137
Compression:
Stored size: 517 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/medications" module Renalware module Medications class TerminateAllPatientPrescriptions attr_reader :patient, :by def self.call(patient:, by:) new(patient, by).call end def initialize(patient, by) @patient = patient @by = by end def call patient.prescriptions.current.each do |prescription| prescription.terminate(by: by).save! end end end end end
Version data entries
137 entries across 137 versions & 1 rubygems