emodpy_malaria.interventions.drug_campaign module

This module contains functionality for malaria intervention distribution via a cascade of care that may contain diagnostics and drug treatments.

emodpy_malaria.interventions.drug_campaign.drug_configs_from_code(campaign, drug_code: str | None = None)[source]

Add a single or multiple drug regimen to the configuration file based on its code and add the corresponding AntimalarialDrug intervention to the return dictionary. For example, passing the ALP drug code will add the drug configuration for artemether, lumefantrine, and primaquine to the configuration file and will return a dictionary containing a full treatment course for those three drugs. For more information, see Malaria_Drug_Params in Drugs and treatments.

Parameters:
  • campaign – The emod_api.campaign object to which the intervention will be added.

  • drug_code – The code of the drug regimen. This must be listed in the drug_cfg dictionary.

Returns:

A dictionary containing the intervention for the given drug regimen.

emodpy_malaria.interventions.drug_campaign.add_drug_campaign(campaign, campaign_type: str = 'MDA', drug_code: str | None = None, start_days: list | None = None, coverage: float = 1.0, repetitions: int = 1, tsteps_btwn_repetitions: int = 60, diagnostic_type: str = 'BLOOD_SMEAR_PARASITES', diagnostic_threshold: float = 40, measurement_sensitivity: float = 0.1, fmda_radius: int = 0, node_selection_type: str = 'DISTANCE_ONLY', trigger_coverage: float = 1.0, trigger_name: str | None = None, snowballs: int = 0, treatment_delay: int = 0, triggered_campaign_delay: int = 0, delay_distribution: dict | None = None, node_ids: list | None = None, target_group: any = 'Everyone', drug_ineligibility_duration: int = 0, ind_property_restrictions: list | None = None, ind_prop_restr_birthtrigger_event: list | None = None, disqualifying_properties: list | None = None, trigger_condition_list: list | None = None, listening_duration: int = -1, adherent_drug_configs: list | None = None, target_residents_only: int = 1, check_eligibility_at_trigger: bool = False, receiving_drugs_event_name='Received_Campaign_Drugs')[source]

Add a drug intervention campaign from a list of malaria campaign types. This intervention uses the MalariaDiagnostic class to create either a scheduled or a triggered event to the campaign and the AntimalarialDrug class to configure drug interventions. You can also specify a delay period for a triggered event that broadcasts afterwards. If the campaign is repeated or triggered, separate NodeLevelHealthTriggeredIV interventions are created with a delay that sends an event to distribute drugs.

