Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the Repository of HSI_Events to include Consumables, Equipment and All HSI_Events #1368

Open
tbhallett opened this issue May 24, 2024 · 0 comments
Assignees

Comments

@tbhallett
Copy link
Collaborator

We create and publish the catalogue of all the HSI_Events that are used in the model here. This aggregation of information is very useful for sense-checking of assumptions by the modelling team (seeing all the information in one place, seeing how similar declarations are made across different disease modules, etc.) and for discussions with stakeholders and external clinical experts. It's also a key part of the methods documentation which we don't want to ask readers to have to find buried in the code. We also use get_details_of_defined_hsi_events() function in tests (e.g. test_manipulation_of_service_availability()) to find (almost*) all the HSI_Events used in the model. [* see second bullet]

This issue proposes two extensions:

  • The information collected for each HSI should also include:

    • Equipment defined in __init__() though self.add_equipment()
    • Equipment defined in apply() through self.add_equipment()
    • Consumables used in apply() through self.get_consumables()
  • It would be helpful if this repository could also include all permutations of HSI_Events, including those with characteristics defined only at run-time. (The current method in get_details_of_defined_hsi_events() uses inspect to do a "cold read" of the code, whereas some HSI_Events evaluate properties at runtime: e.g., HSI_Alri_Treatment.

(In fact, these two requirements are linked: I don't think we'd able to to know what is happening in the apply() function of an HSI_Event (for consumables and equipment definitions) without running it.)

In the initial approach to this issue (#334), @matt-graham had proposed a way of extracting the information from a run of the simulation, but we didn't use it. But, now we have a nightly run of the model and all the information for the above is coming out in the logger (tlo.methods.healthsystem), it seems like it would be possible for this table to be built from the log-file from the nightly run and then assembled into a table. Though not necessary, it would be very nice if this table could be automatically published to the website, but that is probably a part of the website-updating issue (#433).

Closed issues that this issue is now covering:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants