Class: MalawiHivProgramReports::Clinic::PatientsDueForViralLoad

Inherits:
Object
  • Object
show all
Defined in:
app/services/malawi_hiv_program_reports/clinic/patients_due_for_viral_load.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start_date:, end_date:, **_kwargs) ⇒ PatientsDueForViralLoad

Returns a new instance of PatientsDueForViralLoad.



8
9
10
11
# File 'app/services/malawi_hiv_program_reports/clinic/patients_due_for_viral_load.rb', line 8

def initialize(start_date:, end_date:, **_kwargs)
  @start_date = start_date
  @end_date = end_date
end

Instance Attribute Details

#end_dateObject

Returns the value of attribute end_date.



6
7
8
# File 'app/services/malawi_hiv_program_reports/clinic/patients_due_for_viral_load.rb', line 6

def end_date
  @end_date
end

#start_dateObject

Returns the value of attribute start_date.



6
7
8
# File 'app/services/malawi_hiv_program_reports/clinic/patients_due_for_viral_load.rb', line 6

def start_date
  @start_date
end

Instance Method Details

#find_reportObject



13
14
15
16
17
# File 'app/services/malawi_hiv_program_reports/clinic/patients_due_for_viral_load.rb', line 13

def find_report
  patients_alive_and_on_treatment.select do |patient_id|
    patient_viral_load_due?(patient_id)
  end
end