"incidence": 0.01, }, ), ############################################################################### # COVID VACCINATION ############################################################################### # any COVID vaccination (first dose) covid_vacc_date=patients.with_tpp_vaccination_record( target_disease_matches="SARS-2 CORONAVIRUS", on_or_after="2020-12-01", # check all december to date find_first_match_in_period=True, returning="date", date_format="YYYY-MM-DD", return_expectations={ "date": { "earliest": "2020-12-08", # first vaccine administered on the 8/12 "latest": "2021-01-31", }, "incidence": 0.4 }, ), # SECOND DOSE COVID VACCINATION covid_vacc_second_dose_date=patients.with_tpp_vaccination_record( target_disease_matches="SARS-2 CORONAVIRUS", on_or_after="covid_vacc_date + 19 days", find_first_match_in_period=True, returning="date", date_format="YYYY-MM-DD", return_expectations={
"ratios": { "R": 0.3, "O": 0.1, "RO": 0.2, "M": 0.4 } } }, ), # FLU VACCINATION STATUS flu_vaccine_tpp_table=patients.with_tpp_vaccination_record( target_disease_matches="INFLUENZA", between=["2019-09-01", "2020-02-29"], # current flu season returning="date", find_first_match_in_period=True, return_expectations={ "date": { "earliest": "2019-09-01", "latest": "2020-02-29" } }, ), flu_vaccine_med=patients.with_these_medications( flu_med_codes, between=["2019-09-01", "2020-02-29"], # current flu season returning="date", find_last_match_in_period=True, include_month=True, include_day=True, return_expectations={ "date": { "earliest": "2019-09-01",
"date": { "earliest": "2020-10-20" }, "incidence": 0.2 }, ), # Any COVID vaccination (first dose) covid_vacc_date=patients.with_tpp_vaccination_record( target_disease_matches="SARS-2 CORONAVIRUS", on_or_after="2020-12-01", # check all december to date find_first_match_in_period=True, returning="date", date_format="YYYY-MM-DD", return_expectations={ "date": { "earliest": "2020-12-08", # first vaccine administered on the 8/12 "latest": "2021-01-31", }, "incidence": 0.1 }, ), ### COVID test positive (SGSS) first_pos_test_sgss=patients.with_test_result_in_sgss( pathogen="SARS-CoV-2", test_result="positive", find_first_match_in_period=True, returning="date", date_format="YYYY-MM-DD",