Class: Renalware::UKRDC::TreatmentTimeline::HD::Generator

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/ukrdc/treatment_timeline/hd/generator.rb

Overview

Generates a set of treatments based on an HD modality and any HD::Profiles during the span of that modality.

There will be an initial treatment triggered by the modality itself, and then a treatment for each significant change in the HD::Profile during the period of the modality (ie until it ends).

Note that the first HD Profile associated with any HD Modality is determined in the SQL view hd_profile_for_modalities. Test with

select * from hd_profile_for_modalities;

It looks ahead to find the very first HD profile.

Instance Method Summary collapse

Instance Method Details

#callObject



26
27
28
29
# File 'app/models/renalware/ukrdc/treatment_timeline/hd/generator.rb', line 26

def call
  create_treatment_from_modality
  create_treatments_within_modality
end