Derivation
variable: dpt3date (table[s]: all_vaccination_records [derived table])
variable: birth_date (table[s]: all_vaccination_records [derived table])
*for DPT3, DPTHH3, PCV3 and P3: problem if vacc date is less than 3 weeks, or more than 6 weeks after second dose (supposed to be 1 month after second dose)
if "`vacc'"=="dpt3" replace `vacc'Sprob=1 if (dpt3date<birth_date | dpt3date-dpt2date<21 | dpt3date-dpt2date>42 | dpt2date==.) & dpt3date~=. & birth_date~=.