Class: MalawiHivProgramReports::Pepfar::ScArvdisp
- Inherits:
-
Object
- Object
- MalawiHivProgramReports::Pepfar::ScArvdisp
- Includes:
- Adapters::Moh::Custom, Utils::CommonSqlQueryUtils
- Defined in:
- app/services/malawi_hiv_program_reports/pepfar/sc_arvdisp.rb
Constant Summary collapse
- DRUGCATEGORY =
{ 'TLD 30-count bottles' => { drugs: [983], quantity: 30 }, 'TLD 90-count bottles' => { drugs: [983], quantity: 90 }, 'TLD 180-count bottles' => { drugs: [983], quantity: 180 }, 'TLE/400 30-count bottles' => { drugs: [735], quantity: 30 }, 'TLE/400 90-count bottles' => { drugs: [735], quantity: 90 }, 'TLE 600/TEE bottles' => { drugs: [11], quantity: 'N/A' }, 'DTG 10 90-count bottles' => { drugs: [980], quantity: 90 }, 'DTG 50 30-count bottles' => { drugs: [982], quantity: 30 }, 'LPV/r 100/25 tabs 60 tabs/bottle' => { drugs: [23, 73, 74, 739, 977, 1045], quantity: 60 }, 'LPV/r 40/10 (pediatrics) bottles' => { drugs: [94, 979], quantity: 'N/A' }, 'NVP (adult) bottles' => { drugs: [22, 613], quantity: 'N/A' }, 'NVP (pediatric) bottles' => { drugs: [21, 817, 968, 971], quantity: 'N/A' }, 'Other (adult) bottles' => { drugs: [ 3, 5, 6, 10, 38, 39, 40, 42, 89, 614, 730, 731, 734, 738, 814, 815, 932, 933, 934, 952, 954, 955, 957, 969, 976, 978, 984, 1217, 1213, 14 ], quantity: 'N/A' }, 'Other (pediatric) bottles' => { drugs: [ 2, 9, 28, 29, 30, 31, 32, 36, 37, 41, 70, 71, 72, 90, 91, 95, 104, 177, 732, 733, 736, 737, 813, 816, 981, 1043, 1044, 1214, 1215 ], quantity: 'N/A' } }.freeze
Instance Method Summary collapse
- #find_report ⇒ Object
-
#initialize(start_date:, end_date:, rebuild_outcome: false, **kwargs) ⇒ ScArvdisp
constructor
A new instance of ScArvdisp.
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:, rebuild_outcome: false, **kwargs) ⇒ ScArvdisp
Returns a new instance of ScArvdisp.
32 33 34 35 36 37 38 39 40 41 |
# File 'app/services/malawi_hiv_program_reports/pepfar/sc_arvdisp.rb', line 32 def initialize(start_date:, end_date:, rebuild_outcome: false, **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') @rebuild_outcome = rebuild_outcome @use_filing_number = ::GlobalProperty.find_by(property: 'use.filing.numbers') &.property_value &.casecmp?('true') @occupation = kwargs[:occupation] @location = kwargs[:location] end |
Instance Method Details
#find_report ⇒ Object
43 44 45 |
# File 'app/services/malawi_hiv_program_reports/pepfar/sc_arvdisp.rb', line 43 def find_report data end |