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

updates from paper analyses for HIV, TB and malaria #1273

Merged
merged 110 commits into from
May 30, 2024

Conversation

tdm32
Copy link
Collaborator

@tdm32 tdm32 commented Feb 9, 2024

Updates include:

palliative care HSI for HIV
palliative care HSI for TB
priority ranking spreadsheet updated to include new EndOfLifeCare HSIs
updated TB diagnostic referral pathway, moving all xpert testing to facility level 2 (as consumables for xpert not available at level 1a and 1b)
remove unused parameters
update data in ResourceFiles
remove shorter paediatric treatment for TB as not commonly used in practice
add consistent repeat healthcare seeking behaviour cap for HIV, TB and malaria HSIs
remove parameters and code relating to scenario setting (not required for master, only for analyses)
include data_parameter for TB to match updated data (ending 2022)
new TbDecideDeath feature schedules hospital stay prior to death and determines probability of death via. linear model
HSI_Tb_ScreeningAndRefer accepts argument facility_level
HSI_ClinicaDiagnosis is now separate (was previously just a diagnostic test) meaning we can track the HR requirements
additional properties in HIV: hv_on_cotrimoxazole, hv_date_treated
schedule hospital stay prior to AIDS death
These changes were all implemented for branches used for the analysis in the recent two papers and so outputs have been checked and are all consistent with expectations.

@tdm32
Copy link
Collaborator Author

tdm32 commented Feb 9, 2024

@tbhallett I have an error occurring in test_analysis: test_get_parameter_functions
Dataframe or series not of the expected size and shape:Tb:rate_testing_active_tb >> updated_value= year ... coverage_ipt_paediatric_contacts

I can see it's down to the data contained in ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking but I don't want to edit this without Bingling's input. Let me know what you'd prefer me to do.

@tbhallett tbhallett added this to In progress in PR priorities via automation Feb 11, 2024
…ty as small population size over 7 days will not schedule VMMC through HIV module. Remove HIV_Prevention_Circumcision in assert statement for HIV services delivered in one week
# Conflicts:
#	resources/malaria/ResourceFile_malaria.xlsx
#	src/tlo/methods/hiv.py
#	src/tlo/methods/malaria.py
# Conflicts:
#	resources/ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking.xlsx
#	resources/healthsystem/priority_policies/ResourceFile_PriorityRanking_ALLPOLICIES.xlsx
#	src/tlo/methods/malaria.py
#	tests/test_malaria.py
# Conflicts:
#	resources/ResourceFile_HIV.xlsx
#	src/tlo/methods/hiv.py
@tdm32
Copy link
Collaborator Author

tdm32 commented Feb 14, 2024

@tbhallett Hi Tim, this error is now occurring but I'm not sure what the correct fix would be:

test_analysis.py:315: in test_get_parameter_functions
    assert name in sim.modules[module].parameters, f"Parameter not recognised: {module}:{name}."
E   AssertionError: Parameter not recognised: CareOfWomenDuringPregnancy:prob_intervention_delivered_ifa.
E   assert 'prob_intervention_delivered_ifa' in {'effect_of_ifa_for_resolving_anaemia': [0.7, 0.7], 'prob_adherent_ifa': [0.37, 0.34], 'prob_delivery_modes_ec': [[0, 0, 1], [0, 0, 1]], 'prob_delivery_modes_spe': [[0.05, 0.05, 0.9], [0.05, 0.05, 0.9]], ...}
E    +  where {'effect_of_ifa_for_resolving_anaemia': [0.7, 0.7], 'prob_adherent_ifa': [0.37, 0.34], 'prob_delivery_modes_ec': [[0, 0, 1], [0, 0, 1]], 'prob_delivery_modes_spe': [[0.05, 0.05, 0.9], [0.05, 0.05, 0.9]], ...} = <tlo.methods.care_of_women_during_pregnancy.CareOfWomenDuringPregnancy object at 0x7fcc589162c0>.parameters

I had updated the spreadsheet resources/ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking.xlsx
as there is now updated data in ResourceFile_TB which was causing a conflict. No other data was changed.

Is it possible that the parameter CareOfWomenDuringPregnancy:prob_intervention_delivered_ifa was removed at some point but still exists in ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking.xlsx? Should it still be there?

@tdm32
Copy link
Collaborator Author

tdm32 commented Feb 16, 2024

@tbhallett one test is failing in test_healthsystem:test_all_treatment_ids_defined_in_priority_policies
where treatment ID PostnatalCare_Comprehensive is not defined in the priority policies but is in clean_set_of_filtered_treatment_ids. It occurs in HSI_Labour_ReceivesComprehensiveEmergencyObstetricCare. Should this be included in the priority policies?

@tbhallett
Copy link
Collaborator

@tbhallett This PR does contain the buggy commit which includes those changes around the malaria do_at_generic_first_appt function. When this is resolved, it may cause conflicts in this branch.

That's ok, we can still go ahead and merge this branch as the fix being developed targets master

tests/test_hiv.py Outdated Show resolved Hide resolved
tests/test_hiv.py Show resolved Hide resolved
tests/test_hiv.py Outdated Show resolved Hide resolved
tests/test_tb.py Show resolved Hide resolved
src/tlo/methods/bladder_cancer.py Show resolved Hide resolved
src/tlo/methods/hiv.py Outdated Show resolved Hide resolved
src/tlo/methods/malaria.py Show resolved Hide resolved
tdm32 and others added 2 commits May 28, 2024 16:20
Co-authored-by: Tim Hallett <39991060+tbhallett@users.noreply.github.com>
address comments in PR #1273 review
tdm32 added a commit that referenced this pull request May 28, 2024
@tdm32
Copy link
Collaborator Author

tdm32 commented May 29, 2024

@tbhallett This is ready for review now

src/tlo/methods/malaria.py Show resolved Hide resolved
src/tlo/methods/bladder_cancer.py Show resolved Hide resolved
@tbhallett tbhallett moved this from Ready for EM review to Ready to merge in PR priorities May 30, 2024
@tbhallett tbhallett merged commit df25c76 into master May 30, 2024
56 checks passed
@tbhallett tbhallett deleted the tara_feb2024_updates_clean branch May 30, 2024 11:35
@tbhallett tbhallett moved this from Ready to merge to Done in PR priorities May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants