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

Maternal/Newborn health cohort model #1320

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

joehcollins
Copy link
Collaborator

This is the draft PR for development of the MNH cohort model for upcoming analyses/calibration

@tamuri tamuri added this to In progress in PR priorities Jun 19, 2024
@joehcollins
Copy link
Collaborator Author

joehcollins commented Jun 26, 2024

@tbhallett @matt-graham @tamuri - I'm trying to set up some functionality for the model to be able to run with a cohort of only pregnant women. I've generated a dataframe using a 100k full model run of the properties of all women at pregnancy onset for the simulation. I am using the properties of the women who became pregnant in 2024 to overlap the properties of those within the simulation at baseline.

I've managed to do this in a hacky way (see mnh_cohort_module.py) which works in practice but there are a couple of issues:

  1. This only works when I put the logic in initialise_population and ensure the cohort module runs first as there are a number of modules who schedule HSIs etc off the initial population.props within initialise_simulation - theres probably a way around this with dependencies/or something cleverer (see below)?
  2. A more pressing issue - the new class PatientDetails in population.py is retaining the old version of the dataframe after the dataframe has been updated with the details of the pregnancy cohort. This is causing issues with generic HSIs being scheduled based on details which are different from this class to the real dataframe. If you run test_mnh_cohort.py on this branch you'll see what I mean r.e. RTI when debugging.

When you have some time coming up I would love to discuss an alternative approach than the one i'm using now which is maybe neater/cleaner and could avoid some of these issues. I'll keep thinking in the mean time!

@joehcollins
Copy link
Collaborator Author

(@mnjowe @thewati FYI)

@mnjowe
Copy link
Collaborator

mnjowe commented Jun 27, 2024 via email

@joehcollins
Copy link
Collaborator Author

@matt-graham @tamuri - Tim mentioned you were thinking more on how best to approach this? Would be great to catch up to see if I can help at all

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

Successfully merging this pull request may close these issues.

None yet

2 participants