5.19. Step 19: Child Vaccination

5.19.1. Model Description

At this step we add a module for child vaccination (immunization). Immunization is decided at birth and depends on a set of individual and mother’s characteristics. As prenatal care is an important predictor for child immunization, the module also includes a model for prenatal care receipt.

5.19.2. The ChildVaccination.mpp Module

This module implements child vaccination. A child is assumed to be immunized if it received the following 8 doses of vaccines during the first year of life:

  • 1 dose of Bacillus of Calmette and Guérin (BCG) – a vaccine against tuberculosis
  • 3 doses of DPT – a mixture of three vaccines to immunize against diphtheria, pertussis and tetanus
  • 3 doses of polio;
  • 1 dose of measles.

Immunization is decided at birth and depends on a set of individual and mother’s characteristics. A key predictor for immunization is if the mother has received prenatal care. Therefore, immunization is decided in two steps based on logistic regression models. Based on a first model we decide if a mother has received prenatal care. Immunization is then decided by models estimated separately for children of mothers who have received prenatal care and those whose mothers have not received prenatal care. The model has two parameters - PreNatalCareOdds and ChildVaccinationOdds - which contain sets of odds of receiving prenatal care respectively receiving all required vaccines. The lists of parameters are declared in classifications – PRENATCARE_PARA, VACCINATION_PARA – which are part of the _CountryContext module, as they contains country specific categories like region and ethnicity. Immunization is decided according these models for all children born as residents during the simulation. Children born abroad during the simulation sample the immunization status of resident 0 year old peers living in the region assigned to them as region of entry.



////////////////////////////////////////////////////////////////////////////////////////////////////
// Actor Sets
////////////////////////////////////////////////////////////////////////////////////////////////////

//EN Resident babies by district born in simulation
actor_set Person asResidentBabiesByDistrict[district_nat]
    filter is_alive && integer_age == 0 && is_resident && person_type == PT_CHILD;

//EN Resident Babies born in simulation
actor_set Person asResidentBabies
    filter is_alive && integer_age == 0 && is_resident && person_type == PT_CHILD;


