Class: MalawiHivProgramReports::ArchivingCandidates
- Inherits:
-
Object
- Object
- MalawiHivProgramReports::ArchivingCandidates
- Defined in:
- app/services/malawi_hiv_program_reports/archiving_candidates.rb
Instance Method Summary collapse
- #find_report ⇒ Object
-
#initialize(start_date: nil, **_kwargs) ⇒ ArchivingCandidates
constructor
A new instance of ArchivingCandidates.
Constructor Details
#initialize(start_date: nil, **_kwargs) ⇒ ArchivingCandidates
Returns a new instance of ArchivingCandidates.
8 9 10 |
# File 'app/services/malawi_hiv_program_reports/archiving_candidates.rb', line 8 def initialize(start_date: nil, **_kwargs) @start_date = start_date || Date.today end |
Instance Method Details
#find_report ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/services/malawi_hiv_program_reports/archiving_candidates.rb', line 12 def find_report patients = patients_with_adverse_outcomes.to_a long_term_defaulters(patients.map { |patient| patient['patient_id'] }) .each { |defaulter| patients << defaulter } patients end |