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

Starting PrEP usage #204

Merged
merged 22 commits into from
Oct 17, 2024
Merged

Starting PrEP usage #204

merged 22 commits into from
Oct 17, 2024

Conversation

pineapple-cat
Copy link
Collaborator

@pineapple-cat pineapple-cat commented Sep 23, 2024

Addresses #205.

@pineapple-cat pineapple-cat linked an issue Sep 23, 2024 that may be closed by this pull request
@pineapple-cat pineapple-cat removed a link to an issue Oct 8, 2024
@pineapple-cat pineapple-cat linked an issue Oct 8, 2024 that may be closed by this pull request
@pineapple-cat pineapple-cat changed the title PrEP usage Starting PrEP usage Oct 8, 2024
@pineapple-cat pineapple-cat marked this pull request as ready for review October 8, 2024 10:56
src/hivpy/prep.py Outdated Show resolved Hide resolved
src/hivpy/prep.py Show resolved Hide resolved
src/hivpy/prep.py Outdated Show resolved Hide resolved
src/hivpy/prep.py Outdated Show resolved Hide resolved
src/tests/test_prep.py Outdated Show resolved Hide resolved
@mmcleod89
Copy link
Collaborator

@andrew-phillips-1
I think we're having a difficult time interpreting something in the SAS code and therefore making it clear in the python code.
The line in question is:
if prep_any_ever ne 1 and tested=1 and (hiv=0 or (hiv=1 and unisensprep > eff_sens_vct)) then do;
(currently 5166 in the SAS code on the main branch)

unisensprep is just a random number generated
eff_sens_vct appears to be a test sensitivity based on what test is available

What I'm confused about is that it appears to be modelling false negatives using a random variable, but don't false negatives already appear in the diagnosis part of the simulation? If we test all the HIV+ people who are selected for testing in a given time step, then the people who get diagnosed will be true positives, and the people who don't will be false negatives. Why is this code separate, is it modelling something different? Can this lead to people who are e.g. HIV+, get tested, get a (false) negative result, and still don't meet the criterion unisensprep > eff_sens_vct, and how would we interpret these people?

Is this modelling a separate round of testing i.e. testing before starting prep separately (and possibly in addition to) other forms of testing? (Although it doesn't appear to lead to diagnosis?)

@andrew-phillips-1
Copy link

Thanks @mmcleod89 @pineapple-cat I will try to have a think about this before our call tomorrow. I've also let Jenny and Loveleen know.

@andrew-phillips-1
Copy link

I think @mmcleod89 @pineapple-cat that this code is because the person has just tested in this period so we have not had a chance to get to the diagnosis part of the code. So for this test we need to consider that it could be a false negative before PrEP can be started.

(The fact that we are not using the same random draw when lower down we are seeing whether the person is diagnosed is not quite right though I think and it would be good to have that working in Python version.)

Am I misunderstanding ?

@LoveleenB-M @jennifersmith203

Comment on lines +133 to +134
# FIXME: this function may be removed if there are no issues with
# updating PrEP after HIV diagnosis during population evolution
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Finding this out would include testing multiple modules together; where would it make the most sense to put this test?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a good question; and it's tricky to say right now because we're not sure what we would need to test yet to be able to figure this out. It might be possible to define some integration tests in a file of their own if we can say definitively what some behaviour of the simulation as a whole should look like when working together.

Copy link
Collaborator

@mmcleod89 mmcleod89 left a comment

Choose a reason for hiding this comment

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

Looks good! We will need to look into updating CI to fix the test issue

@mmcleod89 mmcleod89 merged commit 16f724e into development Oct 17, 2024
4 of 6 checks passed
@pineapple-cat pineapple-cat deleted the prep-usage branch November 1, 2024 19:08
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.

Starting PrEP
3 participants