Vaccination campaign
VaccinationCampaign
Defines a campaign to vaccinate a group of people in a given time span and with a given vaccine
Source code in june/epidemiology/vaccines/vaccination_campaign.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
__init__(vaccine, days_to_next_dose, dose_numbers=[0, 1], start_time='2100-01-01', end_time='2100-01-02', group_by='age', group_type='50-100', group_coverage=1.0, last_dose_type=None)
init.
Parameters
vaccine : Vaccine vaccine to give out days_to_next_dose : List[int] days to wait from the moment a person is vaccinated to their next dose. Should have same length as dose_numbers dose_numbers : List[int] what doses to give out. Example: dose_numbers = [0,1] would give out first and second dose, whereas dose_numbers = [2] would only give a third dose start_time : str date at which to start vaccinating people end_time : str date at which to stop vaccinating people group_by : str defines what group to vaccinate. Examples: 'age', 'sex', 'residence', 'primary_activity' group_type : str from the group defined by group_by, what people to vaccinate. Examples: if group_by = 'age' -> group_type = '20-40' would vaccinate people aged between 20 and 40 if group_by = 'residence' -> group_type = 'carehome' would vaccinate people living in care homes. group_coverage : float percentage of the eligible group to vaccinate. Must be between 0. and 1. last_dose_type : Optional[str] if not starting with a first dose (dose_numbers[0] = 0), whether to vaccinate only people whose previous vaccines where of a certain type.
Source code in june/epidemiology/vaccines/vaccination_campaign.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
daily_vaccination_probability(days_passed)
daily_vaccination_probability.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
days_passed
|
int
|
days_passed |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
has_right_dosage(person)
has_right_dosage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
Person
|
person |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
is_active(date)
Returns true if the policy is active, false otherwise
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date
|
datetime
|
date to check |
required |
Source code in june/epidemiology/vaccines/vaccination_campaign.py
121 122 123 124 125 126 127 128 |
|
is_target_group(person)
is_target_group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
Person
|
person |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
process_group_description(group_by, group_type)
process_group_description.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
group_by
|
str
|
group_by |
required |
group_type
|
str
|
group_type |
required |
Returns:
Type | Description |
---|---|
Tuple[str]
|
Tuple[str]: |
Source code in june/epidemiology/vaccines/vaccination_campaign.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
should_be_vaccinated(person)
should_be_vaccinated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
Person
|
person |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
193 194 195 196 197 198 199 200 201 202 203 |
|
vaccinate(person, date, record=None)
vaccinate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
Person
|
person |
required |
date
|
datetime
|
date |
required |
record
|
Optional[Record]
|
record (Default value = None) |
None
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
|
VaccinationCampaigns
VaccinationCampaigns.
Source code in june/epidemiology/vaccines/vaccination_campaign.py
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|
__init__(vaccination_campaigns)
init.
Parameters
vaccination_campaigns : List[VaccinationCampaign] vaccination_campaigns
Source code in june/epidemiology/vaccines/vaccination_campaign.py
249 250 251 252 253 254 255 256 257 |
|
__iter__()
iter.
Source code in june/epidemiology/vaccines/vaccination_campaign.py
285 286 287 288 289 |
|
apply(person, date, record=None)
apply.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
person
|
Person
|
person |
required |
date
|
datetime
|
date |
required |
record
|
Optional[Record]
|
record (Default value = None) |
None
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
|
apply_past_campaigns(people, date, record=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
people
|
|
required | |
date
|
datetime
|
|
required |
record
|
Optional[Record]
|
(Default value = None) |
None
|
Source code in june/epidemiology/vaccines/vaccination_campaign.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
|
collect_all_dates_in_past(current_date)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_date
|
datetime
|
|
required |
Source code in june/epidemiology/vaccines/vaccination_campaign.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
|
from_disease_config(disease_config)
classmethod
from_config.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
disease_config
|
DiseaseConfig
|
|
required |
Source code in june/epidemiology/vaccines/vaccination_campaign.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
|
get_active(date)
get_active.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date
|
datetime
|
date |
required |
Returns:
Type | Description |
---|---|
List[VaccinationCampaign]
|
List[VaccinationCampaign]: |
Source code in june/epidemiology/vaccines/vaccination_campaign.py
291 292 293 294 295 296 297 298 299 300 301 |
|