Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 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
cf7b202
update to script
joehcollins Feb 11, 2025
c053929
update to script
joehcollins Feb 25, 2025
7ba2244
update to script
joehcollins Apr 8, 2025
c302f1d
update to script
joehcollins Apr 9, 2025
32bdfba
update to script
joehcollins Apr 9, 2025
05d909d
update to script
joehcollins Apr 15, 2025
df94c15
update to script
joehcollins Apr 15, 2025
e0ffadb
Merge branch 'master' into jcollins/pregnancy_cohort_model_dec24
joehcollins Apr 16, 2025
1496d34
update to script
joehcollins Apr 16, 2025
933f942
updates to service_integration module
joehcollins Apr 30, 2025
1e44841
updates to service_integration module
joehcollins May 1, 2025
6d42502
fix to test_analysis.py
joehcollins May 1, 2025
f8c6f47
linting
joehcollins May 1, 2025
bf8fed0
linting
joehcollins May 1, 2025
59ce016
results['mat_deaths']['crude'][0]
joehcollins May 6, 2025
7d69037
update to scenario file
joehcollins May 8, 2025
7f992ed
update analysis
joehcollins May 12, 2025
62ff3bf
merged in master
joehcollins Sep 24, 2025
da9e671
Merge branch 'master' into jcollins/pregnancy_cohort_model_dec24
joehcollins Sep 25, 2025
5a0f349
fixing failed tests
joehcollins Sep 25, 2025
d670bc0
fixing failed tests
joehcollins Sep 26, 2025
436f84f
update scenario file
joehcollins Sep 26, 2025
f3280e9
updated pregnancies
joehcollins Sep 29, 2025
a919af2
fixed fail tests
joehcollins Sep 29, 2025
83e37a6
new resource file
joehcollins Sep 29, 2025
da51cc6
update scenario file
joehcollins Sep 29, 2025
d5cf2ec
update scenario file
joehcollins Oct 2, 2025
2daf9f4
Merge branch 'master' into jcollins/pregnancy_cohort_jan26
joehcollins Jan 26, 2026
60baec6
new functionality to prevent crashing when master is merged in
joehcollins Jan 26, 2026
be6f841
new scenario file
joehcollins Feb 11, 2026
578c0bd
Merge branch 'master' into jcollins/pregnancy_cohort_jan26
joehcollins Feb 11, 2026
d79e9b6
updates to intevention function
joehcollins Feb 13, 2026
c03ba1e
updates to intevention function
joehcollins Feb 13, 2026
7237b07
fix to error coming from new cons logging and adding new test
joehcollins Feb 16, 2026
f15fdad
fix scenario file error
joehcollins Feb 18, 2026
8396bc8
fix scenario file error
joehcollins Feb 23, 2026
5a6758c
add CSV files
joehcollins Feb 23, 2026
d5bb04d
remove xlsx files
joehcollins Feb 26, 2026
0fbb809
update
joehcollins Feb 26, 2026
eb2f4e4
update
joehcollins Feb 26, 2026
79ddfa7
update name of resource file
joehcollins Feb 26, 2026
63dcb04
update name of resource file
joehcollins Feb 26, 2026
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
13,197 changes: 13,197 additions & 0 deletions resources/ResourceFile_MaternalCohort/ResourceFile_All2024PregnanciesCohortModel.csv

Large diffs are not rendered by default.

13,741 changes: 13,741 additions & 0 deletions resources/ResourceFile_MaternalCohort/ResourceFile_All2025PregnanciesCohortModel.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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):
"""Scenario for cohort model"""
def __init__(self):
super().__init__()
self.seed = 790213
self.start_date = Date(2025, 1, 1)
self.end_date = Date(2026, 1, 2)
self.pop_size = 15_000
self.number_of_draws = 1
self.runs_per_draw = 20

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(module_kwargs={'Schisto': {'mda_execute': False}}),
mnh_cohort_module.MaternalNewbornHealthCohort()]

def draw_parameters(self, draw_number, rng):
return {}

# if draw_number == 0:
# return {'PregnancySupervisor': {
# 'analysis_year': 2024}}
#
# else:
# interventions_for_analysis = ['blood_transfusion', 'blood_transfusion',
# 'anti_htn_mgso4', 'anti_htn_mgso4',
# 'post_abortion_care_core', 'post_abortion_care_core']
#
# 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