Parameters:
  • campaign – The emod_api.campaign object to which the intervention will be added.

  • campaign_type – The type of drug campaign. Available options are: MDA - Add a mass drug administration intervention. MSAT - Add a mass screening and treatment intervention. SMC - Add a seasonal malaria chemoprevention intervention. fMDA- Add a focal mass drug administration intervention based on results from a diagnostic survey, which is either scheduled or triggered (when trigger_condition_list is present). MTAT- Add a mass testing and treatment intervention. rfMSAT -Add a reactive focal mass screening and treatment intervention. Detecting malaria triggers diagnostic surveys to run on neighboring nodes and so on, up to the number of triggered interventions defined in the snowballs parameter. rfMDA - Add a reactive focal mass drug administration intervention. This triggers to broadcast a “Give_Drugs_rfMDA” event, which triggers to distribute drugs and a “Received_Treatment” event followed by a delayed “Give_Drugs_rfMDA” event to neighboring nodes, which will trigger another drug distribution. PMC -

  • drug_code – The code of the drug regimen to distribute. This must be listed in the drug_cfg dictionary.

  • start_days – List of start days (integers) when the drug regimen will be distributed. Due to diagnostic/treatment configuration, the earliest start day is 1. When trigger_condition_list is used, the first entry of start_days is the day to start listening for the trigger(s).

  • coverage – The demographic coverage of the distribution (the fraction of people at home during the campaign).

  • repetitions – The number of repetitions.

  • tsteps_btwn_repetitions – The timesteps between the repetitions.

  • diagnostic_type – The setting for Diagnostic_Type in MalariaDiagnostic. In addition to the accepted values listed there, you may also set TRUE_INFECTION_STATUS, which calls StandardDiagnostic instead.

  • diagnostic_threshold – The setting for Diagnostic_Threshold in MalariaDiagnostic.

  • measurement_sensitivity – The setting for Measurement_Sensitivity in MalariaDiagnostic.

  • fmda_radius – Radius (in km) of focal response upon finding infection. Used in simulations with many small nodes to simulate community health workers distributing drugs to surrounding houses. Used when campaign_type is set to fMDA.

  • node_selection_type – The setting for Node_Selection_Type in BroadcastEventToOtherNodes.

  • trigger_coverage – The fraction of trigger events that will trigger reactive case detection (RCD). Used when campaign_type is set to rfMSAT or rfMDA. To set the fraction of individuals reached during RCD response, use coverage.

  • trigger_name

    Name of broadcast event sent out after trigger event. Also used as in drug campaign with default “Received_{trigger_name}” .. rubric:: Example

    ”IPTi_{x}” with x = number of IPTi dose

  • snowballs – The number of times each triggered intervention will be distributed to surrounding nodes. For example, one snowball gives drugs to nodes neighboring the first node and two snowballs gives drugs to the nodes neighboring those nodes. Used when campaign_type is set to rfMSAT.

  • treatment_delay – For campaign_type set to MSAT or fMDA, the length of time between administering a diagnostic and giving drugs; for values of rfMSAT or rfMDA, the length of time between treating the index case and triggering an RCD response.

  • triggered_campaign_delay – When using trigger_condition_list, this indicates the delay period between receiving the trigger event and running the triggered campaign intervention.

  • delay_distribution

    For triggered_campaign_delay_event used in IPTi campaign, dictionary of parameters that define the distribution for duration at node, including the distribution Default: None Durations are in days.

    Examples:

    {"Delay_Period_Distribution":"GAUSSIAN_DISTRIBUTION",
     "Delay_Period_Gaussian_Mean": triggered_campaign_delay, "Delay_Period_Gaussian_Std_Dev" 3}
    

  • node_ids – The setting for Node_List in Nodeset_Config classes.

  • target_group – A dictionary of {'agemin': x, 'agemax': y} to target MDA, SMC, MSAT, fMDA to individuals between x and y years of age. Default is Everyone.

  • drug_ineligibility_duration – The number of days to set the DrugStatus individual property to RecentDrug, after which the property value is reverted. This property value prevents people from receiving drugs too frequently, but they can still receive diagnostics during this period. For more information, see Targeting interventions to nodes or individuals.

  • ind_property_restrictions – The setting for Property_Restrictions_Within_Node in TriggeredEventCoordinator that individuals must have to receive the diagnostic intervention.

  • ind_prop_restr_birthtrigger_event – List of IndividualProperty key:value pairs that individuals must have to create trigger event for the intervention. For example, [{"IndividualProperty1":"PropertyValue1"}, {"IndividualProperty2":"PropertyValue2"}]. Default is no restrictions. Used in triggered_campaign_delay_event that creates BroadcastEvent to trigger vaccine campaign.

  • disqualifying_properties – The setting for Disqualifying_Properties in AntimalarialDrug or in MalariaDiagnostic.

  • trigger_condition_list – The setting for Start_Trigger_Condition_List in TriggeredEventCoordinator.

  • listening_duration – The setting for Duration in TriggeredEventCoordinator.

  • adherent_drug_configs – List of adherent drug configurations, which are dictionaries from configure_adherent_drug.

  • target_residents_only – The setting for Target_Residents_Only in TriggeredEventCoordinator.

  • check_eligibility_at_trigger – Set to True to check the individual or node’s eligibility at the initial trigger; set to False to check eligibility when the event is actually distributed after a delay.

  • receiving_drugs_event_name – The event to broadcast when a person receives drugs.