classification GOT_PRENAT_CARE  //EN Received prenatal care
{
    GPC_NO,                     //EN No prenatal care was received
    GPC_YES                     //EN Some prenatal care was received
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// Parameters
////////////////////////////////////////////////////////////////////////////////////////////////////

parameters
{
    //EN Pre-natal Care (odds)
    double PreNatalCareOdds[SIM_YEAR_RANGE][PRENATCARE_PARA];

    //EN Child Vaccination (odds)
    double ChildVaccinationOdds[GOT_PRENAT_CARE][SIM_YEAR_RANGE][VACCINATION_PARA];
};

parameter_group PG_ChildVaccination //EN Child Vaccination (Immunization)
{
    PreNatalCareOdds, ChildVaccinationOdds
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// Actor Declarations
////////////////////////////////////////////////////////////////////////////////////////////////////

actor Person
{
    //EN Ethnicity
    ETHNICITY_SHORT ethnicity_short = aggregate( ethnicity, ETHNICITY_SHORT);

    //EN Received all vaccines required for immunization
    logical is_immunized = { FALSE };

    //EN Mother received prenatal care
    GOT_PRENAT_CARE got_prenat_care = { GPC_NO };

    void DecideImmunizationStatusResidents();   //EN Decide immunization status of resident born
    void DecideImmunizationStatusImmigrants();  //EN Decide immunization status of foreign born
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// Implementation
////////////////////////////////////////////////////////////////////////////////////////////////////

void Person::DecideImmunizationStatusResidents()
{
    if (in_projected_time && is_resident)
    {
        int nIndex = SPLIT(time - mother_age_at_birth, IMMU_YOB_PART); // mothers yob index
        int nYear = RANGE_POS(SIM_YEAR_RANGE, calendar_year);

        // Prenatal care
        double dOddsCare = PreNatalCareOdds[nYear][PP_CONSTANT];                                      // 0
        if (educ_mother == EOL_MEDIUM) dOddsCare = dOddsCare * PreNatalCareOdds[nYear][PP_EDUCMO_1];  // 1
        if (educ_mother == EOL_HIGH)   dOddsCare = dOddsCare * PreNatalCareOdds[nYear][PP_EDUCMO_2];  // 2
        if (region_nat > REGN_00)      dOddsCare = dOddsCare * PreNatalCareOdds[nYear][region_nat+2]; // 3+
        if (nIndex > 0)                dOddsCare = dOddsCare
            * PreNatalCareOdds[nYear][nIndex + SIZE(REGION_NAT)];
        if (mother_age_at_birth < 18)  dOddsCare = dOddsCare * PreNatalCareOdds[nYear][PP_YOUNGMO];

        double dProbCare = dOddsCare / (dOddsCare + 1);
        if (RandUniform(52) < dProbCare) got_prenat_care = GPC_YES;

        // Immunization
        double dOdds = ChildVaccinationOdds[got_prenat_care][nYear][IP_CONSTANT];                                  // 0
        if (sex==MALE)                 dOdds = dOdds * ChildVaccinationOdds[got_prenat_care][nYear][IP_MALE];      // 1
        if (educ_mother == EOL_MEDIUM) dOdds = dOdds * ChildVaccinationOdds[got_prenat_care][nYear][IP_EDUCMO_1];  // 2
        if (educ_mother == EOL_HIGH)   dOdds = dOdds * ChildVaccinationOdds[got_prenat_care][nYear][IP_EDUCMO_2];  // 3
        if (region_nat > REGN_00)      dOdds = dOdds * ChildVaccinationOdds[got_prenat_care][nYear][region_nat+3]; // 4+
        if (ethnicity_short > ES_00)   dOdds = dOdds
            * ChildVaccinationOdds[got_prenat_care][nYear][ethnicity_short + SIZE(REGION_NAT) + 2];
        if (nIndex > 0)                dOdds = dOdds
            * ChildVaccinationOdds[got_prenat_care][nYear][nIndex + SIZE(REGION_NAT) + SIZE(ETHNICITY_SHORT) + 1];
        if (mother_age_at_birth < 18)  dOdds = dOdds * ChildVaccinationOdds[got_prenat_care][nYear][IP_YOUNGMO];

        double dProb = dOdds / (dOdds + 1);
        if (RandUniform(48) < dProb) is_immunized = TRUE;
    }
}

void Person::DecideImmunizationStatusImmigrants()
{
    if (in_projected_time)
    {
        if (asResidentBabiesByDistrict[district_immi]->Count() > 0)
        {
            auto prDonor = asResidentBabiesByDistrict[district_immi]->GetRandom(RandUniform(49));
            got_prenat_care = prDonor->got_prenat_care;
            is_immunized = prDonor->is_immunized;
        }
        else if (asResidentBabies->Count() > 0)
        {
            auto prDonor = asResidentBabies->GetRandom(RandUniform(50));
            got_prenat_care = prDonor->got_prenat_care;
            is_immunized = prDonor->is_immunized;
        }
        else if (RandUniform(51) < 0.5) is_immunized = TRUE; //this should not happen
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// Validation Tables
////////////////////////////////////////////////////////////////////////////////////////////////////


table Person TabPrenatCare           //EN Proportion of prenatal care
[in_projected_time && integer_age == 0 && is_resident]
{
    sex+ *
    educ_mother+ *
    {
        //EN Proportion prenatal care decimals=3
        duration(got_prenat_care,GPC_YES) / duration()
    }
    * sim_year
};

table Person TabImmunizationChildren           //EN Immunization children born in country
[in_projected_time && integer_age == 0 && person_type == PT_CHILD]
{
    sex+ *
    educ_mother+ *
    got_prenat_care+*
    {
        //EN Proportion immunized decimals=3
        duration(is_immunized,TRUE) / duration()
    }
    * ethnicity_short+
    * sim_year
};

table Person TabImmunizationImmi            //EN Immunization children born abroad
[in_projected_time && integer_age == 0 && person_type == PT_IMMIGRANT]
{
    got_prenat_care+*
    {
        //EN Proportion immunized decimals=3
        duration(is_immunized,TRUE) / duration()
    }
    * sim_year
    * sex+
};

table Person TabMapImmunization                 //EN Proportion of babies getting immunized
[in_projected_time && integer_age == 0 && person_type == PT_CHILD]
{
    got_prenat_care+*
    {
        //EN Proportion immunized decimals=3
        duration(is_immunized,TRUE) / duration()
    }
    * sim_year
    * district_nat +
};

table Person TabMapNumberBirths                 //EN Number of births
[in_projected_time && integer_age == 0 && person_type == PT_CHILD]
{
    {
        //EN Simulated births
        transitions(is_alive, FALSE,TRUE)/max_value_in(actor_weight)
    }
    * sim_year
    * district_nat +
};

5.19.3. Changes in _CountryContextNPL.mpp