Sha256: 3861a4c5480ccd1f9224253f635bc16945fdd01192ab226981f3d22028b6e749
Contents?: true
Size: 556 Bytes
Versions: 35
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true module Renalware module HD class PatientListener def patient_modality_changed_to_death(patient:, modality:, actor:) nullify_significant_hd_profile_attributes(patient, by: actor) end private def nullify_significant_hd_profile_attributes(patient, by:) hd_profile = HD.cast_patient(patient).hd_profile return if hd_profile.nil? hd_profile.hospital_unit = nil hd_profile.schedule_definition = nil hd_profile.save_by!(by) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems