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

MNH cohort #1535

Draft
wants to merge 64 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0c7aa41
created mnh_outcome_logger to eventually replace logging for complica…
joehcollins Oct 7, 2024
87d6f1f
created mnh_outcome_logger to eventually replace logging for complica…
joehcollins Oct 7, 2024
cdd9842
added first logging to pregnancy supervisor
joehcollins Oct 7, 2024
b9a193d
finalising logging event
joehcollins Oct 8, 2024
ada05e0
add health system logging
joehcollins Oct 8, 2024
bfac245
old logging removed
joehcollins Oct 8, 2024
905091b
fix
joehcollins Oct 8, 2024
5a04b44
fix
joehcollins Oct 8, 2024
c62d5df
fix
joehcollins Oct 8, 2024
d8423e1
comments for clarity
joehcollins Oct 8, 2024
a6b12fe
removed counting which wasnt needed
joehcollins Oct 8, 2024
5ca2314
fixes to pregnancy_supervisor test
joehcollins Oct 9, 2024
c271e72
Merge branch 'master' into jcollins/updated_mnh_logging
joehcollins Oct 10, 2024
09a216f
fix denom error
joehcollins Oct 10, 2024
03161e0
fix indentation error
joehcollins Oct 10, 2024
de3ee93
added missing logging
joehcollins Oct 10, 2024
0acf362
removed unused variable
joehcollins Nov 11, 2024
8cc45ab
additional counters and updates to mnh_
joehcollins Dec 2, 2024
2055304
Merge branch 'master' into jcollins/updated_mnh_logging
joehcollins Dec 2, 2024
593f9cd
update calculate_risk_of_death_from_causes to allow for cause of deat…
joehcollins Dec 2, 2024
f7c9e68
updates to resource files (new parameters, tweaked values)
joehcollins Dec 2, 2024
3940cce
new params and updates for intervention analysis in pregnancy_supervi…
joehcollins Dec 2, 2024
efca3d8
Added new function to determine whether an intervention can be delive…
joehcollins Dec 2, 2024
5bbd1f3
Added new function to determine whether updates to labour.py to use t…
joehcollins Dec 2, 2024
a89a034
Added new function to determine whether updates to newborn_outcomes.p…
joehcollins Dec 2, 2024
cff9142
fixes to exsisting tests
joehcollins Dec 2, 2024
25c95f0
new tests to check new analysis function
joehcollins Dec 2, 2024
24dc669
linitng
joehcollins Dec 2, 2024
2f15618
adding mnh_cohort_module.py and associated test files, resource files…
joehcollins Dec 2, 2024
f659d98
fixes to prevent code crashing when using female only pop
joehcollins Dec 2, 2024
d12b3bc
analysis scripts
joehcollins Dec 2, 2024
a232152
update ResourceFile_Improved_Healthsystem_And_Healthcare_Seeking.xlsx…
joehcollins Dec 2, 2024
05ce8ee
Merge branch 'jcollins/mnh_modules_update_intervention_analysis_dec24…
joehcollins Dec 2, 2024
1d42d4f
update to scenario file
joehcollins Dec 2, 2024
0a0574e
update to scenario file
joehcollins Dec 2, 2024
d31d3f5
update to scenario file. fix to hiv
joehcollins Dec 4, 2024
a0a9c22
update to scenario file. fix to hiv
joehcollins Dec 4, 2024
4fc7559
updated scenario file
joehcollins Dec 5, 2024
209ed40
updated analysis file
joehcollins Dec 6, 2024
efe3edb
updated analysis file
joehcollins Dec 9, 2024
6cb3627
Merge branch 'master' into jcollins/pregnancy_cohort_model_dec24
joehcollins Dec 11, 2024
73d1027
added functionality to check coverage of interventions
joehcollins Dec 12, 2024
e932fbf
Merge branch 'master' into jcollins/pregnancy_cohort_model_dec24
joehcollins Dec 12, 2024
eab5710
analysis script
joehcollins Dec 12, 2024
2711704
analysis script
joehcollins Dec 12, 2024
cf70594
analysis script
joehcollins Dec 20, 2024
cf82a84
Make `setuptools-scm` look for versions only in v[digit] prefixed tags
matt-graham Jan 7, 2025
6f151ca
analysis script
joehcollins Jan 7, 2025
2287a02
Merge remote-tracking branch 'origin/mmg/setuptools-scm-tag-fix' into…
joehcollins Jan 7, 2025
f4a45cd
update resource files
joehcollins Jan 9, 2025
f4e04cf
update resource files
joehcollins Jan 9, 2025
e95b670
update resource files
joehcollins Jan 10, 2025
81c8c8f
update analysis files
joehcollins Jan 13, 2025
b89d726
updates to cons to increase baseline int availability
joehcollins Jan 13, 2025
16b7ea9
updates to cons to increase baseline int availability
joehcollins Jan 13, 2025
8b3e0c0
updates to cons to increase baseline int availability
joehcollins Jan 17, 2025
9bbf67d
updates to cons to increase baseline int availability
joehcollins Jan 17, 2025
6af1603
Merge branch 'master' into jcollins/pregnancy_cohort_model_dec24
joehcollins Jan 17, 2025
075f65a
update to scenario file
joehcollins Jan 17, 2025
89b71eb
calibration update
joehcollins Jan 20, 2025
b10ca6b
calibration update
joehcollins Jan 21, 2025
b7c20f1
update to script
joehcollins Jan 22, 2025
69918cc
update to script
joehcollins Jan 25, 2025
b45c25c
update to script
joehcollins Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions resources/ResourceFile_AbortionAndMiscarriage.xlsx

This file was deleted.

3 changes: 0 additions & 3 deletions resources/ResourceFile_HypertensiveDisordersOfPregnancy.xlsx

This file was deleted.

3 changes: 3 additions & 0 deletions resources/ResourceFile_LabourSkilledBirthAttendance.xlsx
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions resources/ResourceFile_PregnancyCohort.xlsx
Git LFS file not shown
3 changes: 3 additions & 0 deletions resources/ResourceFile_PregnancySupervisor.xlsx
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import numpy as np
import pandas as pd

from pathlib import Path

from tlo import Date, logging
from tlo.methods import mnh_cohort_module
from tlo.methods.fullmodel import fullmodel
from tlo.scenario import BaseScenario


class BaselineScenario(BaseScenario):
def __init__(self):
super().__init__()
self.seed = 562661
self.start_date = Date(2024, 1, 1)
self.end_date = Date(2025, 1, 2)
self.pop_size = 40_000
self.number_of_draws =6
self.runs_per_draw = 60

def log_configuration(self):
return {
'filename': 'block_intervention_big_run', 'directory': './outputs',
"custom_levels": {
"*": logging.WARNING,
"tlo.methods.demography": logging.INFO,
"tlo.methods.demography.detail": logging.INFO,
"tlo.methods.contraception": logging.INFO,
"tlo.methods.healthsystem.summary": logging.INFO,
"tlo.methods.healthburden": logging.INFO,
"tlo.methods.labour": logging.INFO,
"tlo.methods.labour.detail": logging.INFO,
"tlo.methods.newborn_outcomes": logging.INFO,
"tlo.methods.care_of_women_during_pregnancy": logging.INFO,
"tlo.methods.pregnancy_supervisor": logging.INFO,
"tlo.methods.postnatal_supervisor": logging.INFO,
}
}

def modules(self):
return [*fullmodel(resourcefilepath=self.resources,
module_kwargs={'Schisto': {'mda_execute': False}}),
mnh_cohort_module.MaternalNewbornHealthCohort(resourcefilepath=self.resources)]

def draw_parameters(self, draw_number, rng):

# if draw_number == 0:
# return {'PregnancySupervisor': {
# 'analysis_year': 2024}}
#
# else:
interventions_for_analysis = ['iron_folic_acid', 'iron_folic_acid',
'post_abortion_care_core', 'post_abortion_care_core',
'ectopic_pregnancy_treatment', 'ectopic_pregnancy_treatment']

avail_for_draw = [0.0, 1.0,
0.0, 1.0,
0.0, 1.0,
]

return {'PregnancySupervisor': {
'analysis_year': 2024,
'interventions_analysis': True,
'interventions_under_analysis': [interventions_for_analysis[draw_number]],
'intervention_analysis_availability': avail_for_draw[draw_number]}}

if __name__ == '__main__':
from tlo.cli import scenario_run
scenario_run([__file__])
Loading
Loading