Class: Renalware::HD::PatientsDialysingByDayAndPeriodQuery

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hospital_unit_id, day_of_week, period_code) ⇒ PatientsDialysingByDayAndPeriodQuery

Returns a new instance of PatientsDialysingByDayAndPeriodQuery.



13
14
15
16
17
# File 'app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb', line 13

def initialize(hospital_unit_id, day_of_week, period_code)
  @hospital_unit_id = hospital_unit_id
  @day_of_week = day_of_week
  @period_code = period_code
end

Instance Attribute Details

#day_of_weekObject (readonly)

Returns the value of attribute day_of_week.



11
12
13
# File 'app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb', line 11

def day_of_week
  @day_of_week
end

#hospital_unit_idObject (readonly)

Returns the value of attribute hospital_unit_id.



11
12
13
# File 'app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb', line 11

def hospital_unit_id
  @hospital_unit_id
end

#period_codeObject (readonly)

Returns the value of attribute period_code.



11
12
13
# File 'app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb', line 11

def period_code
  @period_code
end

Instance Method Details

#callObject



19
20
21
22
23
24
# File 'app/models/renalware/hd/patients_dialysing_by_day_and_period_query.rb', line 19

def call
  PatientsDialysingByScheduleQuery.new(
    hospital_unit_id,
    schedule_definition_ids
  ).call
end