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

Revised tb_DAH Impact analysis PR #1568

Open
wants to merge 214 commits into
base: master
Choose a base branch
from

Conversation

nchagoma503
Copy link
Collaborator

PR attempts to analyse the impact of TB diagnostic pathways, i.e, impact of unavailability of TB-related consumables and equipment.

@nchagoma503
Copy link
Collaborator Author

@tamuri @tbhallett @tdm32 I am unable to generate picked files based on the model analysis setup and commands. My analysis files as follows:

  1. scenario script
  2. analysis script

I have been using the following command to run the scenario file locally: tlo scenario-run src/scripts/hiv/DAH/tb_DAH_scenarios2x.py

…e TB module when selecting persons for community chest xray. Also added outreach start data in the parameter file
…scenarios

Double-checked parameters and addressed missing elements in outreach to ensure distinct scenario outputs.
…utum and xpert test

changed tyoe_scaleup to target for community xray. Testing the effects of changes as the baseline CXR and CXR scaleup generating same output values
Change the scaleup date to 2010
…utum and xpert test

changed tyoe_scaleup to target for community xray. Testing the effects of changes as the baseline CXR and CXR scaleup generating same output values
Change the scaleup date to 2010
…utum and xpert test

changed tyoe_scaleup to target for community xray. Testing the effects of changes as the baseline CXR and CXR scaleup generating same output values
Change the scaleup date to 2010
… not being printed, so added a logging for treatmentid in the culture class and will scale it up it works
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
…e. Also change Tb community xray screening start date to simulation start date
@nchagoma503 nchagoma503 marked this pull request as ready for review February 28, 2025 18:18
@nchagoma503
Copy link
Collaborator Author

@tdm32 . Here is PR: PR 1516-Revised DAH analysis as follows:

  1. scenario and analysis script

  2. tb code

  3. sample outputs below
    a. summary of consumables by scenario[summary of consumables.xlsx](https://github.com/user-
    attachments/files/19030986/summary.of.consumables.xlsx)
    b. summary of HR capacity by scenario.
    staff_capacity_by_cadres.xlsx

c. summary of DALYs and mortality pattern[Draft outputs-280225.odt](https://github.com/user-
attachments/files/19030981/Drfat.outputs-280225.odt)

While culture testing has now been incorporated, it does not feature in the outputs marked under program scale-up. At this stage, I am willing to acknowledge this as a limitation. The primary objective of revisiting the analysis was to include consumables and calculate the associated costs, which has now been achieved.

@tdm32
Copy link
Collaborator

tdm32 commented Mar 7, 2025

@tdm32 . Here is PR: PR 1516-Revised DAH analysis as follows:

  1. scenario and analysis script
  2. tb code
  3. sample outputs below
    a. summary of consumables by scenario[summary of consumables.xlsx](https://github.com/user-
    attachments/files/19030986/summary.of.consumables.xlsx)
    b. summary of HR capacity by scenario.
    staff_capacity_by_cadres.xlsx

