Class: Renalware::PD::APDRegime

Inherits:
Regime show all
Includes:
OrderedScope, Renalware::PatientScope
Defined in:
app/models/renalware/pd/apd_regime.rb

Constant Summary collapse

BAG_VOLUMES =
[2000, 2500, 5000].freeze
VALID_RANGES =
OpenStruct.new(
  therapy_times: (120..900).step(30).to_a,
  fill_volumes: 0..2_500,
  last_fill_volumes: 500..5_000,
  additional_manual_exchange_volumes: 500..5_000,
  cycles_per_apd: 2..20,
  overnight_volumes: 3_000..25_000,
  dwell_times: 10..120,
  tidal_percentages: (60..100).step(5).to_a
).freeze

Instance Attribute Summary

Attributes inherited from Regime

#total_potential_fluid_available_for_overnight_exchanges

Instance Method Summary collapse

Methods inherited from Regime

#anything_changed?, #apd?, #capd?, current, #current?, #deep_dup, #deep_restore_attributes, policy_class, #terminate, #terminated?, #with_bag_destruction_marks_removed

Instance Method Details

#has_additional_manual_exchange_bag?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'app/models/renalware/pd/apd_regime.rb', line 97

def has_additional_manual_exchange_bag?
  bags.any?(&:additional_manual_exchange?)
end

#has_last_fill_bag?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'app/models/renalware/pd/apd_regime.rb', line 101

def has_last_fill_bag?
  bags.any?(&:last_fill?)
end

#pd_typeObject



93
94
95
# File 'app/models/renalware/pd/apd_regime.rb', line 93

def pd_type
  :apd
end