Sha256: b0a192c6c729abe2235c20b1fc98b20e9fc0cdb4be0091c3c3e2140d5ddee3fe
Contents?: true
Size: 509 Bytes
Versions: 12
Compression:
Stored size: 509 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.each do |prescription| prescription.terminate(by: by).save! end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems