-
Notifications
You must be signed in to change notification settings - Fork 15
Improving Performance (And Functionality) of HealthSystem Module
For discussion with Matt/Asif, 7th June 2021
-
Do not recompute squeeze factors if an HSI has a different
APPT_FOOTPRINT
to that in it'sEXPECTED_APPT_FOOTPRINT
(lines 1410-1422). This is a rare occurrence and it is not necessary from the 'squeeze factors' to be recomputed for minor updates. -
Computing of squeeze-factors (lines 1349-1381) does not need to be exact as done currently: it can simply be to the level of whether the squeeze is "any" or "none". (The squeeze factor is the "( / ) -1")
-
Computing of squeeze-factors does (see above) does not need to be at all when running in
mode=0
*** Define properties in main df for the facilities to which person has access to avoid having to work out this out all the time!**
-
A declaration of
HSI_Events
by modules prior the start of the simulation. Each module is responsible for a handful of different types of HSI_Event, and the configuration of these is known prior to the start of simulation (with exception of the associatedperson_id
andfacility_level
(and so the Facility_IDs at which the HSI_Event will occur). If these could be declared in advance of the simulation running, then:- The (time-consuming) conversion of the
EXPECTED_APPT_FOOTPRINT
to the time required of each type of Health Worker could be computed once only. - The properties of all HSI could be inspected easily (e.g. see difficulties of doing this here: https://github.com/UCL/TLOmodel/issues/255). This is useful for:
- documentation
- systematically excluding from runs each type of HSI (or a set of HSI) in order to estimate its "specific health benefit".
- The (time-consuming) conversion of the
-
The Generic Appointments (see
hsi_generic_first_appts.py
) run many times each day (but hopefully not multiple times for the same person on any one day). Almost all (all?) of these are set following onset of symptoms (seehealthseekingbehaviour.py
line 255-292) Would it be more efficient to make this more like a population event, wherein a list ofperson_ids
is collected and theHSI_GenericFirstApptAtFacilityLevelX
is run once (looping through each person inside the event itself). -
To update
get_appt_footprint_as_time_request
to return a dict rather than pandas.Series and update the downstream code which calls it to work with dict objects rather than Series. (per discussion on Matt's earlier PR: https://github.com/UCL/TLOmodel/pull/287) -
Potentially precomputing the sums of time taken for each officer for each combination of appointment and facility types. (per discussion on Matt's earlier PR: https://github.com/UCL/TLOmodel/pull/287)
-
Changing the data structure used to store the appointment footprint for each HSI event to be a list (or similar) with only the relevant entries rather than a dictionary with 1 / 0 values to indicate appointment types being included or not. (per discussion on Matt's earlier PR: https://github.com/UCL/TLOmodel/pull/287)
-
If the HSI runs and has a different
APPT_FOOTPRINT
to that in it'sEXPECTED_APPT_FOOTPRINT
(line 1405), then let the logged usage of healthcare worker time reflect this. (This is a rare occurrence). Currently, nothing comes back from callingevent.run()
(https://github.com/UCL/TLOmodel/issues/291) -
Modularise-out the three components of the module: health-care worker time, bed-days (in progress) and consumables. (per issue: https://github.com/UCL/TLOmodel/issues/169)
-
Log
facility_level
of each run HSI and (create analysis script to display summaries of time consumed of each HCW at each level) (per issue: https://github.com/UCL/TLOmodel/issues/169) -
Incorporate 'scaling' of healthsystem capabilities (through
capabilities_coefficient
(?) to match population size. (per issue: https://github.com/UCL/TLOmodel/issues/169) -
Demonstrate and test performance of different modes of constraints in health systems with toy examples (per issue: https://github.com/UCL/TLOmodel/issues/169)
-
Modularise/Vecotrize the Generic HSI: to make run each day and to people in batches. And to make it easier to manage all the disease modules editing this. Perhaps sending in function handles, and conditions. (Currently there is a lot of editing and dependency in this file and it needs to be cleaned up such that disease modules register the logic that they would like the generic first appt to do for them: sending function handles etc.) (per issue: https://github.com/UCL/TLOmodel/issues/169)
(Line references are wrt master
at time of writing.)
TLO Model Wiki