Class: Renalware::PD::APD::TidalRegimeCalculations

Inherits:
RegimeCalculations show all
Defined in:
app/models/renalware/pd/apd/tidal_regime_calculations.rb

Constant Summary

Constants inherited from RegimeCalculations

RegimeCalculations::INCALCULABLE

Instance Method Summary collapse

Methods inherited from RegimeCalculations

#calculated_daily_volume, #volume_of_glucose_at_strength

Instance Method Details

#calculated_overnight_volumeObject

Each patient will have the same volume for each night they do APD and that is the overnight APD volume. If a patient only does APD on 6 nights per week, the overnight volume does not need to be averaged over 7 nights as the clinicians will want to know what the volume is for the nights the patient does the APD (intuitively knowing that, on nights the patient does not do APD, the volume is zero).



14
15
16
17
18
19
20
21
22
# File 'app/models/renalware/pd/apd/tidal_regime_calculations.rb', line 14

def calculated_overnight_volume
  return INCALCULABLE unless volume_calculable?

  if drain_every_three_cycles?
    volume_when_1st_and_then_every_3rd_exchange_is_full_and_the_remainder_are_tidal
  else
    volume_when_first_exchange_is_full_and_the_remainder_are_tidal
  end
end