Returns:

A dictionary with drug campaign parameters.

emodpy_malaria.interventions.drug_campaign.add_MDA(campaign, start_days: list | None = None, coverage: float = 1.0, drug_configs: list | None = None, receiving_drugs_event: BroadcastEvent | None = None, repetitions: int = 1, tsteps_btwn_repetitions: int = 60, node_ids: list | None = None, expire_recent_drugs: PropertyValueChanger | None = None, ind_property_restrictions: list | None = None, disqualifying_properties: list | None = None, target_group: any = 'Everyone', trigger_condition_list: list | None = None, listening_duration: int = -1, triggered_campaign_delay: int = 0, target_residents_only: int = 1, check_eligibility_at_trigger: bool = False)[source]

Add an MDA (mass drug administration) drug intervention to your campaign. See add_drug_campaign() for more information about each argument.

Returns:

None

emodpy_malaria.interventions.drug_campaign.add_MSAT(campaign, start_days: list | None = None, coverage: float = 1.0, drug_configs: list | None = None, receiving_drugs_event: BroadcastEvent | None = None, repetitions: int = 1, tsteps_btwn_repetitions: int = 60, treatment_delay: int = 0, diagnostic_type: str = 'BLOOD_SMEAR_PARASITES', diagnostic_threshold: float = 40, measurement_sensitivity: float = 0.1, node_ids: list | None = None, expire_recent_drugs: PropertyValueChanger | None = None, ind_property_restrictions: list | None = None, disqualifying_properties: list | None = None, target_group: any = 'Everyone', trigger_condition_list: list | None = None, triggered_campaign_delay: int = 0, listening_duration: int = -1, check_eligibility_at_trigger: bool = False)[source]

Add an MSAT (mass screening and treatment) drug intervention to your campaign. See add_drug_campaign() for more information about each argument.

Returns:

None

emodpy_malaria.interventions.drug_campaign.add_fMDA(campaign, start_days: list | None = None, trigger_coverage: float = 1, coverage: float = 1, drug_configs: list | None = None, receiving_drugs_event: BroadcastEvent | None = None, repetitions: int = 1, tsteps_btwn_repetitions: int = 365, treatment_delay: int = 0, diagnostic_type: str = 'BLOOD_SMEAR_PARASITES', diagnostic_threshold: float = 40, measurement_sensitivity: float = 0.1, fmda_radius: int = 0, node_selection_type: str = 'DISTANCE_ONLY', node_ids: list | None = None, expire_recent_drugs: PropertyValueChanger | None = None, ind_property_restrictions: list | None = None, disqualifying_properties: list | None = None, target_group: any = 'Everyone', trigger_condition_list: list | None = None, listening_duration: int = -1, triggered_campaign_delay: int = 0, check_eligibility_at_trigger: bool = False)[source]

Add an fMDA (focal mass drug administration) drug intervention to your campaign. See add_drug_campaign() for more information about each argument.

Returns:

None

emodpy_malaria.interventions.drug_campaign.add_rfMSAT(campaign, start_day: int = 0, coverage: float = 1, drug_configs: list | None = None, receiving_drugs_event: BroadcastEvent | None = None, listening_duration: int = -1, treatment_delay: int = 0, trigger_coverage: float = 1, diagnostic_type: str = 'BLOOD_SMEAR_PARASITES', diagnostic_threshold: float = 40, measurement_sensitivity: float = 0.1, fmda_radius: int = 0, node_selection_type: str = 'DISTANCE_ONLY', snowballs: int = 0, node_ids: list | None = None, expire_recent_drugs: PropertyValueChanger | None = None, ind_property_restrictions: list | None = None, disqualifying_properties: list | None = None)[source]

Add a rfMSAT (reactive focal mass screening and treatment) drug intervention to your campaign. See add_drug_campaign() for more information about each argument.

Returns:

None

