Repository navigation
Update costing function to accommodate model output changes - #1840
sakshimohan wants to merge 7 commits into
Conversation
1. Add suspended_results_folder to extract population scaling factor 2. update get_staff_count_by_facid_and_officer_type to get available_staff_count_by_facid_and_officertype
…esults_folder - if suspend and resume is not used
…tion_fix # Conflicts: # src/tlo/analysis/utils.py
… and refactor for quicker runs - extract_results (utils.py): add optional scaling_factor argument. When provided it is used for scaling in place of the factor logged in the suspended or (resume) results folder. - estimate_input_cost_of_scenarios: add optional scaling_factor argument and add it to every extract_results call. - Equipment costing: build the item-use table in one step instead of inserting one column per item, and concatenate draw/run results once. Removes the DataFrame fragmentation warnings and speeds up the loop. - Fix level-1b equipment use: the filter `whether_item_was_used is True` was always False, so level-2 equipment use was never copied to level 1b. Now uses .eq(True). This raises level-1b equipment costs. Apart from the level-1b equipment fix, results are unchanged.
- HR: aggregate staff counts by year/Facility_Level/OfficerType without dropping labels from the unsorted column MultiIndex - Consumables: take explicit copies when separating oxygen, blood and IRS from other consumables (removes SettingWithCopyWarning). No change to results.
|
@marghe-molaro In this PR, I've updated the costing function ( The other problem that I've run into is that the |
|
@joehcollins This PR incorporates the equipment costing refactoring you did in the branch https://github.com/UCL/TLOmodel/tree/jcollins/pregnancy_cohort_jan26. |

This PR makes two updates to the utility functions to extract results and estimate costs -
estimate_input_cost_of_scenarios()to extract the new format ofnumber_of_hcw_staffin the healthsystem.summary logextract_results()to accommodate the use of the suspended results folder when simulations are run using the suspend and resume functionality