<?xml version='1.0' encoding='UTF-8'?>
<codeBook version="1.2.2" ID="MWI-MEIRU-VACCINATION-2002-v1" xml-lang="en" xmlns="http://www.icpsr.umich.edu/DDI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.icpsr.umich.edu/DDI http://www.icpsr.umich.edu/DDI/Version1-2-2.xsd">
  <docDscr>
    <citation>
      <titlStmt>
        <titl>
          combined_vaccination_data
        </titl>
        <IDNo>
          MWI-MEIRU-VACCINATION-2002-v1
        </IDNo>
      </titlStmt>
      <prodStmt>
        <producer abbr="MEIRU" role="Agency">
          Malawi Epidemiology and Intervention Research Unit
        </producer>
        <producer abbr="EM" affiliation="LSHTM and MEIRU" role="Production of the documentation used to create this DDI document.">
          Estelle McLean
        </producer>
        <producer abbr="CK" affiliation="MEIRU" role="Data documentalist">
          Chifundo Kanjala
        </producer>
        <producer abbr="JS" affiliation="LSHTM and MEIRU" role="Production of Data dictionaries">
          Jacky Saul
        </producer>
        <producer abbr="KB" affiliation="LSHTM and MEIRU" role="Production of Data dictionaries">
          Kieth Branson
        </producer>
        <producer abbr="JK" affiliation="MEIRU" role="Metadata entry ">
          Joseph Kamanga
        </producer>
        <producer abbr="DN" affiliation="MEIRU" role="Metadata entry and editing">
          Dominic Nzundah
        </producer>
        <prodDate date="2020-07-21">
          2020-07-21
        </prodDate>
        <software version="4.0.10" date="2018-05-02">
          Nesstar Publisher
        </software>
      </prodStmt>
      <verStmt>
        <version>
          version 1 (July, 2020)
        </version>
      </verStmt>
    </citation>
  </docDscr>
  <stdyDscr>
    <citation>
      <titlStmt>
        <titl>
          All vaccination data
        </titl>
        <IDNo>
          MWI-MEIRU-VACCINATION-2002-v1
        </IDNo>
      </titlStmt>
      <rspStmt>
        <AuthEnty affiliation="MEIRU, London School of Hygiene and Tropical Medicine (LSHTM)">
          Professor Amelia (Mia) Crampin
        </AuthEnty>
      </rspStmt>
      <prodStmt>
        <software version="4.0.10" date="2018-05-02">
          Nesstar Publisher
        </software>
      </prodStmt>
      <serStmt>
        <serName>
          Sample Survey
        </serName>
      </serStmt>
      <verStmt>
        <version date="2020-07-21">
          <![CDATA[v1:  Edited data, first version, for internal use only]]>
        </version>
      </verStmt>
    </citation>
    <stdyInfo>
      <abstract>
        Vaccination histories have been collected on children aged under 5 repeatedly and in multiple studies in Karonga. This file includes a dataset which contains all data from all studies which has been harmonisaed and appended together, and one which has been processed further to show the 'best' record for each child.
      </abstract>
      <sumDscr>
        <nation abbr="MWI">
          Malawi
        </nation>
        <anlyUnit>
          Individual
        </anlyUnit>
      </sumDscr>
    </stdyInfo>
    <method>
      <dataColl>
        <dataCollector abbr="MEIRU">
          Malawi Epidemiology and Intervention Research Unit
        </dataCollector>
        <collMode>
          Face-to-face [f2f]
        </collMode>
        <sources/>
      </dataColl>
    </method>
    <dataAccs>
      <setAvail>
        <origArch>
          MEIRU
        </origArch>
      </setAvail>
      <useStmt>
        <contact>
          Malawi Epidemiology and Intervention Research Unit
        </contact>
        <conditions>
          <![CDATA[This data is made available for licensed access under the following conditions:

1. Data and other material provided by MEIRU will not be redistributed or sold to other individuals, institutions or organisations without MEIRU's written agreement.

2. In the case of multi-centre datasets, data originating from a single contributing member centre of the collaboration may not be analysed or reported on in isolation without the express permission of the member centre concerned.

3. No attempt will be made to re-identify respondents, and there will be no use of the identity of any person or establishment discovered inadvertently. Any such discovery will be reported immediately to MEIRU.

4. No attempt will be made to produce links between datasets provided by MEIRU or between MEIRU data and other datasets that could identify individuals.

5. Any books, articles, conference papers, theses, dissertations, reports or other publications employing data obtained from MEIRU will cite the source, in line with the citation requirement provided with the dataset.

6. An electronic copy of all publications based on the requested data will be sent to MEIRU.

7. MEIRU, MEIRU research collaborators and the relevant funding agencies bear no responsibility for the data's use or interpretation or inferences based upon it.]]>
        </conditions>
      </useStmt>
    </dataAccs>
  </stdyDscr>
  <fileDscr ID="F1" URI="combined_vaccination_data.Nesstar?Index=0&amp;Name=all_vaccination_records">
    <fileTxt>
      <fileName>
        all_vaccination_records.NSDstat
      </fileName>
      <fileCont>
        <![CDATA[The do-file combine_vaccination_data first harmonises and appends all data sources which collected data on children's vaccination status in Karonga.	
The vaccinations included are the standard schedule for Malawi:	
BCG	
Diptheria, Pertussis & Tetanus (DPT) 1-3	
Hepatitis B & H. influenzae type b (HH) 1-3	
Polio (P) 0-3	
Pneumococcal conjugate vaccine (PCV) 1-3	
Rotavirus (RV 1-2)	
Measles 1&2	

The data sources for this dataset are:		
cen_individ    :        Initial baseline survey	
crs_bfup	      :        Follow-up of babies following initial census	
crs_birth	      :        Birth registrations	
crs_cenm	      :       In-migration	
css_sei_all     :       Annual socio-economic survey	
gp_va	     :        Verbal autopsy	
tmt_tmtv	     :        Transmission of M. tb	
ves_vese	     :        Vaccine effectiveness study	

There are some edits to the data as dates where the month is estimated as removed and any which fall before the birth date and the day is known to be estimated are changed to be 1 day after the DOB. Otherwise, beyond harmonising across the datasets, the data are appended together as collected and saved as all_vaccination_records.	
	
In the variable labels (S) indicates that the variable is unchanged from the original source and (D) indicates that it is a 'derived' variable, often using more than one source variable. For both types information on where the data come from and how they are processed is found in the 'Recoding and Derivation' section]]>
      </fileCont>
      <dimensns>
        <caseQnty>
          62863
        </caseQnty>
        <varQnty>
          105
        </varQnty>
      </dimensns>
      <fileType>
        Nesstar 200801
      </fileType>
      <filePlac>
        Malawi Epidemiology and Interventions Research Unit
      </filePlac>
    </fileTxt>
  </fileDscr>
  <fileDscr ID="F2" URI="combined_vaccination_data.Nesstar?Index=1&amp;Name=vacc_data_selected_BEST">
    <fileTxt>
      <fileName>
        vacc_data_selected_BEST.NSDstat
      </fileName>
      <fileCont>
        <![CDATA[As there will be multiple records per child, the data are then reduced to have one line per child with the 'best' record for each vaccination, the criteria used to designate the best record are:		
Vaccination date recorded		
Vaccination date is not before birth date		
Vaccination date fits with normal Malawian vaccination schedule and other vaccines in the series		
The information on the vaccine was taken form the health record		
Where there are multiple records meeting these criteria the earliest record is taken. Where there are none then the criteria are relaxed gradually so for each person the best possible record is taken.		
As sometimes the vaccine is reported as received but no vaccine date is given the earliest interview date when it was reported as received is also included as part of the record.		
This 'best' dataset is saved as vacc_data_selected_BEST.		
		
In the variable labels (S) indicates that the variable is unchanged from the original source and (D) indicates that it is a 'derived' variable, often using more than one source variable. For both types information on where the data come from and how they are processed is found in the 'Recoding and Derivation' section]]>
      </fileCont>
      <dimensns>
        <caseQnty>
          26039
        </caseQnty>
        <varQnty>
          242
        </varQnty>
      </dimensns>
      <fileType>
        Nesstar 200801
      </fileType>
      <filePlac>
        Malawi Epidemiology and Interventions Research Unit
      </filePlac>
    </fileTxt>
  </fileDscr>
  <dataDscr>
    <var ID="V1" name="ident" files="F1" intrvl="discrete">
      <location StartPos="1" EndPos="7" width="7" RecSegNo="1"/>
      <labl>
        Unique identifier (S)
      </labl>
      <sumStat type="vald">
        62863
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Unique identifier]]>
      </txt>
      <codInstr>
        variable: ident (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="character" schema="other"/>
    </var>
    <var ID="V2" name="intdate" files="F1" intrvl="discrete">
      <location StartPos="8" EndPos="17" width="10" RecSegNo="1"/>
      <labl>
        Interview date (D)
      </labl>
      <sumStat type="vald">
        62863
      </sumStat>
      <txt>
        Interview date
      </txt>
      <codInstr>
        <![CDATA[variable: intdate (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: consdate (table[s]: ves_vese)]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V3" name="birth_date" files="F1" intrvl="discrete">
      <location StartPos="18" EndPos="27" width="10" RecSegNo="1"/>
      <labl>
        Date of birth (D)
      </labl>
      <sumStat type="vald">
        62863
      </sumStat>
      <txt>
        <![CDATA[
Date of birth]]>
      </txt>
      <codInstr>
        variable: birth_date (table[s]: gen_identity_clean [derived table])
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V4" name="sex" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="28" EndPos="28" width="1" RecSegNo="1"/>
      <labl>
        Sex (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        62863
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Sex]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          Male
        </labl>
        <catStat type="freq">
          31743
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Female
        </labl>
        <catStat type="freq">
          31120
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <codInstr>
        variable: birth_date (table[s]: gen_identity_clean [derived table])
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V5" name="cardseen" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="29" EndPos="29" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        61357
      </sumStat>
      <sumStat type="invd">
        1506
      </sumStat>
      <txt>
        <![CDATA[
Whether health record seen]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          11009
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          50348
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          1506
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen (table[s]: cen_individ, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: hdoc (table[s]: crs_bfup, crs_birth)
variable: vhdoc (table[s]: gp_va)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V6" name="source" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="30" EndPos="30" width="1" RecSegNo="1"/>
      <labl>
        Source of data (D)
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        62863
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Source of data
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          8998
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3781
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          730
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1409
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          38970
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          7194
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          1284
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          497
        </catStat>
      </catgry>
      <codInstr>
        the source variable is created during the processing of each table
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V7" name="bcgyn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="31" EndPos="31" width="1" RecSegNo="1"/>
      <labl>
        Had BCG vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        62413
      </sumStat>
      <sumStat type="invd">
        450
      </sumStat>
      <txt>
        <![CDATA[	
Had BCG vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1181
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          61232
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          450
        </catStat>
      </catgry>
      <codInstr>
        variable: bcgyn (table[s]: cen_individ, crs_bfup , crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V8" name="bcgyr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="32" EndPos="35" width="4" RecSegNo="1"/>
      <labl>
        Year of BCG vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        45805
      </sumStat>
      <sumStat type="invd">
        17058
      </sumStat>
      <txt>
        <![CDATA[	
Year of BCG vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V9" name="bcgdate" files="F1" intrvl="discrete">
      <location StartPos="36" EndPos="45" width="10" RecSegNo="1"/>
      <labl>
        Date of BCG vaccination (D)
      </labl>
      <sumStat type="vald">
        45779
      </sumStat>
      <txt>
        <![CDATA[
Date of BCG vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgdate (table[s]: cen_individ, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: bgcdate (table[s]: crs_bfup)
variable: birth_date (table[s]: gen_identity_clean [derived table])

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V10" name="bcgdayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="46" EndPos="46" width="1" RecSegNo="1"/>
      <labl>
        Date of BCG vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        33
      </sumStat>
      <sumStat type="invd">
        62830
      </sumStat>
      <txt>
        <![CDATA[
Date of BCG vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: bgcdatex (table[s]: css_sei_all)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V11" name="bcgvc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="47" EndPos="52" width="6" RecSegNo="1"/>
      <labl>
        Health centre of BCG vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        59749
      </sumStat>
      <sumStat type="invd">
        3114
      </sumStat>
      <txt>
        <![CDATA[
Health centre of BCG vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgvc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc1 (table[s]: crs_birth)
variable: vcentre (table[s]: crs_cenm)variable: bcgvc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc1 (table[s]: crs_birth)
variable: vcentre (table[s]: crs_cenm)variable: bcgvc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc1 (table[s]: crs_birth)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V12" name="dpt1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="53" EndPos="53" width="1" RecSegNo="1"/>
      <labl>
        Had DPT1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        55915
      </sumStat>
      <sumStat type="invd">
        6948
      </sumStat>
      <txt>
        <![CDATA[	
Had DPT1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2022
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          53893
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          6948
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt1yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh1yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V13" name="dpt1yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="54" EndPos="57" width="4" RecSegNo="1"/>
      <labl>
        Year of DPT1 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        38823
      </sumStat>
      <sumStat type="invd">
        24040
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V14" name="dpt1date" files="F1" intrvl="discrete">
      <location StartPos="58" EndPos="67" width="10" RecSegNo="1"/>
      <labl>
        Date of DPT1 vaccination (D)
      </labl>
      <sumStat type="vald">
        38807
      </sumStat>
      <txt>
        <![CDATA[	
Date of DPT1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh1date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V15" name="dpt1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="68" EndPos="68" width="1" RecSegNo="1"/>
      <labl>
        Date of DPT1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        20
      </sumStat>
      <sumStat type="invd">
        62843
      </sumStat>
      <txt>
        <![CDATA[	
Date of DPT1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh1datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V16" name="dpt1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="69" EndPos="74" width="6" RecSegNo="1"/>
      <labl>
        Health centre of DPT1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        52149
      </sumStat>
      <sumStat type="invd">
        10714
      </sumStat>
      <txt>
        <![CDATA[	
Health centre of DPT1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh1vc (table[s]: css_sei_all)
variable: vhc2 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V17" name="dpt2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="75" EndPos="75" width="1" RecSegNo="1"/>
      <labl>
        Had DPT2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        54250
      </sumStat>
      <sumStat type="invd">
        8613
      </sumStat>
      <txt>
        <![CDATA[
Had DPT2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3005
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          51245
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          8613
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt2yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh2yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V18" name="dpt2yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="76" EndPos="79" width="4" RecSegNo="1"/>
      <labl>
        Year of DPT2 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        36257
      </sumStat>
      <sumStat type="invd">
        26606
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT2 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V19" name="dpt2date" files="F1" intrvl="discrete">
      <location StartPos="80" EndPos="89" width="10" RecSegNo="1"/>
      <labl>
        Date of DPT2 vaccination (D)
      </labl>
      <sumStat type="vald">
        36238
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh2date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V20" name="dpt2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="90" EndPos="90" width="1" RecSegNo="1"/>
      <labl>
        Date of DPT2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        16
      </sumStat>
      <sumStat type="invd">
        62847
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V21" name="dpt2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="91" EndPos="96" width="6" RecSegNo="1"/>
      <labl>
        Health centre of DPT2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        49435
      </sumStat>
      <sumStat type="invd">
        13428
      </sumStat>
      <txt>
        Health centre of DPT2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh2vc (table[s]: css_sei_all)
variable: vhc3 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V22" name="dpt3yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="97" EndPos="97" width="1" RecSegNo="1"/>
      <labl>
        Had DPT3 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        53261
      </sumStat>
      <sumStat type="invd">
        9602
      </sumStat>
      <txt>
        <![CDATA[
Had DPT3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          4384
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          48877
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          9602
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt3yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh3yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V23" name="dpt3yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="98" EndPos="101" width="4" RecSegNo="1"/>
      <labl>
        Year of DPT3 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2023"/>
      </valrng>
      <sumStat type="vald">
        33978
      </sumStat>
      <sumStat type="invd">
        28885
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT3 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V24" name="dpt3date" files="F1" intrvl="discrete">
      <location StartPos="102" EndPos="111" width="10" RecSegNo="1"/>
      <labl>
        Date of DPT3 vaccination (D)
      </labl>
      <sumStat type="vald">
        33961
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh3date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V25" name="dpt3dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="112" EndPos="112" width="1" RecSegNo="1"/>
      <labl>
        Date of DPT3 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        12
      </sumStat>
      <sumStat type="invd">
        62851
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh3datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V26" name="dpt3vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="113" EndPos="118" width="6" RecSegNo="1"/>
      <labl>
        Health centre of DPT3 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        47102
      </sumStat>
      <sumStat type="invd">
        15761
      </sumStat>
      <txt>
        Health centre of DPT3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm)
variable: dpthh3vc (table[s]: css_sei_all)
variable: vhc4 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V27" name="hh1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="119" EndPos="119" width="1" RecSegNo="1"/>
      <labl>
        Had HH1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        47862
      </sumStat>
      <sumStat type="invd">
        15001
      </sumStat>
      <txt>
        <![CDATA[	
Had HH1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2022
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          45840
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          15001
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh1yn (table[s]: cen_individ, crs_bfup)
variable: dpthh1yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V28" name="hh1yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="120" EndPos="123" width="4" RecSegNo="1"/>
      <labl>
        Year of HH1 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2019"/>
      </valrng>
      <sumStat type="vald">
        30682
      </sumStat>
      <sumStat type="invd">
        32181
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V29" name="hh1date" files="F1" dcml="0" intrvl="contin">
      <location StartPos="124" EndPos="128" width="5" RecSegNo="1"/>
      <labl>
        Date of HH1 vaccination (D)
      </labl>
      <valrng>
        <range min="13689" max="21788"/>
      </valrng>
      <sumStat type="vald">
        30666
      </sumStat>
      <sumStat type="invd">
        32197
      </sumStat>
      <txt>
        <![CDATA[
Date of HH1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1date (table[s]: cen_individ, crs_bfup)
variable: dpthh1date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V30" name="hh1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="129" EndPos="129" width="1" RecSegNo="1"/>
      <labl>
        Date of HH1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        20
      </sumStat>
      <sumStat type="invd">
        62843
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh1datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V31" name="hh1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="130" EndPos="135" width="6" RecSegNo="1"/>
      <labl>
        Health centre of HH1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        44144
      </sumStat>
      <sumStat type="invd">
        18719
      </sumStat>
      <txt>
        <![CDATA[
Health centre of HH1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1vc (table[s]: cen_individ, crs_bfup)
variable: dpthh1vc (table[s]: css_sei_all)
variable: vhc2 (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V32" name="hh2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="136" EndPos="136" width="1" RecSegNo="1"/>
      <labl>
        Had HH2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        47674
      </sumStat>
      <sumStat type="invd">
        15189
      </sumStat>
      <txt>
        <![CDATA[	
Had HH2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3005
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          44669
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          15189
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh2yn (table[s]: cen_individ, crs_bfup)
variable: dpthh2yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V33" name="hh2yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="137" EndPos="140" width="4" RecSegNo="1"/>
      <labl>
        Year of HH2 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2019"/>
      </valrng>
      <sumStat type="vald">
        29621
      </sumStat>
      <sumStat type="invd">
        33242
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH2 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V34" name="hh2date" files="F1" dcml="0" intrvl="contin">
      <location StartPos="141" EndPos="145" width="5" RecSegNo="1"/>
      <labl>
        Date of HH2 vaccination (D)
      </labl>
      <valrng>
        <range min="13787" max="21816"/>
      </valrng>
      <sumStat type="vald">
        29602
      </sumStat>
      <sumStat type="invd">
        33261
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh2date (table[s]: cen_individ, crs_bfup)
variable: dpthh2date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V35" name="hh2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="146" EndPos="146" width="1" RecSegNo="1"/>
      <labl>
        Date of HH2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        16
      </sumStat>
      <sumStat type="invd">
        62847
      </sumStat>
      <txt>
        <![CDATA[
Date of HH2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V36" name="hh2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="147" EndPos="152" width="6" RecSegNo="1"/>
      <labl>
        Health centre of HH2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        42890
      </sumStat>
      <sumStat type="invd">
        19973
      </sumStat>
      <txt>
        Health centre of HH2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: hh2vc (table[s]: cen_individ, crs_bfup)
variable: dpthh2vc (table[s]: css_sei_all)
variable: vhc3 (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V37" name="hh3yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="153" EndPos="153" width="1" RecSegNo="1"/>
      <labl>
        Had HH3 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        47498
      </sumStat>
      <sumStat type="invd">
        15365
      </sumStat>
      <txt>
        <![CDATA[	
Had HH3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          4384
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          43114
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          15365
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh3yn (table[s]: cen_individ, crs_bfup)
variable: dpthh3yn (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V38" name="hh3yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="154" EndPos="157" width="4" RecSegNo="1"/>
      <labl>
        Year of HH3 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2023"/>
      </valrng>
      <sumStat type="vald">
        28155
      </sumStat>
      <sumStat type="invd">
        34708
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH3 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V39" name="hh3date" files="F1" dcml="0" intrvl="contin">
      <location StartPos="158" EndPos="162" width="5" RecSegNo="1"/>
      <labl>
        Date of HH3 vaccination (D)
      </labl>
      <valrng>
        <range min="13815" max="23095"/>
      </valrng>
      <sumStat type="vald">
        28138
      </sumStat>
      <sumStat type="invd">
        34725
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3date (table[s]: cen_individ, crs_bfup)
variable: dpthh3date (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V40" name="hh3dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="163" EndPos="163" width="1" RecSegNo="1"/>
      <labl>
        Date of HH3 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        12
      </sumStat>
      <sumStat type="invd">
        62851
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpthh3datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V41" name="hh3vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="164" EndPos="169" width="6" RecSegNo="1"/>
      <labl>
        Health centre of HH3 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        41367
      </sumStat>
      <sumStat type="invd">
        21496
      </sumStat>
      <txt>
        <![CDATA[
Health centre of HH3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3vc (table[s]: cen_individ, crs_bfup)
variable: dpthh3vc (table[s]: css_sei_all)
variable: vhc4 (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

When variable is collected with DPT & HH together they are split:
foreach var in yn date datex vc {
	forvalues x=1/3 {
		gen dpt`x'`var'=dpthh`x'`var'
		gen hh`x'`var'=dpthh`x'`var'
		drop dpthh`x'`var'
		}
	}]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V42" name="p0yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="170" EndPos="170" width="1" RecSegNo="1"/>
      <labl>
        Had polio0 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        57905
      </sumStat>
      <sumStat type="invd">
        4958
      </sumStat>
      <txt>
        <![CDATA[	
Had polio0 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          11073
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          46832
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4958
        </catStat>
      </catgry>
      <codInstr>
        variable: p0yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V43" name="p0yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="171" EndPos="174" width="4" RecSegNo="1"/>
      <labl>
        Year of polio0 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        31572
      </sumStat>
      <sumStat type="invd">
        31291
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio0 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V44" name="p0date" files="F1" intrvl="discrete">
      <location StartPos="175" EndPos="184" width="10" RecSegNo="1"/>
      <labl>
        Date of polio0 vaccination (D)
      </labl>
      <sumStat type="vald">
        31554
      </sumStat>
      <txt>
        <![CDATA[
Date of polio0 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V45" name="p0dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="185" EndPos="185" width="1" RecSegNo="1"/>
      <labl>
        Date of polio0 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        26
      </sumStat>
      <sumStat type="invd">
        62837
      </sumStat>
      <txt>
        Date of polio0 vaccination is estimated
      </txt>
      <codInstr>
        variable: p0datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V46" name="p0vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="186" EndPos="191" width="6" RecSegNo="1"/>
      <labl>
        Health centre of polio0 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        45708
      </sumStat>
      <sumStat type="invd">
        17155
      </sumStat>
      <txt>
        Health centre of polio0 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p0vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc1 (table[s]: crs_birth)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V47" name="p1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="192" EndPos="192" width="1" RecSegNo="1"/>
      <labl>
        Had polio1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        55803
      </sumStat>
      <sumStat type="invd">
        7060
      </sumStat>
      <txt>
        <![CDATA[
Had polio1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2213
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          53590
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          7060
        </catStat>
      </catgry>
      <codInstr>
        variable: p1yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V48" name="p1yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="193" EndPos="196" width="4" RecSegNo="1"/>
      <labl>
        Year of polio1 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        38549
      </sumStat>
      <sumStat type="invd">
        24314
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V49" name="p1date" files="F1" intrvl="discrete">
      <location StartPos="197" EndPos="206" width="10" RecSegNo="1"/>
      <labl>
        Date of polio1 vaccination (D)
      </labl>
      <sumStat type="vald">
        38532
      </sumStat>
      <txt>
        <![CDATA[
Date of polio1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V50" name="p1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="207" EndPos="207" width="1" RecSegNo="1"/>
      <labl>
        Date of polio1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        16
      </sumStat>
      <sumStat type="invd">
        62847
      </sumStat>
      <txt>
        <![CDATA[
Date of polio1 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: p1datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V51" name="p1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="208" EndPos="213" width="6" RecSegNo="1"/>
      <labl>
        Health centre of polio1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        51870
      </sumStat>
      <sumStat type="invd">
        10993
      </sumStat>
      <txt>
        Health centre of polio1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p1vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc2 (table[s]: crs_birth)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V52" name="p2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="214" EndPos="214" width="1" RecSegNo="1"/>
      <labl>
        Had polio2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        54166
      </sumStat>
      <sumStat type="invd">
        8697
      </sumStat>
      <txt>
        <![CDATA[	
Had polio2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3364
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          50802
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          8697
        </catStat>
      </catgry>
      <codInstr>
        variable: p2yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V53" name="p2yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="215" EndPos="218" width="4" RecSegNo="1"/>
      <labl>
        Year of polio2 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        35854
      </sumStat>
      <sumStat type="invd">
        27009
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio2 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V54" name="p2date" files="F1" intrvl="discrete">
      <location StartPos="219" EndPos="228" width="10" RecSegNo="1"/>
      <labl>
        Date of polio2 vaccination (D)
      </labl>
      <sumStat type="vald">
        35835
      </sumStat>
      <txt>
        <![CDATA[
Date of polio2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V55" name="p2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="229" EndPos="229" width="1" RecSegNo="1"/>
      <labl>
        Date of polio2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        14
      </sumStat>
      <sumStat type="invd">
        62849
      </sumStat>
      <txt>
        <![CDATA[
Date of polio2 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: p2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V56" name="p2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="230" EndPos="235" width="6" RecSegNo="1"/>
      <labl>
        Health centre of polio2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        49027
      </sumStat>
      <sumStat type="invd">
        13836
      </sumStat>
      <txt>
        Health centre of polio2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p2vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc3 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V57" name="p3yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="236" EndPos="236" width="1" RecSegNo="1"/>
      <labl>
        Had polio3 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        53112
      </sumStat>
      <sumStat type="invd">
        9751
      </sumStat>
      <txt>
        <![CDATA[	
Had polio3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          4999
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          48113
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          9751
        </catStat>
      </catgry>
      <codInstr>
        variable: p3yn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V58" name="p3yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="237" EndPos="240" width="4" RecSegNo="1"/>
      <labl>
        Year of polio3 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        33218
      </sumStat>
      <sumStat type="invd">
        29645
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio3 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V59" name="p3date" files="F1" intrvl="discrete">
      <location StartPos="241" EndPos="250" width="10" RecSegNo="1"/>
      <labl>
        Date of polio3 vaccination (D)
      </labl>
      <sumStat type="vald">
        33200
      </sumStat>
      <txt>
        <![CDATA[
Date of polio3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p3date (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V60" name="p3dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="251" EndPos="251" width="1" RecSegNo="1"/>
      <labl>
        Date of polio3 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        10
      </sumStat>
      <sumStat type="invd">
        62853
      </sumStat>
      <txt>
        <![CDATA[
Date of polio3 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: p3datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V61" name="p3vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="252" EndPos="257" width="6" RecSegNo="1"/>
      <labl>
        Health centre of polio3 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        46374
      </sumStat>
      <sumStat type="invd">
        16489
      </sumStat>
      <txt>
        Health centre of polio3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p3vc (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc4 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V62" name="pcv1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="258" EndPos="258" width="1" RecSegNo="1"/>
      <labl>
        Had PCV1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        33311
      </sumStat>
      <sumStat type="invd">
        29552
      </sumStat>
      <txt>
        Had PCV1 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          9328
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          23983
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          29552
        </catStat>
      </catgry>
      <codInstr>
        variable: pcv1yn (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V63" name="pcv1yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="259" EndPos="262" width="4" RecSegNo="1"/>
      <labl>
        Year of PCV1 vaccination (D)
      </labl>
      <valrng>
        <range min="1900" max="2020"/>
      </valrng>
      <sumStat type="vald">
        17241
      </sumStat>
      <sumStat type="invd">
        45622
      </sumStat>
      <txt>
        <![CDATA[
Year of PCV1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V64" name="pcv1date" files="F1" intrvl="discrete">
      <location StartPos="263" EndPos="272" width="10" RecSegNo="1"/>
      <labl>
        Date of PCV1 vaccination (D)
      </labl>
      <sumStat type="vald">
        17232
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1date (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V65" name="pcv1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="273" EndPos="273" width="1" RecSegNo="1"/>
      <labl>
        Date of PCV1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        6
      </sumStat>
      <sumStat type="invd">
        62857
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV1 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: pcv1datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V66" name="pcv1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="274" EndPos="279" width="6" RecSegNo="1"/>
      <labl>
        Health centre of PCV1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        23248
      </sumStat>
      <sumStat type="invd">
        39615
      </sumStat>
      <txt>
        Health centre of PCV1 vaccination
      </txt>
      <codInstr>
        variable: vhc2 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V67" name="pcv2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="280" EndPos="280" width="1" RecSegNo="1"/>
      <labl>
        Had PCV2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        32196
      </sumStat>
      <sumStat type="invd">
        30667
      </sumStat>
      <txt>
        <![CDATA[	
Had PCV2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          10257
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          21939
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          30667
        </catStat>
      </catgry>
      <codInstr>
        variable: pcv2yn (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V68" name="pcv2yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="281" EndPos="284" width="4" RecSegNo="1"/>
      <labl>
        Year of PCV2 vaccination (D)
      </labl>
      <valrng>
        <range min="2008" max="2020"/>
      </valrng>
      <sumStat type="vald">
        15237
      </sumStat>
      <sumStat type="invd">
        47626
      </sumStat>
      <txt>
        <![CDATA[	
Year of PCV2 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V69" name="pcv2date" files="F1" intrvl="discrete">
      <location StartPos="285" EndPos="294" width="10" RecSegNo="1"/>
      <labl>
        Date of PCV2 vaccination (D)
      </labl>
      <sumStat type="vald">
        15227
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2date (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

	
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V70" name="pcv2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="295" EndPos="295" width="1" RecSegNo="1"/>
      <labl>
        Date of PCV2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        2
      </sumStat>
      <sumStat type="invd">
        62861
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV2 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: pcv2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V71" name="pcv2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="296" EndPos="301" width="6" RecSegNo="1"/>
      <labl>
        Health centre of PCV2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        21197
      </sumStat>
      <sumStat type="invd">
        41666
      </sumStat>
      <txt>
        Health centre of PCV2 vaccination
      </txt>
      <codInstr>
        variable: vhc3 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V72" name="pcv3yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="302" EndPos="302" width="1" RecSegNo="1"/>
      <labl>
        Had PCV3 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        31569
      </sumStat>
      <sumStat type="invd">
        31294
      </sumStat>
      <txt>
        <![CDATA[
Had PCV3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          11623
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          19946
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          31294
        </catStat>
      </catgry>
      <codInstr>
        variable: pcv3yn (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V73" name="pcv3yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="303" EndPos="306" width="4" RecSegNo="1"/>
      <labl>
        Year of PCV3 vaccination (D)
      </labl>
      <valrng>
        <range min="2002" max="2020"/>
      </valrng>
      <sumStat type="vald">
        13266
      </sumStat>
      <sumStat type="invd">
        49597
      </sumStat>
      <txt>
        <![CDATA[	
Year of PCV3 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V74" name="pcv3date" files="F1" intrvl="discrete">
      <location StartPos="307" EndPos="316" width="10" RecSegNo="1"/>
      <labl>
        Date of PCV3 vaccination (D)
      </labl>
      <sumStat type="vald">
        13257
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3date (table[s]: crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V75" name="pcv3dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="317" EndPos="317" width="1" RecSegNo="1"/>
      <labl>
        Date of PCV3 vaccination is estimated (D)
      </labl>
      <sumStat type="vald">
        0
      </sumStat>
      <sumStat type="invd">
        62863
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV3 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: pcv3datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V76" name="pcv3vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="318" EndPos="323" width="6" RecSegNo="1"/>
      <labl>
        Health centre of PCV3 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        19254
      </sumStat>
      <sumStat type="invd">
        43609
      </sumStat>
      <txt>
        Health centre of PCV3 vaccination
      </txt>
      <codInstr>
        variable: vhc4 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V77" name="rv1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="324" EndPos="324" width="1" RecSegNo="1"/>
      <labl>
        Had rotavirus1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        31889
      </sumStat>
      <sumStat type="invd">
        30974
      </sumStat>
      <txt>
        <![CDATA[
Had rotavirus1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          16024
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          15865
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          30974
        </catStat>
      </catgry>
      <codInstr>
        variable: rv1yn (table[s]: crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V78" name="rv1yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="325" EndPos="328" width="4" RecSegNo="1"/>
      <labl>
        Year of rotavirus1 vaccination (D)
      </labl>
      <valrng>
        <range min="2009" max="2020"/>
      </valrng>
      <sumStat type="vald">
        11087
      </sumStat>
      <sumStat type="invd">
        51776
      </sumStat>
      <txt>
        <![CDATA[	
Year of rotavirus1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V79" name="rv1date" files="F1" intrvl="discrete">
      <location StartPos="329" EndPos="338" width="10" RecSegNo="1"/>
      <labl>
        Date of rotavirus1 vaccination (D)
      </labl>
      <sumStat type="vald">
        11076
      </sumStat>
      <txt>
        <![CDATA[	
Date of rotavirus1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv1date (table[s]: crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

	
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V80" name="rv1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="339" EndPos="339" width="1" RecSegNo="1"/>
      <labl>
        Date of rotavirus1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        4
      </sumStat>
      <sumStat type="invd">
        62859
      </sumStat>
      <txt>
        <![CDATA[	
Date of rotavirus1 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: rv1datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V81" name="rv1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="340" EndPos="345" width="6" RecSegNo="1"/>
      <labl>
        Health centre of rotavirus1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        15372
      </sumStat>
      <sumStat type="invd">
        47491
      </sumStat>
      <txt>
        <![CDATA[
Health centre of rotavirus1 vaccination]]>
      </txt>
      <codInstr>
        variable: vhc2 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V82" name="rv2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="346" EndPos="346" width="1" RecSegNo="1"/>
      <labl>
        Had rotavirus2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        30855
      </sumStat>
      <sumStat type="invd">
        32008
      </sumStat>
      <txt>
        Had rotavirus2 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          16923
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          13932
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          32008
        </catStat>
      </catgry>
      <codInstr>
        variable: rv2yn (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V83" name="rv2yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="347" EndPos="350" width="4" RecSegNo="1"/>
      <labl>
        Year of rotavirus2 vaccination (D)
      </labl>
      <valrng>
        <range min="2009" max="2020"/>
      </valrng>
      <sumStat type="vald">
        9179
      </sumStat>
      <sumStat type="invd">
        53684
      </sumStat>
      <txt>
        Year of rotavirus2 vaccination
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V84" name="rv2date" files="F1" intrvl="discrete">
      <location StartPos="351" EndPos="360" width="10" RecSegNo="1"/>
      <labl>
        Date of rotavirus2 vaccination (D)
      </labl>
      <sumStat type="vald">
        9167
      </sumStat>
      <txt>
        <![CDATA[	
Date of rotavirus2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv2date (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
	
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V85" name="rv2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="361" EndPos="361" width="1" RecSegNo="1"/>
      <labl>
        Date of rotavirus2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        1
      </sumStat>
      <sumStat type="invd">
        62862
      </sumStat>
      <txt>
        <![CDATA[	
Date of rotavirus2 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: rv2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V86" name="rv2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="362" EndPos="367" width="6" RecSegNo="1"/>
      <labl>
        Health centre of rotavirus2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        13453
      </sumStat>
      <sumStat type="invd">
        49410
      </sumStat>
      <txt>
        <![CDATA[	
Health centre of rotavirus2 vaccination]]>
      </txt>
      <codInstr>
        variable: vhc3 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V87" name="meas1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="368" EndPos="368" width="1" RecSegNo="1"/>
      <labl>
        Had measles1 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        51333
      </sumStat>
      <sumStat type="invd">
        11530
      </sumStat>
      <txt>
        Had measles1 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          9382
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          41951
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          11530
        </catStat>
      </catgry>
      <codInstr>
        variable: measyn (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V88" name="meas1yr" files="F1" dcml="0" intrvl="contin">
      <location StartPos="369" EndPos="372" width="4" RecSegNo="1"/>
      <labl>
        Year of measles1 vaccination (D)
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        27354
      </sumStat>
      <sumStat type="invd">
        35509
      </sumStat>
      <txt>
        <![CDATA[	
Year of measles1 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V89" name="meas1date" files="F1" intrvl="discrete">
      <location StartPos="373" EndPos="382" width="10" RecSegNo="1"/>
      <labl>
        Date of measles1 vaccination (D)
      </labl>
      <sumStat type="vald">
        27327
      </sumStat>
      <txt>
        Date of measles1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: measdate (table[s]: cen_individ, crs_bfup, crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

	
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V90" name="meas1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="383" EndPos="383" width="1" RecSegNo="1"/>
      <labl>
        Date of measles1 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        17
      </sumStat>
      <sumStat type="invd">
        62846
      </sumStat>
      <txt>
        Date of measles1 vaccination is estimated
      </txt>
      <codInstr>
        variable: measdatex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V91" name="meas1vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="384" EndPos="389" width="6" RecSegNo="1"/>
      <labl>
        Health centre of measles1 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        40080
      </sumStat>
      <sumStat type="invd">
        22783
      </sumStat>
      <txt>
        <![CDATA[	
Health centre of measles1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: measvc (table[s]: cen_individ, crs_bfup, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vhc5 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
variable: vcentre (table[s]: crs_cenm)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V92" name="meas2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="390" EndPos="390" width="1" RecSegNo="1"/>
      <labl>
        Had measles2 vaccination (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        2961
      </sumStat>
      <sumStat type="invd">
        59902
      </sumStat>
      <txt>
        <![CDATA[
Had measles2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2142
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          819
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          59902
        </catStat>
      </catgry>
      <codInstr>
        variable: meas2yn (table[s]: crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V93" name="meas2yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="391" EndPos="394" width="4" RecSegNo="1"/>
      <labl>
        Year of measles2 vaccination (D)
      </labl>
      <valrng>
        <range min="2012" max="2019"/>
      </valrng>
      <sumStat type="vald">
        419
      </sumStat>
      <sumStat type="invd">
        62444
      </sumStat>
      <txt>
        <![CDATA[
Year of measles2 vaccination]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V94" name="meas2date" files="F1" intrvl="discrete">
      <location StartPos="395" EndPos="404" width="10" RecSegNo="1"/>
      <labl>
        Date of measles2 vaccination (D)
      </labl>
      <sumStat type="vald">
        407
      </sumStat>
      <txt>
        Date of measles2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: meas2date (table[s]: crs_birth, crs_cenm, css_sei_all, gp_va, tmt_tmtv, ves_vese)

	
Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V95" name="meas2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="405" EndPos="405" width="1" RecSegNo="1"/>
      <labl>
        Date of measles2 vaccination is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        3
      </sumStat>
      <sumStat type="invd">
        62860
      </sumStat>
      <txt>
        <![CDATA[	
Date of measles2 vaccination is estimated]]>
      </txt>
      <codInstr>
        variable: meas2datex (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V96" name="meas2vc" files="F1" dcml="0" intrvl="contin">
      <location StartPos="406" EndPos="411" width="6" RecSegNo="1"/>
      <labl>
        Health centre of measles2 vaccination (D)
      </labl>
      <valrng>
        <range min="10000" max="120101"/>
      </valrng>
      <sumStat type="vald">
        793
      </sumStat>
      <sumStat type="invd">
        62070
      </sumStat>
      <txt>
        <![CDATA[
Health centre of measles2 vaccination]]>
      </txt>
      <codInstr>
        variable: vhc6 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V97" name="vitados" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="412" EndPos="413" width="2" RecSegNo="1"/>
      <labl>
        Number of vitamin A doses (D)
      </labl>
      <valrng>
        <range min="0" max="99"/>
      </valrng>
      <sumStat type="vald">
        47318
      </sumStat>
      <sumStat type="invd">
        15545
      </sumStat>
      <txt>
        Number of vitamin A doses
      </txt>
      <catgry>
        <catValu>
          98
        </catValu>
        <labl>
          Unknown
        </labl>
      </catgry>
      <catgry>
        <catValu>
          99
        </catValu>
        <labl>
          Missing
        </labl>
      </catgry>
      <codInstr>
        variable: vitados (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V98" name="vita1yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="414" EndPos="414" width="1" RecSegNo="1"/>
      <labl>
        Had first vitamin A dose (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        62863
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Had first vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vitados (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

gen vita1yn=0 if vitados==0
replace vita1yn=1 if vitados>=1]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V99" name="vita1yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="415" EndPos="418" width="4" RecSegNo="1"/>
      <labl>
        Year of first vitamin A dose (D)
      </labl>
      <valrng>
        <range min="2003" max="2020"/>
      </valrng>
      <sumStat type="vald">
        21657
      </sumStat>
      <sumStat type="invd">
        41206
      </sumStat>
      <txt>
        <![CDATA[
Year of first vitamin A dose]]>
      </txt>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V100" name="vita1date" files="F1" intrvl="discrete">
      <location StartPos="419" EndPos="428" width="10" RecSegNo="1"/>
      <labl>
        Date of first vitamin A dose (D)
      </labl>
      <sumStat type="vald">
        20160
      </sumStat>
      <txt>
        <![CDATA[
Date of first vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vitadat1 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

gen `vacc'yr=year(`vacc'date)]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V101" name="vita1dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="429" EndPos="429" width="1" RecSegNo="1"/>
      <labl>
        Date of first vitamin A dose is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        16280
      </sumStat>
      <sumStat type="invd">
        46583
      </sumStat>
      <txt>
        <![CDATA[
Date of first vitamin A dose is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vitadat1x (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V102" name="vita2yn" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="430" EndPos="430" width="1" RecSegNo="1"/>
      <labl>
        Had second vitamin A dose (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        62863
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Had second vitamin A dose
      </txt>
      <codInstr>
        <![CDATA[variable: vita1yn (table[s]: this dataset)
variable: vitados (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

gen vita2yn=0 if vita1yn~=.
replace vita2yn=1 if vitados>=2]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V103" name="vita2yr" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="431" EndPos="434" width="4" RecSegNo="1"/>
      <labl>
        Year of second vitamin A dose (D)
      </labl>
      <valrng>
        <range min="2004" max="2019"/>
      </valrng>
      <sumStat type="vald">
        11689
      </sumStat>
      <sumStat type="invd">
        51174
      </sumStat>
      <txt>
        <![CDATA[
Year of second vitamin A dose]]>
      </txt>
      <codInstr>
        gen `vacc'yr=year(`vacc'date)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V104" name="vita2date" files="F1" intrvl="discrete">
      <location StartPos="435" EndPos="444" width="10" RecSegNo="1"/>
      <labl>
        Date of second vitamin A dose (D)
      </labl>
      <sumStat type="vald">
        10598
      </sumStat>
      <txt>
        <![CDATA[	
Date of second vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vitadat2 (table[s]: crs_birth, css_sei_all, gp_va, tmt_tmtv, ves_vese)

Date is used as reported unless month is reported to be estimated (edited to be bank) or it is before date of birth and is recorded as estimated (edited to be one day after birth_date).]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V105" name="vita2dayest" files="F1" dcml="0" intrvl="discrete">
      <location StartPos="445" EndPos="445" width="1" RecSegNo="1"/>
      <labl>
        Date of second vitamin A dose is estimated (D)
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        2057
      </sumStat>
      <sumStat type="invd">
        60806
      </sumStat>
      <txt>
        Date of second vitamin A dose is estimated
      </txt>
      <codInstr>
        variable: vitadat2x (table[s]: css_sei_all, gp_va, tmt_tmtv, ves_vese)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V106" name="ident" files="F2" intrvl="discrete">
      <location StartPos="1" EndPos="7" width="7" RecSegNo="1"/>
      <labl>
        Unique identifier (D)
      </labl>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Unique identifier
      </txt>
      <codInstr>
        <![CDATA[variable: ident  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" schema="other"/>
    </var>
    <var ID="V107" name="birth_date" files="F2" intrvl="discrete">
      <location StartPos="8" EndPos="17" width="10" RecSegNo="1"/>
      <labl>
        Birth date (D)
      </labl>
      <sumStat type="vald">
        26039
      </sumStat>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V108" name="bcgintdate" files="F2" intrvl="discrete">
      <location StartPos="18" EndPos="27" width="10" RecSegNo="1"/>
      <labl>
        Interview date for BCG report (D)
      </labl>
      <sumStat type="vald">
        25776
      </sumStat>
      <txt>
        Interview date for BCG report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V109" name="bcgcardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="28" EndPos="28" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for BCG report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        25625
      </sumStat>
      <sumStat type="invd">
        414
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for BCG report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1434
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          24191
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          414
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V110" name="bcgsource" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="29" EndPos="29" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for BCG report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        25776
      </sumStat>
      <sumStat type="invd">
        263
      </sumStat>
      <txt>
        <![CDATA[Source  for BCG report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          8665
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3636
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          684
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          612
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          10696
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1121
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          106
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          256
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          263
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V111" name="bcgyn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="30" EndPos="30" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had BCG vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        25776
      </sumStat>
      <sumStat type="invd">
        263
      </sumStat>
      <txt>
        <![CDATA[
Had BCG vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          302
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          25474
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          263
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: bcgyn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V112" name="bcgyr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="31" EndPos="34" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of BCG vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        23158
      </sumStat>
      <sumStat type="invd">
        2881
      </sumStat>
      <txt>
        <![CDATA[	
Year of BCG vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgyr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V113" name="bcgdate" files="F2" intrvl="discrete">
      <location StartPos="35" EndPos="44" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of BCG vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        23156
      </sumStat>
      <txt>
        <![CDATA[	
Date of BCG vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V114" name="bcgdayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="45" EndPos="45" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of BCG vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        21
      </sumStat>
      <sumStat type="invd">
        26018
      </sumStat>
      <txt>
        <![CDATA[
Date of BCG vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgdayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V115" name="bcgvc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="46" EndPos="51" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of BCG vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        24958
      </sumStat>
      <sumStat type="invd">
        1081
      </sumStat>
      <txt>
        Health centre of BCG vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: bcgvc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V116" name="bcgBprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="52" EndPos="52" width="1" RecSegNo="1"/>
      <labl>
        Problem with BCG date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        25776
      </sumStat>
      <sumStat type="invd">
        263
      </sumStat>
      <txt>
        <![CDATA[	
Problem with BCG date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgdate  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V117" name="bcgSprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="53" EndPos="53" width="1" RecSegNo="1"/>
      <labl>
        Problem with BCG date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        25776
      </sumStat>
      <sumStat type="invd">
        263
      </sumStat>
      <txt>
        Problem with BCG date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: bcgdate  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for BCG: problem if vacc date is more than 3 weeks after birthdate (supposed to be at birth)
if "`vacc'"=="bcg" replace `vacc'Sprob=1 if bcgdate-birth_date>21 & bcgdate~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V118" name="bcgfyintdate" files="F2" intrvl="discrete">
      <location StartPos="54" EndPos="63" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had BCG (D)
      </labl>
      <sumStat type="vald">
        25474
      </sumStat>
      <txt>
        First interview date when reported had BCG
      </txt>
      <codInstr>
        <![CDATA[variable: bcgintdate  (table[s]: all_vaccination_records [derived table])
variable: bcgyn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V119" name="bcgkeep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="64" EndPos="64" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept BCG report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        25776
      </sumStat>
      <sumStat type="invd">
        263
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept BCG report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          14949
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          7715
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1324
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          98
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          68
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1320
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          302
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          263
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: bcgkeep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V120" name="dpt1intdate" files="F2" intrvl="discrete">
      <location StartPos="65" EndPos="74" width="10" RecSegNo="1"/>
      <labl>
        Interview date for DPT1 report (D)
      </labl>
      <sumStat type="vald">
        22559
      </sumStat>
      <txt>
        <![CDATA[
Interview date for DPT1 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V121" name="dpt1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="75" EndPos="75" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for DPT1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22385
      </sumStat>
      <sumStat type="invd">
        3654
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for DPT1 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1682
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20703
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3654
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V122" name="dpt1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="76" EndPos="76" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for DPT1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        22559
      </sumStat>
      <sumStat type="invd">
        3480
      </sumStat>
      <txt>
        <![CDATA[Source  for DPT1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          2388
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3585
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          703
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1110
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          12973
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1356
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          128
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          316
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3480
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V123" name="dpt1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="77" EndPos="77" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had DPT1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22559
      </sumStat>
      <sumStat type="invd">
        3480
      </sumStat>
      <txt>
        <![CDATA[
Had DPT1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          531
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          22028
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3480
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V124" name="dpt1yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="78" EndPos="81" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of DPT1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        19486
      </sumStat>
      <sumStat type="invd">
        6553
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V125" name="dpt1date" files="F2" intrvl="discrete">
      <location StartPos="82" EndPos="91" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT1 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        19484
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V126" name="dpt1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="92" EndPos="92" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        8
      </sumStat>
      <sumStat type="invd">
        26031
      </sumStat>
      <txt>
        Date of DPT1 vaccination is estimated
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V127" name="dpt1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="93" EndPos="98" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of DPT1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        21452
      </sumStat>
      <sumStat type="invd">
        4587
      </sumStat>
      <txt>
        Health centre of DPT1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V128" name="dpt1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="99" EndPos="99" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22559
      </sumStat>
      <sumStat type="invd">
        3480
      </sumStat>
      <txt>
        <![CDATA[	
Problem with DPT1 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V129" name="dpt1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="100" EndPos="100" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22559
      </sumStat>
      <sumStat type="invd">
        3480
      </sumStat>
      <txt>
        Problem with DPT1 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for DPT1, HH1, PCV1, RV1 and P1: problem if vacc date is less than 5 weeks, or more than 10 weeks after birthdate (supposed to be at 6 weeks or later)
if "`vacc'"=="dpt1" replace `vacc'Sprob=1 if (dpt1date-birth_date<35 | dpt1date-birth_date>70) & dpt1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V130" name="dpt1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="101" EndPos="110" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had DPT2 (D)
      </labl>
      <sumStat type="vald">
        22028
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had DPT2]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt1intdate  (table[s]: all_vaccination_records [derived table])
variable: bcgyn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V131" name="dpt1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="111" EndPos="111" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept DPT1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        22559
      </sumStat>
      <sumStat type="invd">
        3480
      </sumStat>
      <txt>
        Completeness of kept DPT1 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          13018
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          6159
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          972
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          160
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          72
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          72
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1572
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          3
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          531
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3480
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V132" name="dpt2intdate" files="F2" intrvl="discrete">
      <location StartPos="112" EndPos="121" width="10" RecSegNo="1"/>
      <labl>
        Interview date for DPT2 report (D)
      </labl>
      <sumStat type="vald">
        21708
      </sumStat>
      <txt>
        <![CDATA[
Interview date for DPT2 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V133" name="dpt2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="122" EndPos="122" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for DPT2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21528
      </sumStat>
      <sumStat type="invd">
        4511
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for DPT2 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1784
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          19744
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4511
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V134" name="dpt2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="123" EndPos="123" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for DPT2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        21708
      </sumStat>
      <sumStat type="invd">
        4331
      </sumStat>
      <txt>
        <![CDATA[
Source  for DPT2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          1126
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3398
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          684
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1228
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13377
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1419
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          170
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          306
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4331
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V135" name="dpt2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="124" EndPos="124" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had DPT2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21708
      </sumStat>
      <sumStat type="invd">
        4331
      </sumStat>
      <txt>
        <![CDATA[
Had DPT2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          721
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20987
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4331
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V136" name="dpt2yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="125" EndPos="128" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of DPT2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        18294
      </sumStat>
      <sumStat type="invd">
        7745
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V137" name="dpt2date" files="F2" intrvl="discrete">
      <location StartPos="129" EndPos="138" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT2 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        18291
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V138" name="dpt2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="139" EndPos="139" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT2 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        4
      </sumStat>
      <sumStat type="invd">
        26035
      </sumStat>
      <txt>
        <![CDATA[	
Date of DPT2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V139" name="dpt2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="140" EndPos="145" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of DPT2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        20434
      </sumStat>
      <sumStat type="invd">
        5605
      </sumStat>
      <txt>
        Health centre of DPT2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V140" name="dpt2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="146" EndPos="146" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21708
      </sumStat>
      <sumStat type="invd">
        4331
      </sumStat>
      <txt>
        <![CDATA[	
Problem with DPT2 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V141" name="dpt2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="147" EndPos="147" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21708
      </sumStat>
      <sumStat type="invd">
        4331
      </sumStat>
      <txt>
        Problem with DPT2 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2date  (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'"=="dpt2" replace `vacc'Sprob=1 if (dpt2date-dpt1date<21 | dpt2date-dpt1date>42 | dpt1date==.) & dpt2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V142" name="dpt2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="148" EndPos="157" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had DPT3 (D)
      </labl>
      <sumStat type="vald">
        20987
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had DPT3]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt2intdate  (table[s]: all_vaccination_records [derived table])
variable: dpt2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V143" name="dpt2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="158" EndPos="158" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept DPT2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        21708
      </sumStat>
      <sumStat type="invd">
        4331
      </sumStat>
      <txt>
        Completeness of kept DPT2 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          12239
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          5807
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1098
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          37
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          89
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          54
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1663
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          721
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4331
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V144" name="dpt3intdate" files="F2" intrvl="discrete">
      <location StartPos="159" EndPos="168" width="10" RecSegNo="1"/>
      <labl>
        Interview date for DPT3 report (D)
      </labl>
      <sumStat type="vald">
        21146
      </sumStat>
      <txt>
        Interview date for DPT3 report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V145" name="dpt3cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="169" EndPos="169" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for DPT3 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        20962
      </sumStat>
      <sumStat type="invd">
        5077
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for DPT3 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1873
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          19089
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          5077
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V146" name="dpt3source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="170" EndPos="170" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for DPT3 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        21146
      </sumStat>
      <sumStat type="invd">
        4893
      </sumStat>
      <txt>
        <![CDATA[	
Source  for DPT3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          657
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3121
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          657
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1250
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13551
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1433
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          172
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          305
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4893
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V147" name="dpt3yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="171" EndPos="171" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had DPT3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21146
      </sumStat>
      <sumStat type="invd">
        4893
      </sumStat>
      <txt>
        <![CDATA[	
Had DPT3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1000
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20146
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4893
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt3yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V148" name="dpt3yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="172" EndPos="175" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of DPT3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        17298
      </sumStat>
      <sumStat type="invd">
        8741
      </sumStat>
      <txt>
        <![CDATA[	
Year of DPT3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V149" name="dpt3date" files="F2" intrvl="discrete">
      <location StartPos="176" EndPos="185" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT3 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        17294
      </sumStat>
      <txt>
        <![CDATA[	
Date of DPT3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V150" name="dpt3dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="186" EndPos="186" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of DPT3 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        7
      </sumStat>
      <sumStat type="invd">
        26032
      </sumStat>
      <txt>
        <![CDATA[
Date of DPT3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V151" name="dpt3vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="187" EndPos="192" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of DPT3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        19601
      </sumStat>
      <sumStat type="invd">
        6438
      </sumStat>
      <txt>
        Health centre of DPT3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V152" name="dpt3Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="193" EndPos="193" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT3 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21146
      </sumStat>
      <sumStat type="invd">
        4893
      </sumStat>
      <txt>
        <![CDATA[	
Problem with DPT3 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V153" name="dpt3Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="194" EndPos="194" width="1" RecSegNo="1"/>
      <labl>
        Problem with DPT3 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21146
      </sumStat>
      <sumStat type="invd">
        4893
      </sumStat>
      <txt>
        Problem with DPT3 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[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~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V154" name="dpt3fyintdate" files="F2" intrvl="discrete">
      <location StartPos="195" EndPos="204" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had DPT4 (D)
      </labl>
      <sumStat type="vald">
        20146
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had DPT4]]>
      </txt>
      <codInstr>
        <![CDATA[variable: dpt3intdate  (table[s]: all_vaccination_records [derived table])
variable: dpt3yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V155" name="dpt3keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="205" EndPos="205" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept DPT3 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        21146
      </sumStat>
      <sumStat type="invd">
        4893
      </sumStat>
      <txt>
        <![CDATA[	
Completeness of kept DPT3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          11126
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          5939
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1106
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          94
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          78
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          57
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1746
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          1000
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4893
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: dpt3keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V156" name="hh1intdate" files="F2" intrvl="discrete">
      <location StartPos="206" EndPos="215" width="10" RecSegNo="1"/>
      <labl>
        Interview date for HH1 report (D)
      </labl>
      <sumStat type="vald">
        15929
      </sumStat>
      <txt>
        <![CDATA[	
Interview date for HH1 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V157" name="hh1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="216" EndPos="216" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for HH1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15786
      </sumStat>
      <sumStat type="invd">
        10253
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for HH1 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1746
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          14040
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10253
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V158" name="hh1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="217" EndPos="217" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for HH1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        15929
      </sumStat>
      <sumStat type="invd">
        10110
      </sumStat>
      <txt>
        <![CDATA[	
Source  for HH1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          105
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13916
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1406
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          128
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          374
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10110
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V159" name="hh1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="218" EndPos="218" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had HH1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15929
      </sumStat>
      <sumStat type="invd">
        10110
      </sumStat>
      <txt>
        <![CDATA[
Had HH1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          539
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          15390
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10110
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V160" name="hh1yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="219" EndPos="222" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of HH1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2019"/>
      </valrng>
      <sumStat type="vald">
        12664
      </sumStat>
      <sumStat type="invd">
        13375
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V161" name="hh1date" files="F2" dcml="0" intrvl="contin">
      <location StartPos="223" EndPos="227" width="5" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="13689" max="21788"/>
      </valrng>
      <sumStat type="vald">
        12662
      </sumStat>
      <sumStat type="invd">
        13377
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V162" name="hh1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="228" EndPos="228" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        9
      </sumStat>
      <sumStat type="invd">
        26030
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V163" name="hh1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="229" EndPos="234" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of HH1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        14784
      </sumStat>
      <sumStat type="invd">
        11255
      </sumStat>
      <txt>
        Health centre of HH1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: hh1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V164" name="hh1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="235" EndPos="235" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15929
      </sumStat>
      <sumStat type="invd">
        10110
      </sumStat>
      <txt>
        <![CDATA[
Problem with HH1 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V165" name="hh1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="236" EndPos="236" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15929
      </sumStat>
      <sumStat type="invd">
        10110
      </sumStat>
      <txt>
        Problem with HH1 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: hh1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for DPT1, HH1, PCV1, RV1 and P1: problem if vacc date is less than 5 weeks, or more than 10 weeks after birthdate (supposed to be at 6 weeks or later)
if "`vacc'"=="hh1" replace `vacc'Sprob=1 if (hh1date-birth_date<35 | hh1date-birth_date>70) & hh1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V166" name="hh1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="237" EndPos="246" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had HH2 (D)
      </labl>
      <sumStat type="vald">
        15390
      </sumStat>
      <txt>
        First interview date when reported had HH2
      </txt>
      <codInstr>
        <![CDATA[variable: hh1intdate  (table[s]: all_vaccination_records [derived table])
variable: hh1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V167" name="hh1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="247" EndPos="247" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept HH1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        15929
      </sumStat>
      <sumStat type="invd">
        10110
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept HH1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          9031
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          3465
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1086
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          62
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          62
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          42
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1642
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          539
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10110
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh1keep  (table[s]: all_vaccination_records [derived table])


la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V168" name="hh2intdate" files="F2" intrvl="discrete">
      <location StartPos="248" EndPos="257" width="10" RecSegNo="1"/>
      <labl>
        Interview date for HH2 report (D)
      </labl>
      <sumStat type="vald">
        15865
      </sumStat>
      <txt>
        <![CDATA[	
Interview date for HH2 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V169" name="hh2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="258" EndPos="258" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for HH2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15720
      </sumStat>
      <sumStat type="invd">
        10319
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for HH2 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1803
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          13917
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10319
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V170" name="hh2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="259" EndPos="259" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for HH2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        15865
      </sumStat>
      <sumStat type="invd">
        10174
      </sumStat>
      <txt>
        <![CDATA[	
Source  for HH2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          75
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13830
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1435
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          170
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          355
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10174
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V171" name="hh2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="260" EndPos="260" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had HH2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15865
      </sumStat>
      <sumStat type="invd">
        10174
      </sumStat>
      <txt>
        <![CDATA[
Had HH2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          725
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          15140
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10174
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V172" name="hh2yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="261" EndPos="264" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of HH2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2019"/>
      </valrng>
      <sumStat type="vald">
        12347
      </sumStat>
      <sumStat type="invd">
        13692
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V173" name="hh2date" files="F2" dcml="0" intrvl="contin">
      <location StartPos="265" EndPos="269" width="5" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="13787" max="21816"/>
      </valrng>
      <sumStat type="vald">
        12344
      </sumStat>
      <sumStat type="invd">
        13695
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V174" name="hh2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="270" EndPos="270" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH2 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        5
      </sumStat>
      <sumStat type="invd">
        26034
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V175" name="hh2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="271" EndPos="276" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of HH2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        14553
      </sumStat>
      <sumStat type="invd">
        11486
      </sumStat>
      <txt>
        Health centre of HH2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: hh2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V176" name="hh2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="277" EndPos="277" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15865
      </sumStat>
      <sumStat type="invd">
        10174
      </sumStat>
      <txt>
        <![CDATA[
Problem with HH2 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V177" name="hh2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="278" EndPos="278" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15865
      </sumStat>
      <sumStat type="invd">
        10174
      </sumStat>
      <txt>
        Problem with HH2 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: hh2date  (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'"=="hh2" replace `vacc'Sprob=1 if (hh2date-hh1date<21 | hh2date-hh1date>42 | hh1date==.) & hh2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V178" name="hh2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="279" EndPos="288" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had HH3 (D)
      </labl>
      <sumStat type="vald">
        15140
      </sumStat>
      <txt>
        First interview date when reported had HH3
      </txt>
      <codInstr>
        <![CDATA[variable: hh2intdate  (table[s]: all_vaccination_records [derived table])
variable: hh2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V179" name="hh2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="289" EndPos="289" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept HH2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        15865
      </sumStat>
      <sumStat type="invd">
        10174
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept HH2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          8611
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          3584
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1140
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          18
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          66
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          33
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1688
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          725
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10174
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh2keep  (table[s]: all_vaccination_records [derived table]) 

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V180" name="hh3intdate" files="F2" intrvl="discrete">
      <location StartPos="290" EndPos="299" width="10" RecSegNo="1"/>
      <labl>
        Interview date for HH3 report (D)
      </labl>
      <sumStat type="vald">
        15827
      </sumStat>
      <txt>
        <![CDATA[	
Interview date for HH3 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V181" name="hh3cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="300" EndPos="300" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for HH3 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15679
      </sumStat>
      <sumStat type="invd">
        10360
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for HH3 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1883
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          13796
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10360
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V182" name="hh3source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="301" EndPos="301" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for HH3 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        15827
      </sumStat>
      <sumStat type="invd">
        10212
      </sumStat>
      <txt>
        <![CDATA[	
Source  for HH3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          74
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13795
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1442
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          172
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          344
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10212
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V183" name="hh3yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="302" EndPos="302" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had HH3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        15827
      </sumStat>
      <sumStat type="invd">
        10212
      </sumStat>
      <txt>
        <![CDATA[
Had HH3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1003
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          14824
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10212
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh3yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V184" name="hh3yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="303" EndPos="306" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of HH3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2018"/>
      </valrng>
      <sumStat type="vald">
        11891
      </sumStat>
      <sumStat type="invd">
        14148
      </sumStat>
      <txt>
        <![CDATA[	
Year of HH3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V185" name="hh3date" files="F2" dcml="0" intrvl="contin">
      <location StartPos="307" EndPos="311" width="5" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="13815" max="21453"/>
      </valrng>
      <sumStat type="vald">
        11887
      </sumStat>
      <sumStat type="invd">
        14152
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V186" name="hh3dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="312" EndPos="312" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of HH3 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        7
      </sumStat>
      <sumStat type="invd">
        26032
      </sumStat>
      <txt>
        <![CDATA[	
Date of HH3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V187" name="hh3vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="313" EndPos="318" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of HH3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        14264
      </sumStat>
      <sumStat type="invd">
        11775
      </sumStat>
      <txt>
        Health centre of HH3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: hh3vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V188" name="hh3Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="319" EndPos="319" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH3 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15827
      </sumStat>
      <sumStat type="invd">
        10212
      </sumStat>
      <txt>
        <![CDATA[	
Problem with HH3 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V189" name="hh3Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="320" EndPos="320" width="1" RecSegNo="1"/>
      <labl>
        Problem with HH3 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        15827
      </sumStat>
      <sumStat type="invd">
        10212
      </sumStat>
      <txt>
        <![CDATA[
Problem with HH3 date (schedule issue)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: hh3date  (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'"=="hh3" replace `vacc'Sprob=1 if (hh3date<birth_date | hh3date-hh2date<21 | hh3date-hh2date>42 | hh2date==.) & hh3date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V190" name="hh3fyintdate" files="F2" intrvl="discrete">
      <location StartPos="321" EndPos="330" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had HH4 (D)
      </labl>
      <sumStat type="vald">
        14824
      </sumStat>
      <txt>
        First interview date when reported had HH4
      </txt>
      <codInstr>
        <![CDATA[variable: hh3intdate  (table[s]: all_vaccination_records [derived table])
variable: hh3yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V191" name="hh3keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="331" EndPos="331" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept HH3 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        15827
      </sumStat>
      <sumStat type="invd">
        10212
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept HH3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          8010
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          3736
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1174
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          51
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          57
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          33
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1763
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          1003
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          10212
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: hh3keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V192" name="p0intdate" files="F2" intrvl="discrete">
      <location StartPos="332" EndPos="341" width="10" RecSegNo="1"/>
      <labl>
        Interview date for polio0 report (D)
      </labl>
      <sumStat type="vald">
        22721
      </sumStat>
      <txt>
        <![CDATA[	
Interview date for polio0 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V193" name="p0cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="342" EndPos="342" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for polio0 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22525
      </sumStat>
      <sumStat type="invd">
        3514
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for polio0 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2497
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20028
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3514
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V194" name="p0source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="343" EndPos="343" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for polio0 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        22721
      </sumStat>
      <sumStat type="invd">
        3318
      </sumStat>
      <txt>
        <![CDATA[	
Source  for polio0 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          7323
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          2107
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          366
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          204
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          11443
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          889
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          144
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          245
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3318
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V195" name="p0yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="344" EndPos="344" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had polio0 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22721
      </sumStat>
      <sumStat type="invd">
        3318
      </sumStat>
      <txt>
        <![CDATA[
Had polio0 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2339
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20382
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3318
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p0yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V196" name="p0yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="345" EndPos="348" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of polio0 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        16146
      </sumStat>
      <sumStat type="invd">
        9893
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio0 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V197" name="p0date" files="F2" intrvl="discrete">
      <location StartPos="349" EndPos="358" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio0 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        16141
      </sumStat>
      <txt>
        <![CDATA[
Date of polio0 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V198" name="p0dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="359" EndPos="359" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio0 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        19
      </sumStat>
      <sumStat type="invd">
        26020
      </sumStat>
      <txt>
        <![CDATA[
Date of polio0 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V199" name="p0vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="360" EndPos="365" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of polio0 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        19969
      </sumStat>
      <sumStat type="invd">
        6070
      </sumStat>
      <txt>
        Health centre of polio0 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p0vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V200" name="p0Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="366" EndPos="366" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio0 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22721
      </sumStat>
      <sumStat type="invd">
        3318
      </sumStat>
      <txt>
        <![CDATA[	
Problem with polio0 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V201" name="p0Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="367" EndPos="367" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio0 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22721
      </sumStat>
      <sumStat type="invd">
        3318
      </sumStat>
      <txt>
        Problem with polio0 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: p0date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for P0: problem if vacc date is more than 4 weeks after birthdate (supposed to be birth - 2 weeks)
if "`vacc'"=="p0" replace `vacc'Sprob=1 if p0date-birth_date>28 & p0date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V202" name="p0fyintdate" files="F2" intrvl="discrete">
      <location StartPos="368" EndPos="377" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had polio1 (D)
      </labl>
      <sumStat type="vald">
        20382
      </sumStat>
      <txt>
        <![CDATA[
First interview date when reported had polio1]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p0intdate  (table[s]: all_vaccination_records [derived table])
variable: p0yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V203" name="p0keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="378" EndPos="378" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept polio0 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        22721
      </sumStat>
      <sumStat type="invd">
        3318
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept polio0 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          13693
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          2110
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          2059
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          103
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          22
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          2395
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          2339
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3318
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p0keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V204" name="p1intdate" files="F2" intrvl="discrete">
      <location StartPos="379" EndPos="388" width="10" RecSegNo="1"/>
      <labl>
        Interview date for polio1 report (D)
      </labl>
      <sumStat type="vald">
        22546
      </sumStat>
      <txt>
        <![CDATA[
Interview date for polio1 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V205" name="p1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="389" EndPos="389" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for polio1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22368
      </sumStat>
      <sumStat type="invd">
        3671
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for polio1 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1700
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20668
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3671
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V206" name="p1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="390" EndPos="390" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for polio1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        22546
      </sumStat>
      <sumStat type="invd">
        3493
      </sumStat>
      <txt>
        <![CDATA[	
Source  for polio1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          2316
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3596
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          699
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1115
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13032
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1337
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          136
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          315
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3493
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V207" name="p1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="391" EndPos="391" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had polio1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        22546
      </sumStat>
      <sumStat type="invd">
        3493
      </sumStat>
      <txt>
        <![CDATA[
Had polio1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          578
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          21968
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3493
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V208" name="p1yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="392" EndPos="395" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of polio1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        19404
      </sumStat>
      <sumStat type="invd">
        6635
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V209" name="p1date" files="F2" intrvl="discrete">
      <location StartPos="396" EndPos="405" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio1 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        19402
      </sumStat>
      <txt>
        <![CDATA[	
Date of polio1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V210" name="p1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="406" EndPos="406" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        7
      </sumStat>
      <sumStat type="invd">
        26032
      </sumStat>
      <txt>
        <![CDATA[
Date of polio1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V211" name="p1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="407" EndPos="412" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of polio1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        21403
      </sumStat>
      <sumStat type="invd">
        4636
      </sumStat>
      <txt>
        Health centre of polio1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V212" name="p1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="413" EndPos="413" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22546
      </sumStat>
      <sumStat type="invd">
        3493
      </sumStat>
      <txt>
        <![CDATA[
Problem with polio1 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V213" name="p1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="414" EndPos="414" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        22546
      </sumStat>
      <sumStat type="invd">
        3493
      </sumStat>
      <txt>
        Problem with polio1 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: p1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for DPT1, HH1, PCV1, RV1 and P1: problem if vacc date is less than 5 weeks, or more than 10 weeks after birthdate (supposed to be at 6 weeks or later)
if "`vacc'"=="p1" replace `vacc'Sprob=1 if (p1date-birth_date<35 | p1date-birth_date>70) & p1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V214" name="p1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="415" EndPos="424" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had polio2 (D)
      </labl>
      <sumStat type="vald">
        21968
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had polio2]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p1intdate  (table[s]: all_vaccination_records [derived table])
variable: p1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V215" name="p1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="425" EndPos="425" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept polio1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        22546
      </sumStat>
      <sumStat type="invd">
        3493
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept polio1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          12510
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          6587
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          977
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          159
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          67
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          77
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1589
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          2
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          578
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          3493
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V216" name="p2intdate" files="F2" intrvl="discrete">
      <location StartPos="426" EndPos="435" width="10" RecSegNo="1"/>
      <labl>
        Interview date for polio2 report (D)
      </labl>
      <sumStat type="vald">
        21743
      </sumStat>
      <txt>
        <![CDATA[
Interview date for polio2 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V217" name="p2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="436" EndPos="436" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for polio2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21559
      </sumStat>
      <sumStat type="invd">
        4480
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for polio2 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1816
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          19743
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4480
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V218" name="p2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="437" EndPos="437" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for polio2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        21743
      </sumStat>
      <sumStat type="invd">
        4296
      </sumStat>
      <txt>
        <![CDATA[Source  for polio2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          1080
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3450
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          683
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1230
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13462
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1366
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          168
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          304
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4296
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V219" name="p2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="438" EndPos="438" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had polio2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21743
      </sumStat>
      <sumStat type="invd">
        4296
      </sumStat>
      <txt>
        Had polio2 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          831
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20912
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4296
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V220" name="p2yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="439" EndPos="442" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of polio2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        18184
      </sumStat>
      <sumStat type="invd">
        7855
      </sumStat>
      <txt>
        <![CDATA[
Year of polio2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V221" name="p2date" files="F2" intrvl="discrete">
      <location StartPos="443" EndPos="452" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio2 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        18181
      </sumStat>
      <txt>
        <![CDATA[	
Date of polio2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V222" name="p2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="453" EndPos="453" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio2 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        7
      </sumStat>
      <sumStat type="invd">
        26032
      </sumStat>
      <txt>
        <![CDATA[
Date of polio2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V223" name="p2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="454" EndPos="459" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of polio2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        20372
      </sumStat>
      <sumStat type="invd">
        5667
      </sumStat>
      <txt>
        Health centre of polio2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V224" name="p2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="460" EndPos="460" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21743
      </sumStat>
      <sumStat type="invd">
        4296
      </sumStat>
      <txt>
        <![CDATA[
Problem with polio2 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V225" name="p2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="461" EndPos="461" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21743
      </sumStat>
      <sumStat type="invd">
        4296
      </sumStat>
      <txt>
        Problem with polio2 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[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~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V226" name="p2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="462" EndPos="471" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had polio3 (D)
      </labl>
      <sumStat type="vald">
        20912
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had polio3]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p2intdate  (table[s]: all_vaccination_records [derived table])
variable: p2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V227" name="p2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="472" EndPos="472" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept polio2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        21743
      </sumStat>
      <sumStat type="invd">
        4296
      </sumStat>
      <txt>
        <![CDATA[	
Completeness of kept polio2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          11863
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          6064
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1035
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          112
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          88
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          54
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1696
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          831
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4296
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V228" name="p3intdate" files="F2" intrvl="discrete">
      <location StartPos="473" EndPos="482" width="10" RecSegNo="1"/>
      <labl>
        Interview date for polio3 report (D)
      </labl>
      <sumStat type="vald">
        21191
      </sumStat>
      <txt>
        <![CDATA[	
Interview date for polio3 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V229" name="p3cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="483" EndPos="483" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for polio3 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21005
      </sumStat>
      <sumStat type="invd">
        5034
      </sumStat>
      <txt>
        Whether health record seen for polio3 report
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1926
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          19079
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          5034
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V230" name="p3source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="484" EndPos="484" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for polio3 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        21191
      </sumStat>
      <sumStat type="invd">
        4848
      </sumStat>
      <txt>
        <![CDATA[Source  for polio3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          623
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3220
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          654
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1240
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13629
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1347
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          174
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          304
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4848
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V231" name="p3yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="485" EndPos="485" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had polio3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        21191
      </sumStat>
      <sumStat type="invd">
        4848
      </sumStat>
      <txt>
        <![CDATA[	
Had polio3 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1119
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          20072
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4848
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p3yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V232" name="p3yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="486" EndPos="489" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of polio3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        17118
      </sumStat>
      <sumStat type="invd">
        8921
      </sumStat>
      <txt>
        <![CDATA[	
Year of polio3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p3yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V233" name="p3date" files="F2" intrvl="discrete">
      <location StartPos="490" EndPos="499" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio3 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        17114
      </sumStat>
      <txt>
        Date of polio3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p3date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V234" name="p3dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="500" EndPos="500" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of polio3 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        6
      </sumStat>
      <sumStat type="invd">
        26033
      </sumStat>
      <txt>
        <![CDATA[	
Date of polio3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p3dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V235" name="p3vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="501" EndPos="506" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of polio3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        19538
      </sumStat>
      <sumStat type="invd">
        6501
      </sumStat>
      <txt>
        Health centre of polio3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: p3vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V236" name="p3Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="507" EndPos="507" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio3 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21191
      </sumStat>
      <sumStat type="invd">
        4848
      </sumStat>
      <txt>
        Problem with polio3 date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: p3date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])


la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V237" name="p3Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="508" EndPos="508" width="1" RecSegNo="1"/>
      <labl>
        Problem with polio3 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        21191
      </sumStat>
      <sumStat type="invd">
        4848
      </sumStat>
      <txt>
        Problem with polio3 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: p3date  (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'"=="p3" replace `vacc'Sprob=1 if (p3date<birth_date | p3date-p2date<21 | p3date-p2date>42 | p2date==.) & p3date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V238" name="p3fyintdate" files="F2" intrvl="discrete">
      <location StartPos="509" EndPos="518" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had polio4 (D)
      </labl>
      <sumStat type="vald">
        20072
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had polio4]]>
      </txt>
      <codInstr>
        <![CDATA[variable: p3intdate  (table[s]: all_vaccination_records [derived table])
variable: p3yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V239" name="p3keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="519" EndPos="519" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept polio3 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        21191
      </sumStat>
      <sumStat type="invd">
        4848
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept polio3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          10455
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          6439
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1157
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          92
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          72
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          56
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1801
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          1119
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          4848
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: p3keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V240" name="pcv1intdate" files="F2" intrvl="discrete">
      <location StartPos="520" EndPos="529" width="10" RecSegNo="1"/>
      <labl>
        Interview date for PCV1 report (D)
      </labl>
      <sumStat type="vald">
        12655
      </sumStat>
      <txt>
        Interview date for PCV1 report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V241" name="pcv1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="530" EndPos="530" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for PCV1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12536
      </sumStat>
      <sumStat type="invd">
        13503
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for PCV1 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2477
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          10059
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13503
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V242" name="pcv1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="531" EndPos="531" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for PCV1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        12655
      </sumStat>
      <sumStat type="invd">
        13384
      </sumStat>
      <txt>
        <![CDATA[	
Source  for PCV1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          1585
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          8825
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1536
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          476
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          233
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13384
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V243" name="pcv1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="532" EndPos="532" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had PCV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12655
      </sumStat>
      <sumStat type="invd">
        13384
      </sumStat>
      <txt>
        <![CDATA[
Had PCV1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3530
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          9125
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13384
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V244" name="pcv1yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="533" EndPos="536" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of PCV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1900" max="2020"/>
      </valrng>
      <sumStat type="vald">
        7458
      </sumStat>
      <sumStat type="invd">
        18581
      </sumStat>
      <txt>
        <![CDATA[	
Year of PCV1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V245" name="pcv1date" files="F2" intrvl="discrete">
      <location StartPos="537" EndPos="546" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV1 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        7457
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V246" name="pcv1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="547" EndPos="547" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        3
      </sumStat>
      <sumStat type="invd">
        26036
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V247" name="pcv1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="548" EndPos="553" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of PCV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        8835
      </sumStat>
      <sumStat type="invd">
        17204
      </sumStat>
      <txt>
        Health centre of PCV1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V248" name="pcv1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="554" EndPos="554" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12655
      </sumStat>
      <sumStat type="invd">
        13384
      </sumStat>
      <txt>
        <![CDATA[
Problem with PCV1 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V249" name="pcv1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="555" EndPos="555" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12655
      </sumStat>
      <sumStat type="invd">
        13384
      </sumStat>
      <txt>
        Problem with PCV1 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for DPT1, HH1, PCV1, RV1 and P1: problem if vacc date is less than 5 weeks, or more than 10 weeks after birthdate (supposed to be at 6 weeks or later)
if "`vacc'"=="pcv1" replace `vacc'Sprob=1 if (pcv1date-birth_date<35 | pcv1date-birth_date>70) & pcv1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V250" name="pcv1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="556" EndPos="565" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had PCV2 (D)
      </labl>
      <sumStat type="vald">
        9125
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had PCV2]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv1intdate  (table[s]: all_vaccination_records [derived table])
variable: pcv1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V251" name="pcv1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="566" EndPos="566" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept PCV1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        12655
      </sumStat>
      <sumStat type="invd">
        13384
      </sumStat>
      <txt>
        Completeness of kept PCV1 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          4952
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          2445
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          436
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          38
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1232
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          3530
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13384
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V252" name="pcv2intdate" files="F2" intrvl="discrete">
      <location StartPos="567" EndPos="576" width="10" RecSegNo="1"/>
      <labl>
        Interview date for PCV2 report (D)
      </labl>
      <sumStat type="vald">
        12162
      </sumStat>
      <txt>
        <![CDATA[
Interview date for PCV2 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V253" name="pcv2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="577" EndPos="577" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for PCV2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12038
      </sumStat>
      <sumStat type="invd">
        14001
      </sumStat>
      <txt>
        <![CDATA[	
Whether health record seen for PCV2 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2589
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          9449
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14001
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V254" name="pcv2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="578" EndPos="578" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for PCV2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        12162
      </sumStat>
      <sumStat type="invd">
        13877
      </sumStat>
      <txt>
        <![CDATA[
Source  for PCV2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          735
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          9238
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1458
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          497
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          234
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13877
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V255" name="pcv2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="579" EndPos="579" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had PCV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12162
      </sumStat>
      <sumStat type="invd">
        13877
      </sumStat>
      <txt>
        <![CDATA[
Had PCV2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3755
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          8407
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13877
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V256" name="pcv2yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="580" EndPos="583" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of PCV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="2008" max="2020"/>
      </valrng>
      <sumStat type="vald">
        6596
      </sumStat>
      <sumStat type="invd">
        19443
      </sumStat>
      <txt>
        <![CDATA[	
Year of PCV2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V257" name="pcv2date" files="F2" intrvl="discrete">
      <location StartPos="584" EndPos="593" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV2 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        6594
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V258" name="pcv2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="594" EndPos="594" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV2 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        2
      </sumStat>
      <sumStat type="invd">
        26037
      </sumStat>
      <txt>
        <![CDATA[	
Date of PCV2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V259" name="pcv2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="595" EndPos="600" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of PCV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        8143
      </sumStat>
      <sumStat type="invd">
        17896
      </sumStat>
      <txt>
        Health centre of PCV2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V260" name="pcv2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="601" EndPos="601" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12162
      </sumStat>
      <sumStat type="invd">
        13877
      </sumStat>
      <txt>
        <![CDATA[
Problem with PCV2 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V261" name="pcv2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="602" EndPos="602" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12162
      </sumStat>
      <sumStat type="invd">
        13877
      </sumStat>
      <txt>
        Problem with PCV2 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2date  (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'"=="pcv2" replace `vacc'Sprob=1 if (pcv2date-pcv1date<21 | pcv2date-pcv1date>42 | pcv1date==.) & pcv2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V262" name="pcv2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="603" EndPos="612" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had PCV3 (D)
      </labl>
      <sumStat type="vald">
        8407
      </sumStat>
      <txt>
        <![CDATA[
First interview date when reported had PCV3]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv2intdate  (table[s]: all_vaccination_records [derived table])
variable: pcv2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V263" name="pcv2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="613" EndPos="613" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept PCV2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        12162
      </sumStat>
      <sumStat type="invd">
        13877
      </sumStat>
      <txt>
        Completeness of kept PCV2 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          4519
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          2023
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          508
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          10
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          12
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1324
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          3755
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13877
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V264" name="pcv3intdate" files="F2" intrvl="discrete">
      <location StartPos="614" EndPos="623" width="10" RecSegNo="1"/>
      <labl>
        Interview date for PCV3 report (D)
      </labl>
      <sumStat type="vald">
        11981
      </sumStat>
      <txt>
        <![CDATA[
Interview date for PCV3 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V265" name="pcv3cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="624" EndPos="624" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for PCV3 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        11847
      </sumStat>
      <sumStat type="invd">
        14192
      </sumStat>
      <txt>
        <![CDATA[
Whether health record seen for PCV3 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2717
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          9130
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14192
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V266" name="pcv3source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="625" EndPos="625" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for PCV3 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        11981
      </sumStat>
      <sumStat type="invd">
        14058
      </sumStat>
      <txt>
        <![CDATA[Source  for PCV3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          407
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          9522
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1337
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          475
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          240
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14058
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V267" name="pcv3yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="626" EndPos="626" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had PCV3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        11981
      </sumStat>
      <sumStat type="invd">
        14058
      </sumStat>
      <txt>
        Had PCV3 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          4055
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          7926
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14058
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv3yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V268" name="pcv3yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="627" EndPos="630" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of PCV3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="2009" max="2020"/>
      </valrng>
      <sumStat type="vald">
        5891
      </sumStat>
      <sumStat type="invd">
        20148
      </sumStat>
      <txt>
        <![CDATA[	
Year of PCV3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V269" name="pcv3date" files="F2" intrvl="discrete">
      <location StartPos="631" EndPos="640" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV3 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        5889
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV3 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V270" name="pcv3dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="641" EndPos="641" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of PCV3 vaccination is estimated  (D)]]>
      </labl>
      <sumStat type="vald">
        0
      </sumStat>
      <sumStat type="invd">
        26039
      </sumStat>
      <txt>
        <![CDATA[
Date of PCV3 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V271" name="pcv3vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="642" EndPos="647" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of PCV3 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        7674
      </sumStat>
      <sumStat type="invd">
        18365
      </sumStat>
      <txt>
        Health centre of PCV3 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V272" name="pcv3Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="648" EndPos="648" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV3 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        11981
      </sumStat>
      <sumStat type="invd">
        14058
      </sumStat>
      <txt>
        Problem with PCV3 date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V273" name="pcv3Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="649" EndPos="649" width="1" RecSegNo="1"/>
      <labl>
        Problem with PCV3 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        11981
      </sumStat>
      <sumStat type="invd">
        14058
      </sumStat>
      <txt>
        Problem with PCV3 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3date  (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'"=="pcv3" replace `vacc'Sprob=1 if (pcv3date<birth_date | pcv3date-pcv2date<21 | pcv3date-pcv2date>42 | pcv2date==.) & pcv3date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V274" name="pcv3fyintdate" files="F2" intrvl="discrete">
      <location StartPos="650" EndPos="659" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had PCV4 (D)
      </labl>
      <sumStat type="vald">
        7926
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had PCV4]]>
      </txt>
      <codInstr>
        <![CDATA[variable: pcv3intdate  (table[s]: all_vaccination_records [derived table])
variable: pcv3yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V275" name="pcv3keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="660" EndPos="660" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept PCV3 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        11981
      </sumStat>
      <sumStat type="invd">
        14058
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept PCV3 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          3857
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          1983
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          593
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          29
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          9
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1444
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          4055
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14058
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: pcv3keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V276" name="rv1intdate" files="F2" intrvl="discrete">
      <location StartPos="661" EndPos="670" width="10" RecSegNo="1"/>
      <labl>
        Interview date for RV1 report (D)
      </labl>
      <sumStat type="vald">
        12560
      </sumStat>
      <txt>
        <![CDATA[
Interview date for RV1 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V277" name="rv1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="671" EndPos="671" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for RV1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12395
      </sumStat>
      <sumStat type="invd">
        13644
      </sumStat>
      <txt>
        Whether health record seen for RV1 report
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3197
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          9198
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13644
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V278" name="rv1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="672" EndPos="672" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for RV1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        12560
      </sumStat>
      <sumStat type="invd">
        13479
      </sumStat>
      <txt>
        <![CDATA[
Source  for RV1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          1555
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          9513
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          933
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          320
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          239
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13479
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V279" name="rv1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="673" EndPos="673" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had RV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12560
      </sumStat>
      <sumStat type="invd">
        13479
      </sumStat>
      <txt>
        <![CDATA[
Had RV1 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          5053
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          7507
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13479
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: rv1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V280" name="rv1yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="674" EndPos="677" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of RV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="2009" max="2020"/>
      </valrng>
      <sumStat type="vald">
        5507
      </sumStat>
      <sumStat type="invd">
        20532
      </sumStat>
      <txt>
        <![CDATA[	
Year of RV1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V281" name="rv1date" files="F2" intrvl="discrete">
      <location StartPos="678" EndPos="687" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of RV1 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        5503
      </sumStat>
      <txt>
        <![CDATA[	
Date of RV1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V282" name="rv1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="688" EndPos="688" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of RV1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        3
      </sumStat>
      <sumStat type="invd">
        26036
      </sumStat>
      <txt>
        <![CDATA[	
Date of RV1 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V283" name="rv1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="689" EndPos="694" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of RV1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        7285
      </sumStat>
      <sumStat type="invd">
        18754
      </sumStat>
      <txt>
        Health centre of RV1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: rv1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V284" name="rv1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="695" EndPos="695" width="1" RecSegNo="1"/>
      <labl>
        Problem with RV1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12560
      </sumStat>
      <sumStat type="invd">
        13479
      </sumStat>
      <txt>
        Problem with RV1 date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: rv1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V285" name="rv1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="696" EndPos="696" width="1" RecSegNo="1"/>
      <labl>
        Problem with RV1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12560
      </sumStat>
      <sumStat type="invd">
        13479
      </sumStat>
      <txt>
        Problem with RV1 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: rv1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for DPT1, HH1, PCV1, RV1 and P1: problem if vacc date is less than 5 weeks, or more than 10 weeks after birthdate (supposed to be at 6 weeks or later)
if "`vacc'"=="rv1" replace `vacc'Sprob=1 if (rv1date-birth_date<35 | rv1date-birth_date>70) & rv1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V286" name="rv1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="697" EndPos="706" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had RV2 (D)
      </labl>
      <sumStat type="vald">
        7507
      </sumStat>
      <txt>
        First interview date when reported had RV2
      </txt>
      <codInstr>
        <![CDATA[variable: rv1intdate  (table[s]: all_vaccination_records [derived table])
variable: rv1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V287" name="rv1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="707" EndPos="707" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept RV1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        12560
      </sumStat>
      <sumStat type="invd">
        13479
      </sumStat>
      <txt>
        <![CDATA[
Completeness of kept RV1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          3926
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          1524
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          549
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          35
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          9
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          8
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1455
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          1
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          5053
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13479
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: rv1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V288" name="rv2intdate" files="F2" intrvl="discrete">
      <location StartPos="708" EndPos="717" width="10" RecSegNo="1"/>
      <labl>
        Interview date for RV2 report (D)
      </labl>
      <sumStat type="vald">
        12063
      </sumStat>
      <txt>
        <![CDATA[
Interview date for RV2 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V289" name="rv2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="718" EndPos="718" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for RV2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        11894
      </sumStat>
      <sumStat type="invd">
        14145
      </sumStat>
      <txt>
        Whether health record seen for RV2 report
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3309
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          8585
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          14145
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V290" name="rv2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="719" EndPos="719" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for RV2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        12063
      </sumStat>
      <sumStat type="invd">
        13976
      </sumStat>
      <txt>
        <![CDATA[	
Source  for RV2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          692
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          9873
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          934
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          321
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          243
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13976
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V291" name="rv2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="720" EndPos="720" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had RV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        12063
      </sumStat>
      <sumStat type="invd">
        13976
      </sumStat>
      <txt>
        <![CDATA[
Had RV2 vaccination]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          5300
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          6763
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13976
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: rv2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V292" name="rv2yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="721" EndPos="724" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of RV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="2009" max="2020"/>
      </valrng>
      <sumStat type="vald">
        4618
      </sumStat>
      <sumStat type="invd">
        21421
      </sumStat>
      <txt>
        <![CDATA[	
Year of RV2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V293" name="rv2date" files="F2" intrvl="discrete">
      <location StartPos="725" EndPos="734" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of RV2 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        4615
      </sumStat>
      <txt>
        <![CDATA[
Date of RV2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V294" name="rv2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="735" EndPos="735" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of RV2 vaccination is estimated  (D)]]>
      </labl>
      <sumStat type="vald">
        0
      </sumStat>
      <sumStat type="invd">
        26039
      </sumStat>
      <txt>
        <![CDATA[	
Date of RV2 vaccination is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V295" name="rv2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="736" EndPos="741" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of RV2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        6555
      </sumStat>
      <sumStat type="invd">
        19484
      </sumStat>
      <txt>
        Health centre of RV2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: rv2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V296" name="rv2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="742" EndPos="742" width="1" RecSegNo="1"/>
      <labl>
        Problem with RV2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12063
      </sumStat>
      <sumStat type="invd">
        13976
      </sumStat>
      <txt>
        <![CDATA[
Problem with RV2 date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: rv2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V297" name="rv2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="743" EndPos="743" width="1" RecSegNo="1"/>
      <labl>
        Problem with RV2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        12063
      </sumStat>
      <sumStat type="invd">
        13976
      </sumStat>
      <txt>
        Problem with RV2 date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: rv2date  (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'"=="rv2" replace `vacc'Sprob=1 if (rv2date-rv1date<21 | rv2date-rv1date>42 | rv1date==.) & rv2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V298" name="rv2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="744" EndPos="753" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had RV3 (D)
      </labl>
      <sumStat type="vald">
        6763
      </sumStat>
      <txt>
        First interview date when reported had RV3
      </txt>
      <codInstr>
        <![CDATA[variable: rv2intdate  (table[s]: all_vaccination_records [derived table])
variable: rv2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V299" name="rv2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="754" EndPos="754" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept RV2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        12063
      </sumStat>
      <sumStat type="invd">
        13976
      </sumStat>
      <txt>
        <![CDATA[	
Completeness of kept RV2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          3183
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          1394
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          606
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          5
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          11
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1553
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          5300
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          13976
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: rv2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V300" name="meas1intdate" files="F2" intrvl="discrete">
      <location StartPos="755" EndPos="764" width="10" RecSegNo="1"/>
      <labl>
        Interview date for measles1 report (D)
      </labl>
      <sumStat type="vald">
        20208
      </sumStat>
      <txt>
        <![CDATA[
Interview date for measles1 report]]>
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V301" name="meas1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="765" EndPos="765" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for measles1 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        20007
      </sumStat>
      <sumStat type="invd">
        6032
      </sumStat>
      <txt>
        <![CDATA[
Whether health record seen for measles1 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2259
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          17748
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          6032
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V302" name="meas1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="766" EndPos="766" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for measles1 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        20208
      </sumStat>
      <sumStat type="invd">
        5831
      </sumStat>
      <txt>
        <![CDATA[Source  for measles1 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          209
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          2688
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          584
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          1165
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13808
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1269
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          184
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          301
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          5831
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V303" name="meas1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="767" EndPos="767" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had measles1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <sumStat type="vald">
        20208
      </sumStat>
      <sumStat type="invd">
        5831
      </sumStat>
      <txt>
        Had measles1 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          1845
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          18363
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          5831
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: meas1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V304" name="meas1yr" files="F2" dcml="0" intrvl="contin">
      <location StartPos="768" EndPos="771" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of measles1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="1997" max="2020"/>
      </valrng>
      <sumStat type="vald">
        14831
      </sumStat>
      <sumStat type="invd">
        11208
      </sumStat>
      <txt>
        <![CDATA[	
Year of measles1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V305" name="meas1date" files="F2" intrvl="discrete">
      <location StartPos="772" EndPos="781" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of measles1 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        14821
      </sumStat>
      <txt>
        Date of measles1 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: meas1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V306" name="meas1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="782" EndPos="782" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of measles1 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        11
      </sumStat>
      <sumStat type="invd">
        26028
      </sumStat>
      <txt>
        Date of measles1 vaccination is estimated
      </txt>
      <codInstr>
        <![CDATA[variable: meas1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V307" name="meas1vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="783" EndPos="788" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of measles1 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="999999"/>
      </valrng>
      <sumStat type="vald">
        17745
      </sumStat>
      <sumStat type="invd">
        8294
      </sumStat>
      <txt>
        <![CDATA[	
Health centre of measles1 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas1vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V308" name="meas1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="789" EndPos="789" width="1" RecSegNo="1"/>
      <labl>
        Problem with measles1 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        20208
      </sumStat>
      <sumStat type="invd">
        5831
      </sumStat>
      <txt>
        Problem with measles1 date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: meas1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V309" name="meas1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="790" EndPos="790" width="1" RecSegNo="1"/>
      <labl>
        Problem with measles1 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        20208
      </sumStat>
      <sumStat type="invd">
        5831
      </sumStat>
      <txt>
        <![CDATA[	
Problem with measles1 date (schedule issue)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for MEAS1: problem if vacc date is less than 8 months, or more than 12 months after birthdate (supposed to be after 9 months)
if "`vacc'"=="meas1" replace `vacc'Sprob=1 if (meas1date-birth_date<244 | meas1date-birth_date>365) & meas1date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V310" name="meas1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="791" EndPos="800" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had measles2 (D)
      </labl>
      <sumStat type="vald">
        18363
      </sumStat>
      <txt>
        <![CDATA[	
First interview date when reported had measles2]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas1intdate  (table[s]: all_vaccination_records [derived table])
variable: meas1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V311" name="meas1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="801" EndPos="801" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept measles1 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        20208
      </sumStat>
      <sumStat type="invd">
        5831
      </sumStat>
      <txt>
        Completeness of kept measles1 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          12479
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          2140
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          1475
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          80
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          93
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          29
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          2067
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          1845
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          5831
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: meas1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V312" name="meas2intdate" files="F2" intrvl="discrete">
      <location StartPos="802" EndPos="811" width="10" RecSegNo="1"/>
      <labl>
        Interview date for measles2 report (D)
      </labl>
      <sumStat type="vald">
        2791
      </sumStat>
      <txt>
        Interview date for measles2 report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V313" name="meas2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="812" EndPos="812" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for measles2 report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        2784
      </sumStat>
      <sumStat type="invd">
        23255
      </sumStat>
      <txt>
        <![CDATA[
Whether health record seen for measles2 report]]>
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          819
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          1965
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          23255
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V314" name="meas2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="813" EndPos="813" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for measles2 report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        2791
      </sumStat>
      <sumStat type="invd">
        23248
      </sumStat>
      <txt>
        <![CDATA[Source  for measles2 report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          20
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          2610
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          161
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          23248
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V315" name="meas2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="814" EndPos="814" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had measles2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        2791
      </sumStat>
      <sumStat type="invd">
        23248
      </sumStat>
      <txt>
        Had measles2 vaccination
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2011
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          780
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          23248
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: meas2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V316" name="meas2yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="815" EndPos="818" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of measles2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="2012" max="2019"/>
      </valrng>
      <sumStat type="vald">
        399
      </sumStat>
      <sumStat type="invd">
        25640
      </sumStat>
      <txt>
        Year of measles2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: meas2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V317" name="meas2date" files="F2" intrvl="discrete">
      <location StartPos="819" EndPos="828" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of measles2 vaccination  (D)]]>
      </labl>
      <sumStat type="vald">
        387
      </sumStat>
      <txt>
        Date of measles2 vaccination
      </txt>
      <codInstr>
        <![CDATA[variable: meas2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V318" name="meas2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="829" EndPos="829" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of measles2 vaccination is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        3
      </sumStat>
      <sumStat type="invd">
        26036
      </sumStat>
      <txt>
        Date of measles2 vaccination is estimated
      </txt>
      <codInstr>
        <![CDATA[variable: meas2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V319" name="meas2vc" files="F2" dcml="0" intrvl="contin">
      <location StartPos="830" EndPos="835" width="6" RecSegNo="1"/>
      <labl>
        <![CDATA[Health centre of measles2 vaccination  (D)]]>
      </labl>
      <valrng>
        <range min="10000" max="120101"/>
      </valrng>
      <sumStat type="vald">
        754
      </sumStat>
      <sumStat type="invd">
        25285
      </sumStat>
      <txt>
        <![CDATA[	
Health centre of measles2 vaccination]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas2vc  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V320" name="meas2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="836" EndPos="836" width="1" RecSegNo="1"/>
      <labl>
        Problem with measles2 date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        2791
      </sumStat>
      <sumStat type="invd">
        23248
      </sumStat>
      <txt>
        Problem with measles2 date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: meas2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V321" name="meas2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="837" EndPos="837" width="1" RecSegNo="1"/>
      <labl>
        Problem with measles2 date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        2791
      </sumStat>
      <sumStat type="invd">
        23248
      </sumStat>
      <txt>
        <![CDATA[
Problem with measles2 date (schedule issue)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for MEAS2: problem if vacc date is before first dose (supposed to be after 1st dose)
if "`vacc'"=="meas2" replace `vacc'Sprob=1 if (meas2date<meas1date | meas1date==.) & meas2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V322" name="meas2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="838" EndPos="847" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had measles3 (D)
      </labl>
      <sumStat type="vald">
        780
      </sumStat>
      <txt>
        <![CDATA[
First interview date when reported had measles3]]>
      </txt>
      <codInstr>
        <![CDATA[variable: meas2intdate  (table[s]: all_vaccination_records [derived table])
variable: meas2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V323" name="meas2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="848" EndPos="848" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept measles2 report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        2791
      </sumStat>
      <sumStat type="invd">
        23248
      </sumStat>
      <txt>
        Completeness of kept measles2 report
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          354
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          23
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          88
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          2
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          6
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          2
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          305
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          2011
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          23248
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: meas2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V324" name="vita1intdate" files="F2" intrvl="discrete">
      <location StartPos="849" EndPos="858" width="10" RecSegNo="1"/>
      <labl>
        Interview date for 1st vitamin A report (D)
      </labl>
      <sumStat type="vald">
        26039
      </sumStat>
      <txt>
        Interview date for 1st vitamin A report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V325" name="vita1cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="859" EndPos="859" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for 1st vitamin A report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        25834
      </sumStat>
      <sumStat type="invd">
        205
      </sumStat>
      <txt>
        Whether health record seen for 1st vitamin A report
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          2258
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          23576
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          205
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V326" name="vita1source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="860" EndPos="860" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for 1st vitamin A report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Source  for 1st vitamin A report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          5971
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3760
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          694
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          599
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13220
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          1216
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          253
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          326
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V327" name="vita1yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="861" EndPos="861" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had 1st vitamin A dose  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[	
Had 1st vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vita1yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V328" name="vita1yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="862" EndPos="865" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of 1st vitamin A dose  (D)]]>
      </labl>
      <valrng>
        <range min="2005" max="2020"/>
      </valrng>
      <sumStat type="vald">
        9864
      </sumStat>
      <sumStat type="invd">
        16175
      </sumStat>
      <txt>
        <![CDATA[	
Year of 1st vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vita1yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V329" name="vita1date" files="F2" intrvl="discrete">
      <location StartPos="866" EndPos="875" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of 1st vitamin A dose  (D)]]>
      </labl>
      <sumStat type="vald">
        9378
      </sumStat>
      <txt>
        Date of 1st vitamin A dose
      </txt>
      <codInstr>
        <![CDATA[variable: vita1date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V330" name="vita1dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="876" EndPos="876" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of 1st vitamin A dose is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        7366
      </sumStat>
      <sumStat type="invd">
        18673
      </sumStat>
      <txt>
        <![CDATA[	
Date of 1st vitamin A dose is estimated]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vita1dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V331" name="vita1Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="877" EndPos="877" width="1" RecSegNo="1"/>
      <labl>
        Problem with 1st vitamin A date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Problem with 1st vitamin A date (missing or before DOB)
      </txt>
      <codInstr>
        <![CDATA[variable: vita1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V332" name="vita1Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="878" EndPos="878" width="1" RecSegNo="1"/>
      <labl>
        Problem with 1st vitamin A date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Problem with 1st vitamin A date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: vita1date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V333" name="vita1fyintdate" files="F2" intrvl="discrete">
      <location StartPos="879" EndPos="888" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had 1st vitamin A (D)
      </labl>
      <sumStat type="vald">
        20641
      </sumStat>
      <txt>
        First interview date when reported had 1st vitamin A
      </txt>
      <codInstr>
        <![CDATA[variable: vita1intdate  (table[s]: all_vaccination_records [derived table])
variable: vita1yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V334" name="vita1keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="889" EndPos="889" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept 1st vitamin A report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[	
Completeness of kept 1st vitamin A report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          5569
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          3602
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          9737
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          15
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          79
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          113
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          1526
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          5398
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: vita1keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V335" name="vita2intdate" files="F2" intrvl="discrete">
      <location StartPos="890" EndPos="899" width="10" RecSegNo="1"/>
      <labl>
        Interview date for 2nd vitamin A report (D)
      </labl>
      <sumStat type="vald">
        26039
      </sumStat>
      <txt>
        Interview date for 2nd vitamin A report
      </txt>
      <codInstr>
        <![CDATA[variable: intdate  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V336" name="vita2cardseen" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="900" EndPos="900" width="1" RecSegNo="1"/>
      <labl>
        Whether health record seen for 2nd vitamin A report (D)
      </labl>
      <valrng>
        <range min="0" max="9"/>
      </valrng>
      <invalrng>
        <item VALUE="9"/>
      </invalrng>
      <sumStat type="vald">
        25778
      </sumStat>
      <sumStat type="invd">
        261
      </sumStat>
      <txt>
        Whether health record seen for 2nd vitamin A report
      </txt>
      <catgry>
        <catValu>
          0
        </catValu>
        <labl>
          No
        </labl>
        <catStat type="freq">
          3293
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          Yes
        </labl>
        <catStat type="freq">
          22485
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          Not applicable
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          Unknown
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          9
        </catValu>
        <labl>
          Missing
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry missing="Y">
        <catValu>
          Sysmiss
        </catValu>
        <catStat type="freq">
          261
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: cardseen  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V337" name="vita2source" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="901" EndPos="901" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Source  for 2nd vitamin A report (D)]]>
      </labl>
      <valrng>
        <range min="1" max="8"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Source  for 2nd vitamin A report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          crs_birth
        </labl>
        <catStat type="freq">
          6072
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          cen_individ
        </labl>
        <catStat type="freq">
          3760
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          crs_cenm
        </labl>
        <catStat type="freq">
          702
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          crs_bfup
        </labl>
        <catStat type="freq">
          598
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          css_sei
        </labl>
        <catStat type="freq">
          13348
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          ves_vese
        </labl>
        <catStat type="freq">
          969
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          tmt_tmtv
        </labl>
        <catStat type="freq">
          242
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          gp_va
        </labl>
        <catStat type="freq">
          348
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: source  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V338" name="vita2yn" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="902" EndPos="902" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Had 2nd vitamin A dose  (D)]]>
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Had 2nd vitamin A dose
      </txt>
      <codInstr>
        <![CDATA[variable: vita2yn  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V339" name="vita2yr" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="903" EndPos="906" width="4" RecSegNo="1"/>
      <labl>
        <![CDATA[Year of 2nd vitamin A dose  (D)]]>
      </labl>
      <valrng>
        <range min="2004" max="2019"/>
      </valrng>
      <sumStat type="vald">
        6441
      </sumStat>
      <sumStat type="invd">
        19598
      </sumStat>
      <txt>
        <![CDATA[	
Year of 2nd vitamin A dose]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vita2yr  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V340" name="vita2date" files="F2" intrvl="discrete">
      <location StartPos="907" EndPos="916" width="10" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of 2nd vitamin A dose  (D)]]>
      </labl>
      <sumStat type="vald">
        5951
      </sumStat>
      <txt>
        Date of 2nd vitamin A dose
      </txt>
      <codInstr>
        <![CDATA[variable: vita2date  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V341" name="vita2dayest" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="917" EndPos="917" width="1" RecSegNo="1"/>
      <labl>
        <![CDATA[Date of 2nd vitamin A dose is estimated  (D)]]>
      </labl>
      <valrng>
        <range min="1" max="1"/>
      </valrng>
      <sumStat type="vald">
        1026
      </sumStat>
      <sumStat type="invd">
        25013
      </sumStat>
      <txt>
        Date of 2nd vitamin A dose is estimated
      </txt>
      <codInstr>
        <![CDATA[variable: vita2dayest  (table[s]: all_vaccination_records [derived table])]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V342" name="vita2Bprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="918" EndPos="918" width="1" RecSegNo="1"/>
      <labl>
        Problem with 2nd vitamin A date (missing or before DOB) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[	
Problem with 2nd vitamin A date (missing or before DOB)]]>
      </txt>
      <codInstr>
        <![CDATA[variable: vita2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

gen `vacc'Bprob=0
replace `vacc'Bprob=1 if (`vacc'date<birth_date & `vacc'date~=. & birth_date~=.) | (`vacc'date==. & `vacc'yn==1)]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V343" name="vita2Sprob" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="919" EndPos="919" width="1" RecSegNo="1"/>
      <labl>
        Problem with 2nd vitamin A date (schedule issue) (D)
      </labl>
      <valrng>
        <range min="0" max="1"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Problem with 2nd vitamin A date (schedule issue)
      </txt>
      <codInstr>
        <![CDATA[variable: vita2date  (table[s]: all_vaccination_records [derived table])
variable: birth_date  (table[s]: all_vaccination_records [derived table])

*for VITA2: problem if vacc date is before 1st dose, or less than 11 months, or more than 18 months after birthdate (supposed to be at 12-17 months)
if "`vacc'"=="vita2" replace `vacc'Sprob=1 if (vita2date<vita1date | vita2date-birth_date<336 | vita2date-birth_date>549) & vita2date~=. & birth_date~=.]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V344" name="vita2fyintdate" files="F2" intrvl="discrete">
      <location StartPos="920" EndPos="929" width="10" RecSegNo="1"/>
      <labl>
        First interview date when reported had 2nd vitamin A (D)
      </labl>
      <sumStat type="vald">
        18717
      </sumStat>
      <txt>
        First interview date when reported had 2nd vitamin A
      </txt>
      <codInstr>
        <![CDATA[variable: vita2intdate  (table[s]: all_vaccination_records [derived table])
variable: vita2yn  (table[s]: all_vaccination_records [derived table])

*calculate first interview date where card seen and vaccine recorded as yes
bys ident: egen tempC=min(`vacc'intdate) if card==1 & `vacc'yn==1
bys ident: egen tempNC=min(`vacc'intdate) if card==2 & `vacc'yn==1
bys ident: egen `vacc'fyintdate=min(tempC)
bys ident: egen tempNCd=min(tempNC)
replace `vacc'fyintdate=tempNCd if `vacc'fyintdate==. & tempNCd~=.]]>
      </codInstr>
      <varFormat type="character" formatname="Nesstar.date" schema="other" category="date"/>
    </var>
    <var ID="V345" name="vita2keep" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="930" EndPos="930" width="1" RecSegNo="1"/>
      <labl>
        Completeness of kept 2nd vitamin A report (D)
      </labl>
      <valrng>
        <range min="1" max="9"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[	
Completeness of kept 2nd vitamin A report]]>
      </txt>
      <catgry>
        <catValu>
          1
        </catValu>
        <labl>
          vacc=y, date ok, card seen
        </labl>
        <catStat type="freq">
          2253
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          2
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card seen
        </labl>
        <catStat type="freq">
          3521
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          3
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card seen
        </labl>
        <catStat type="freq">
          10532
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          4
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card seen
        </labl>
        <catStat type="freq">
          2
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          vacc=y, date ok, card NOT seen
        </labl>
        <catStat type="freq">
          39
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          vacc=y, date NOT ok (S), card NOT seen
        </labl>
        <catStat type="freq">
          136
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          vacc=y, date NOT ok (B), card NOT seen
        </labl>
        <catStat type="freq">
          2234
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          8
        </catValu>
        <labl>
          vacc=y, date NOT ok (S&amp;B), card NOT seen
        </labl>
        <catStat type="freq">
          0
        </catStat>
      </catgry>
      <catgry>
        <catValu>
          9
        </catValu>
        <labl>
          last report of vacc=n
        </labl>
        <catStat type="freq">
          7322
        </catStat>
      </catgry>
      <codInstr>
        <![CDATA[variable: vita2keep  (table[s]: all_vaccination_records [derived table])

la def vacckeep 1 "vacc=y, date ok, card seen" 2 "vacc=y, date NOT ok (S), card seen" 3 "vacc=y, date NOT ok (B), card seen" 4 "vacc=y, date NOT ok (S&B), card seen" 5 "vacc=y, date ok, card NOT seen" 6 "vacc=y, date NOT ok (S), card NOT seen" 7 "vacc=y, date NOT ok (B), card NOT seen" 8 "vacc=y, date NOT ok (S&B), card NOT seen" 9 "last report of vacc=n"
*1. keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=seen
gen `vacc'keep=1 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==1
bys ident: egen kept=max(`vacc'keep)
*2. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=seen
replace `vacc'keep=2 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*3. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=seen
replace `vacc'keep=3 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*4. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=seen
replace `vacc'keep=4 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==1 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*5. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=no and healthcard=not seen
replace `vacc'keep=5 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*6. if no record identified: keep the first record where the vaccine=yes, birth-date problem=no, schedule problem=yes and healthcard=not seen
replace `vacc'keep=6 if order==1 & `vacc'yn==1 & `vacc'Bprob==0 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*7. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=no and healthcard=not seen
replace `vacc'keep=7 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==0 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*8. if no record identified: keep the first record where the vaccine=yes, birth-date problem=yes, schedule problem=yes and healthcard=not seen
replace `vacc'keep=8 if order==1 & `vacc'yn==1 & `vacc'Bprob==1 & `vacc'Sprob==1 & card==2 & kept==.
drop kept
bys ident: egen kept=max(`vacc'keep)
*9. if no record identified: keep the LAST record where the vaccine is recorded as no (regardless whether healthcard seen or not)
replace `vacc'keep=9 if Norder==Ntotal & `vacc'yn==0 & kept==.
la val `vacc'keep vacckeep
drop kept]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V346" name="nvac" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="931" EndPos="932" width="2" RecSegNo="1"/>
      <labl>
        Number of vaccinations received (D)
      </labl>
      <valrng>
        <range min="1" max="18"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        <![CDATA[
Number of vaccinations received]]>
      </txt>
      <codInstr>
        <![CDATA[variable: bcgyn  (table[s]: all_vaccination_records [derived table])
variable: dpt1yn  (table[s]: all_vaccination_records [derived table])
variable: dpt2yn  (table[s]: all_vaccination_records [derived table])
variable: dpt3yn  (table[s]: all_vaccination_records [derived table])
variable: hh1yn  (table[s]: all_vaccination_records [derived table])
variable: hh2yn  (table[s]: all_vaccination_records [derived table])
variable: hh3yn  (table[s]: all_vaccination_records [derived table])
variable: p0yn  (table[s]: all_vaccination_records [derived table])
variable: p1yn  (table[s]: all_vaccination_records [derived table])
variable: p2yn  (table[s]: all_vaccination_records [derived table])
variable: p3yn  (table[s]: all_vaccination_records [derived table])
variable: pcv1yn  (table[s]: all_vaccination_records [derived table])
variable: pcv2yn  (table[s]: all_vaccination_records [derived table])
variable: pcv3yn  (table[s]: all_vaccination_records [derived table])
variable: rv1yn  (table[s]: all_vaccination_records [derived table])
variable: rv2yn  (table[s]: all_vaccination_records [derived table])
variable: meas1yn  (table[s]: all_vaccination_records [derived table])
variable: meas2yn  (table[s]: all_vaccination_records [derived table])

egen nvac=rownonmiss(bcgyn dpt1yn dpt2yn dpt3yn hh1yn hh2yn hh3yn p0yn p1yn p2yn p3yn pcv1yn pcv2yn pcv3yn rv1yn rv2yn meas1yn meas2yn)
drop if nvac==0]]>
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
    <var ID="V347" name="nvacgp" files="F2" dcml="0" intrvl="discrete">
      <location StartPos="933" EndPos="933" width="1" RecSegNo="1"/>
      <labl>
        Grouped number of vaccinations received (D)
      </labl>
      <valrng>
        <range min="1" max="7"/>
      </valrng>
      <sumStat type="vald">
        26039
      </sumStat>
      <sumStat type="invd">
        0
      </sumStat>
      <txt>
        Grouped number of vaccinations received
      </txt>
      <catgry>
        <catValu>
          5
        </catValu>
        <labl>
          5-9
        </labl>
      </catgry>
      <catgry>
        <catValu>
          6
        </catValu>
        <labl>
          10-14
        </labl>
      </catgry>
      <catgry>
        <catValu>
          7
        </catValu>
        <labl>
          15+
        </labl>
      </catgry>
      <codInstr>
        recode nvac (5/9=5 "5-9") (10/14=6 "10-14") (15/max=7 "15+"), gen(nvacgp)
      </codInstr>
      <varFormat type="numeric" schema="other"/>
    </var>
  </dataDscr>
</codeBook>