c. summary of DALYs and mortality pattern[Draft outputs-280225.odt](https://github.com/user- attachments/files/19030981/Drfat.outputs-280225.odt)

While culture testing has now been incorporated, it does not feature in the outputs marked under program scale-up. At this stage, I am willing to acknowledge this as a limitation. The primary objective of revisiting the analysis was to include consumables and calculate the associated costs, which has now been achieved.

@nchagoma503 One of these links takes me to GitHub user-faghloumi

@tdm32
Copy link
Collaborator

tdm32 commented Mar 7, 2025

@tdm32 . Here is PR: PR 1516-Revised DAH analysis as follows:

  1. scenario and analysis script
  2. tb code
  3. sample outputs below
    a. summary of consumables by scenario[summary of consumables.xlsx](https://github.com/user-
    attachments/files/19030986/summary.of.consumables.xlsx)
    b. summary of HR capacity by scenario.
    staff_capacity_by_cadres.xlsx

c. summary of DALYs and mortality pattern[Draft outputs-280225.odt](https://github.com/user- attachments/files/19030981/Drfat.outputs-280225.odt)

While culture testing has now been incorporated, it does not feature in the outputs marked under program scale-up. At this stage, I am willing to acknowledge this as a limitation. The primary objective of revisiting the analysis was to include consumables and calculate the associated costs, which has now been achieved.

@nchagoma503 please paste the figures here so we can see the outputs easily

@tdm32
Copy link
Collaborator

tdm32 commented Mar 7, 2025

@nchagoma503 We can't see the tracked changes in csv files but what values are you changing in HIV/MoH_numbers_tests, art_coverage, parameters, scaleup_parameters? The HIV module should be unchanged from master. Likewise, the only things changing in the TB module would be any scale-up parameters related to your scenarios.

@tdm32
Copy link
Collaborator

tdm32 commented Mar 7, 2025

@nchagoma503 Please link to exactly the analysis file and scripts which you are using. The link above points to a folder. You can delete all those which are not used in this PR.

@tdm32
Copy link
Collaborator

tdm32 commented Mar 7, 2025

@nchagoma503 Thanks for all your hard work on this. I can see you've commented out a few tests - likely because they were failing(?) - but this is not advisable.

Copy link
Collaborator

@tdm32 tdm32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't see the tracked changes in csv files but what values ar you changing in HIV/MoH_numbers_tests, art_coverage, parameters, scaleup_parameters? The HIV module should be unchanged from master

'tlo.methods.demography.detail': logging.WARNING,
'tlo.methods.healthburden': logging.INFO,
'tlo.methods.healthsystem.summary': logging.INFO,
'tlo.methods.tb10x': logging.INFO,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is tb10x?

}

if draw_number < self.number_of_draws:
return list(self._scenarios.values())[draw_number] | health_system_constraints
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if health system constraints are initially identical for all scenario, this part is not needed

},
},
# increase CXR by 90 percentage points
"CXR scaleup": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is CXR increased by 90%? In the resourcefile?

@@ -335,6 +335,7 @@ def __init__(self, name=None, resourcefilepath=None, run_with_checks=False):
"Probability that adolescent girls / young women will start PrEP",
),
"prob_circ_after_hiv_test": Parameter(

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just roll back this change

# ------------------ scale-up parameters for scenario analysis ------------------ #
"type_of_scaleup": Parameter(
Types.STRING, "argument to determine type scale-up of program which will be implemented, "
"can be 'none', 'target' or 'max'",
),
"scenario_SI": Parameter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not used, then remove

@@ -2927,7 +3272,16 @@ def apply(self, population):
# LATENT
# proportion of population with latent TB - all pop
num_latent = len(df[(df.tb_inf == "latent") & df.is_alive])
prev_latent = num_latent / len(df[df.is_alive])
# prev_latent = num_latent / len(df[df.is_alive])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why comment out this line and replace with the same thing?

prev_latent = num_latent / len(df[df.is_alive])
# prev_latent = num_latent / len(df[df.is_alive])
# Calculate the number of alive individuals
denominator = len(df[df.is_alive])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated from above

@@ -392,25 +392,6 @@ def is_df_same_size_and_dtype(df1, df2):
else True
)

def is_list_same_size_and_dtype(l1, l2):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't comment out large chunks of the tests. They are in place to ensure that the code is working correctly. If they are failing, this is a fault with the code.

@@ -214,5 +214,4 @@ def test_htm_scale_up(seed):
assert sim.modules["Tb"].parameters["prob_tx_success_5_14"] == new_tb_params.loc[
new_tb_params.parameter == "tb_prob_tx_success_5_14", "target_value"].values[0]
assert sim.modules["Tb"].parameters["first_line_test"] == new_tb_params.loc[
new_tb_params.parameter == "first_line_test", "target_value"].values[0]

new_tb_params.parameter == "first_line_test", "target_value"].values[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is wrong here, revert back to master version

@@ -136,6 +136,27 @@ def test_basic_run(seed):
]).all().all()


# def test_tb_screening(seed):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, don't remove tests, particularly in they directly relate to the code you are working on.

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

Successfully merging this pull request may close these issues.

2 participants