Sha256: e9d348916923a4d9d66bdbefd1ec9f24a7cf0373173b97c0de55f8a3ebb3a62c
Contents?: true
Size: 678 Bytes
Versions: 85
Compression:
Stored size: 678 Bytes
Contents
# frozen_string_literal: true module PatientsSpecHelper def set_modality(patient:, modality_description:, started_on: Time.zone.today, by: Renalware::User.first) # ChangePatientModality returns a Success or Failure object new_modality = Renalware::Modalities::ChangePatientModality .new(patient: patient, user: by) .call( description: modality_description, started_on: started_on ) patient.reload # need to do this in order for current_modality to be set # Return ther object associated with the returned Success or Failure object new_modality.object end end
Version data entries
85 entries across 85 versions & 1 rubygems