Sha256: fa3fe1884061b99d09a6b7cce3df80e9e2b30d5a039afc477808d675a7bdacfa

Contents?: true

Size: 494 Bytes

Versions: 73

Compression:

Stored size: 494 Bytes

Contents

# frozen_string_literal: true

module PatientsSpecHelper
  def set_modality(patient:,
                   modality_description:,
                   started_on: Time.zone.today,
                   by: Renalware::User.first)

    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
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
renalware-core-2.0.79 spec/support/patients_spec_helper.rb
renalware-core-2.0.78 spec/support/patients_spec_helper.rb
renalware-core-2.0.77 spec/support/patients_spec_helper.rb
renalware-core-2.0.76 spec/support/patients_spec_helper.rb
renalware-core-2.0.75 spec/support/patients_spec_helper.rb
renalware-core-2.0.74 spec/support/patients_spec_helper.rb
renalware-core-2.0.73 spec/support/patients_spec_helper.rb
renalware-core-2.0.72 spec/support/patients_spec_helper.rb
renalware-core-2.0.71 spec/support/patients_spec_helper.rb
renalware-core-2.0.70 spec/support/patients_spec_helper.rb
renalware-core-2.0.69 spec/support/patients_spec_helper.rb
renalware-core-2.0.68 spec/support/patients_spec_helper.rb
renalware-core-2.0.67 spec/support/patients_spec_helper.rb
renalware-core-2.0.64 spec/support/patients_spec_helper.rb
renalware-core-2.0.63 spec/support/patients_spec_helper.rb
renalware-core-2.0.62 spec/support/patients_spec_helper.rb
renalware-core-2.0.61 spec/support/patients_spec_helper.rb
renalware-core-2.0.60 spec/support/patients_spec_helper.rb
renalware-core-2.0.58 spec/support/patients_spec_helper.rb
renalware-core-2.0.57 spec/support/patients_spec_helper.rb