Class: MalawiHivProgramReports::Clinic::RegimenDispensationData
- Inherits:
-
Object
- Object
- MalawiHivProgramReports::Clinic::RegimenDispensationData
- Includes:
- Adapters::Moh::Custom, Utils, Utils::CommonSqlQueryUtils
- Defined in:
- app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb
Instance Attribute Summary collapse
-
#end_date ⇒ Object
readonly
Returns the value of attribute end_date.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #find_report ⇒ Object
-
#initialize(start_date:, end_date:, **kwargs) ⇒ RegimenDispensationData
constructor
A new instance of RegimenDispensationData.
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
Methods included from Utils::CommonSqlQueryUtils
#current_occupation_query, #external_client_query, #occupation_filter, #partition_by_site, #process_occupation
Constructor Details
#initialize(start_date:, end_date:, **kwargs) ⇒ RegimenDispensationData
Returns a new instance of RegimenDispensationData.
12 13 14 15 16 17 |
# File 'app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb', line 12 def initialize(start_date:, end_date:, **kwargs) @start_date = ActiveRecord::Base.connection.quote(start_date.to_date.strftime('%Y-%m-%d 00:00:00')) @end_date = ActiveRecord::Base.connection.quote(end_date.to_date.strftime('%Y-%m-%d 23:59:59')) @type = kwargs[:type] @occupation = kwargs[:occupation] end |
Instance Attribute Details
#end_date ⇒ Object (readonly)
Returns the value of attribute end_date.
7 8 9 |
# File 'app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb', line 7 def end_date @end_date end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
7 8 9 |
# File 'app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb', line 7 def start_date @start_date end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb', line 7 def type @type end |
Instance Method Details
#find_report ⇒ Object
19 20 21 22 23 |
# File 'app/services/malawi_hiv_program_reports/clinic/regimen_dispensation_data.rb', line 19 def find_report drop_regimen_data create_filtered_data process_clients end |