emodpy_malaria.interventions.drug_campaign.add_rfMDA(campaign, start_day: int = 0, coverage: float = 1, drug_configs: list | None = None, receiving_drugs_event: BroadcastEvent | None = None, listening_duration: int = -1, treatment_delay: int = 0, trigger_coverage: float = 1, fmda_radius: int = 0, node_selection_type: str = 'DISTANCE_ONLY', node_ids: list | None = None, expire_recent_drugs: PropertyValueChanger | None = None, ind_property_restrictions: list | None = None, disqualifying_properties: list | None = None)[source]

Add an rfMDA (reactive focal mass drug administration) drug intervention to your campaign. See add_drug_campaign() for more information about each argument.

Returns:

None

emodpy_malaria.interventions.drug_campaign.fmda_cfg(campaign, fmda_type: any = 0, node_selection_type: str = 'DISTANCE_ONLY', event_trigger: str = 'Give_Drugs')[source]

Create an fMDA (focal mass drug administration) configuration.

Parameters:
Returns:

Configured BroadcastEventToOtherNodes intervention.

emodpy_malaria.interventions.drug_campaign.add_IPTi(campaign, start_day: int = 1, triggered_campaign_delay: int | None = None, trigger_name: str | None = None, coverage: float = 1, trigger_coverage: float = 1, drug_configs: list | None = None, listening_duration: int = -1, delay_distribution: dict | None = None, node_ids: list | None = None, ind_prop_restr_birthtrigger_event: list | None = None, ind_property_restrictions: list | None = None)[source]

This function adds two intervention types and multiple deployments to your campaign file: 1) “IPTi” (IPTi eligible) - triggered campaign_delay_event of “Births” event with a “triggered_campaign_delay” option, with “demographic_coverage”. 2) “Received_IPTi” event-triggered MultiIntervention event distributing “drug_configs” drugs, with “coverage” to specify custom coverages at the triggered campaign_delay_event.

Upon “Births” event a delayed “IPTi” is sent out, which triggers giving drugs in a separate event “Received_IPTi”.

Parameters:
  • campaign – The emod_api.campaign object to which the intervention will be added.

  • start_day – The day the intervention is distributed. Default is 0.

  • trigger_coverage – Used to create BroadcastEvent to trigger IPTi campaign after Births. Default is 1 (i.e. all infants are captured by health system to reach an age eligible for IPTi).

  • coverage – The proportion of the population covered by the intervention (fraction of infants receiving IPTi)

  • drug_configs – List of dictionaries of drug configurations to be distributed, created in add_drug_campaign.

  • listening_duration – Duration of the existence of the intervention. Default is ongoing.

  • delay_distribution

    Dictionary of parameters that define the distribution for duration at node, including the distribution Default: None Durations are in days.

    Examples:

        {"Delay_Period_Distribution":"GAUSSIAN_DISTRIBUTION",
        "Delay_Period_Gaussian_Mean": 14, "Delay_Period_Gaussian_Std_Dev" 3}
        {"Delay_Period_Distribution":"POISSON_DISTRIBUTION",
        "Delay_Period_Poisson_Mean" 30}
    If None automatically uses:
        {"Delay_Period_Distribution": "CONSTANT_DISTRIBUTION",
        "Delay_Period_Constant": triggered_campaign_delay}
    

  • triggered_campaign_delay – When using trigger_condition_list, this indicates the delay period between receiving the trigger event and running the triggered campaign intervention (days after Births at which infant is eligible for IPTi). This is ignored if delay_distribution is not None.

  • trigger_name

    Name of broadcast event sent out after trigger event. Also used as in drug campaign with default “Received_{trigger_name}” .. rubric:: Example

    ”IPTi_{x}” with x = number of IPTi dose

  • node_ids – The list of nodes to apply this intervention to (Node_List parameter). If not provided, set value of NodeSetAll.

  • ind_property_restrictions – List of IndividualProperty key:value pairs that individuals must have to receive the diagnostic intervention. For example, [{"IndividualProperty1":"PropertyValue1"}, {"IndividualProperty2":"PropertyValue2"}]. Default is no restrictions.

Returns:

None