Skip to content

targeting_config

IsPregnant

Bases: IsPregnant

Select the individual based on whether or not they are pregnant.

Registers a validation implicit that checks Birth_Rate_Dependence is set to INDIVIDUAL_PREGNANCIES or INDIVIDUAL_PREGNANCIES_BY_AGE_AND_YEAR.

Source code in emodpy_malaria/utils/targeting_config.py
class IsPregnant(_IsPregnantBase):
    """
    Select the individual based on whether or not they are pregnant.

    Registers a validation implicit that checks **Birth_Rate_Dependence** is set to
    ``INDIVIDUAL_PREGNANCIES`` or ``INDIVIDUAL_PREGNANCIES_BY_AGE_AND_YEAR``.
    """

    def to_schema_dict(self, campaign):
        campaign.implicits.append(validate_birth_rate_dependence)
        return super().to_schema_dict(campaign)