Class: InsuranceProvider

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, ThingWithCodes
Defined in:
lib/health-data-standards/models/insurance_provider.rb

Instance Method Summary collapse

Methods included from ThingWithCodes

#add_code, #codes_in_code_set, #codes_to_s, convert_codes_to_s, included, #preferred_code, #single_code_value?, #translation_codes

Instance Method Details

#shift_dates(date_diff) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/health-data-standards/models/insurance_provider.rb', line 21

def shift_dates(date_diff)
  self.start_time = self.start_time.nil? ? nil : self.start_time + date_diff
  self.end_time = self.end_time.nil? ? nil : self.end_time + date_diff
  self.time = self.time.nil? ? nil : self.time + date_diff
  self.guarantors.each do |g|
    g.shift_dates(date_diff)
  end
  
end