Class: MalawiHivProgramReports::Pepfar::TbPrev

Inherits:
Object
  • Object
show all
Includes:
Adapters::Moh::Custom
Defined in:
app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Adapters::Moh::Custom

#cast_manager, #current_partition, #exe_create_drill_down_table, #exe_temp_cohort_members_table, #exe_temp_order_details_table, #exe_temp_other_patient_types, #exe_temp_register_start_date_table, #exe_tmp_patient_table, #function_manager, #group_by_columns, #in_manager, #interval_manager, #min_filt, #site_manager, #timestampdiff_manager

Constructor Details

#initialize(start_date:, end_date:, **kwargs) ⇒ TbPrev

Returns a new instance of TbPrev.



10
11
12
13
14
# File 'app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb', line 10

def initialize(start_date:, end_date:, **kwargs)
  @completion_start_date = start_date&.to_date.strftime('%Y-%m-%d 00:00:00')
  @completion_end_date = end_date&.to_date.strftime('%Y-%m-%d 23:59:59')
  @location = kwargs[:location]
end

Instance Attribute Details

#end_dateObject

Returns the value of attribute end_date.



8
9
10
# File 'app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb', line 8

def end_date
  @end_date
end

#locationObject

Returns the value of attribute location.



8
9
10
# File 'app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb', line 8

def location
  @location
end

#start_dateObject

Returns the value of attribute start_date.



8
9
10
# File 'app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb', line 8

def start_date
  @start_date
end

Instance Method Details

#find_reportObject



16
17
18
# File 'app/services/malawi_hiv_program_reports/pepfar/tb_prev.rb', line 16

def find_report
  data
end