Class: Renalware::HD::GenerateMonthlyStatisticsForPatient

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

Defined Under Namespace

Classes: FilteredObservationSet

Instance Method Summary collapse

Constructor Details

#initialize(patient:, period:) ⇒ GenerateMonthlyStatisticsForPatient

Returns a new instance of GenerateMonthlyStatisticsForPatient.



6
7
8
9
# File 'app/models/renalware/hd/generate_monthly_statistics_for_patient.rb', line 6

def initialize(patient:, period:)
  @patient = patient
  @period = period
end

Instance Method Details

#callObject



11
12
13
14
15
# File 'app/models/renalware/hd/generate_monthly_statistics_for_patient.rb', line 11

def call
  options = { patient: patient, period: period }
  sessions = Sessions::AuditablePatientSessionsInPeriodQuery.new(**options).call
  create_patient_statistics(sessions)
end