Derivation
variable: p2date (table[s]: all_vaccination_records [derived table])
variable: birth_date (table[s]: all_vaccination_records [derived table])
*for DPT2, HH2, PCV2, RV2 and P2: problem if vacc date is less than 3 weeks, or more than 6 weeks after first dose (supposed to be 1 month after first dose)
if "`vacc'"=="p2" replace `vacc'Sprob=1 if (p2date<birth_date | p2date-p1date<21 | p2date-p1date>42 | p1date==.) & p2date~=. & birth_date~=.