-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cervical cancer #1287
base: master
Are you sure you want to change the base?
Cervical cancer #1287
Conversation
…ses with proper structured manner as mixin, also remove unecessary input parameters other than self and person_id
…sed on other adult cancers
… the the chemo used
per @mmsuarezcosta, this is now ready for review. |
.when(2, p['rr_hpv_vaccinated']), | ||
Predictor('age_years', conditions_are_mutually_exclusive=True) | ||
.when('.between(0,15)', 0.0) | ||
.when('.between(50,110)', p['rr_hpv_age50plus']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this was reverted to .when('.between(50,110)', p['rr_hpv_age50plus']),
? It was suggested to have it as .when('>50'),p['rr_hpv_age50plus'])
earlier over here
# Current counts, total | ||
out.update({ | ||
f'total_{k}': v for k, v in df.loc[df.is_alive & (df['sex'] == 'F') & | ||
(df['age_years'] > p['min_age_hpv'])].ce_hpv_cc_status.value_counts().items()}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(df['age_years'] > p['min_age_hpv'])].ce_hpv_cc_status.value_counts().items()}) | |
df_alive_females = df.loc[df.is_alive & (df['sex'] == 'F') & (df['age_years'] > p['min_age_hpv'])] | |
out.update({f'total_{k}': v for k, v in df_alive_females.ce_hpv_cc_status.value_counts().items()}) |
There is a repetition of this line of code here df.loc[df.is_alive & (df['sex'] == 'F') & (df['age_years'] > p['min_age_hpv'])]
as well as at lines 1581 and 1586. Would probably be more efficient if these conditions are not repeated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mmsuarezcosta and Andrew for this great work. Find below my comments for your consideration. I have only managed to look into cervical cancer main module. I hope to provide my feedback on the tests tomorrow. Thanks
"prob_cure_stage1": Parameter( | ||
Types.REAL, | ||
"probability of cure if treated in stage 1 cervical cancer", | ||
), | ||
"prob_cure_stage2a": Parameter( | ||
Types.REAL, | ||
"probability of cure if treated in stage 1 cervical cancer", | ||
), | ||
"prob_cure_stage2b": Parameter( | ||
Types.REAL, | ||
"probability of cure if treated in stage 1 cervical cancer", | ||
), | ||
"prob_cure_stage3": Parameter( | ||
Types.REAL, | ||
"probability of cure if treated in stage 1 cervical cancer", | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description looks the same. should it be like that?
Types.DATE, | ||
"date of first receiving palliative care (pd.NaT is never had palliative care)" | ||
), | ||
"ce_ever_diagnosed": Property( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been used in the code as a bool. I suggest changing the TYPE here from date to Bool
"ce_date_death": Property( | ||
Types.DATE, | ||
"date of cervical cancer death" | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this property here and capture date of death in demography.
df.loc[df.is_alive, "ce_selected_for_xpert_this_month"] = False | ||
df.loc[df.is_alive, "ce_biopsy"] = False | ||
df.loc[df.is_alive, "ce_ever_screened"] = False | ||
df.loc[df.is_alive, "ce_ever_diagnosed"] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had a feeling that this should be a bool. Can you please update ce_ever_diagnosed
in properties section?. It should be of type bool
not date
?
# this was not assigned here at outset because baseline value of hv_inf was not accessible - it is assigned | ||
# at start of main polling event below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still have this issue? Does adding as a dependency HIV module or initialising it before cervical cancer still not making available baseline value of hv_inf
?
out.update({ | ||
'total_males': len(df[df.is_alive & (df['sex'] == 'M')])}) | ||
out.update({ | ||
'total_dead': len(df[df['is_alive'].eq(False)])}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'total_dead': len(df[df['is_alive'].eq(False)])}) | |
'total_dead': len(~df['is_alive'])}) |
|
||
df['rounded_decimal_year'] = rounded_decimal_year | ||
|
||
date_1_year_ago = self.sim.date - pd.DateOffset(days=365) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date_1_year_ago = self.sim.date - pd.DateOffset(days=365) | |
date_1_year_ago = self.sim.date - pd.DateOffset(years=1) |
I think years/months is better since it takes into account leap years?
out.update({"n_xpert_past_year": n_xpert_past_year}) | ||
|
||
|
||
pop = len(df[df.is_alive]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pop = len(df[df.is_alive]) | |
pop = len(df.is_alive) |
# todo: | ||
# ? move to using the logger: | ||
# i.e. logger.info(key='cervical_cancer_stats_every_month', description='XX', data=out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is done then the below commented code should be deleted?
# selected_columns = ['sex', 'age_years', 'is_alive'] | ||
# pd.set_option('display.max_rows', None) | ||
# print(df[selected_columns]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this code if its not need anymore?
Thanks for the detailed look and feedback, will review and update |
Here's a first draft of this module. I need to do another search to try to find additional data for calibration.
I couldn't upload the draft write as it was asking me to use the command line and Git LFS.