Xin hpv infection process#1860
Conversation
…s, and link to HIV module
…s, and link to HIV module
| Types.REAL, | ||
| "Relative risk for HPV acquisition among HIV positive people not on ART", | ||
| ), | ||
| "rr_hpv_hiv_art_unsuppressed": Parameter( |
There was a problem hiding this comment.
is there strong evidence that this value is different to rr_hpb_no_art? If not, then just use the same parameter for both untreated and treated but not virally suppressed
| Types.REAL, | ||
| "Rate ratio for HPV clearance among PLWH not on ART", | ||
| ), | ||
| "rr_clear_hiv_art_unsuppressed": Parameter( |
There was a problem hiding this comment.
as above, would this not be the same value for untreated?
tdm32
left a comment
There was a problem hiding this comment.
@Liuxinac I've added some comments so please have a look through and let me know anything you want to discuss further. It looks great so far and when you've finished the tests, this will be good confirmation that all is working as expected.
| } | ||
|
|
||
| PROPERTIES = { | ||
| 'hp_is_infected': Property( |
There was a problem hiding this comment.
I don't think you need this property as well as the 3 below
| Types.DATE, 'Date of infection of hr2'), | ||
| 'hp_date_infected_hr3': Property( | ||
| Types.DATE, 'Date of infection of hr3'), | ||
| 'hp_date_first_infected': Property( |
There was a problem hiding this comment.
Instead of this property, you can read the earliest start date from the 3 properties above
| 'hp_persistent_hr3': Property( | ||
| Types.BOOL, 'Persistent hr3 infection, duration >= 12 months'), | ||
|
|
||
| # "va_hpv": Property(Types.INT, "number of doses of hpv vaccine received"), |
There was a problem hiding this comment.
I assume these are here as a reminder for useful properties created by other modules?
| Types.INT, 'Duration for current hr2 infection'), | ||
| 'hp_duration_hr3': Property( | ||
| Types.INT, 'Duration for current hr3 infection'), | ||
| 'hp_duration_all_clear': Property( |
There was a problem hiding this comment.
I'm not sure I see the use for this property?
| u = self.rng.random(size=len(eligible)) | ||
| infected_this_group = eligible[u < p_init] | ||
|
|
||
| for person_id in infected_this_group: |
There was a problem hiding this comment.
you could remove this loop, indexing properties using df.loc[infected_in_this_group,...] and creating an array of previous infection dates with size=infected_in_this_group etc
| df.at[child_id, 'hp_persistent_hr2'] = False | ||
| df.at[child_id, 'hp_persistent_hr3'] = False | ||
|
|
||
| def report_daly_values(self): |
There was a problem hiding this comment.
todo - look up DALY values associated with HPV infection (if any)
| if len(eligible) == 0: | ||
| return | ||
|
|
||
| # 2. self-clearance |
There was a problem hiding this comment.
this feels like a very inefficient way to do this, given the properties for each group, you could do a sweep of all those infected with each group for a certain length of time then determine whether they are cleared or not...?
| else: | ||
| continue | ||
|
|
||
| my_age_group = module._get_age_group(df.at[person_id,'age_years']) |
There was a problem hiding this comment.
should this be at the top of this class? You use it before this point (line 668) so it will be using the age group from 6 months ago
| # prev_female[group] = female_group_inf / len(female_idx) if len(female_idx) > 0 else 0 | ||
|
|
||
| # 4. new infection | ||
| interval_years = 0.5 |
There was a problem hiding this comment.
try to avoid hard-coding, if you change the frequency of the event this will no longer be correct
| module = self.module | ||
|
|
||
| eligible = df.index[df.is_alive & (df.age_years >= 15)] | ||
| log_data = { |
There was a problem hiding this comment.
the logger will automatically output the date so this is not needed
No description provided.