emodpy_malaria.interventions.diag_survey module#

emodpy_malaria.interventions.diag_survey.add_diagnostic_survey(campaign, coverage: float = 1, repetitions: int = 1, tsteps_btwn_repetitions: int = 365, target: object = 'Everyone', start_day: int = 1, diagnostic_type: str = 'BLOOD_SMEAR_PARASITES', diagnostic_threshold: float = 40, measurement_sensitivity: float = 0.1, event_name: str = 'Diagnostic Survey', node_ids: list = None, positive_diagnosis_configs: list = None, negative_diagnosis_configs: list = None, received_test_event: str = 'Received_Test', ind_property_restrictions: list = None, disqualifying_properties: list = None, trigger_condition_list: list = None, listening_duration: int = -1, triggered_campaign_delay: int = 0, check_eligibility_at_trigger: bool = False, expire_recent_drugs: any = None)[source]#

Add an intervention to create either a scheduled or a triggered event to the campaign using the MalariaDiagnostic class, an individual-level class, to test individuals. Upon positive or negative diagnosis, the list of events to occur (as defined in positive_diagnosis_configs or negative_diagnosis_configs) is then executed. These events can trigger other listening interventions.

Args:
camp: The emod_api:emod_api.campaign object for building,

modifying, and writing campaign configuration files.

coverage: The probability an individual receives the diagnostic.

repetitions: Number of repetitions of the survey intervention.

tsteps_btwn_repetitions: Timesteps between repetitions.

target: A dictionary targeting an age range and gender of

individuals for treatment. In the format {"agemin": x, "agemax": y, "gender": z}. Default is Everyone.

start_day: The day of the simulation on which the intervention is created.

If triggered, runs on trigger, not on start_day.

diagnostic_type: Type of malaria diagnostic used. Default is

BLOOD_SMEAR_PARASITES. Available options are:

  • BLOOD_SMEAR_PARASITES

  • BLOOD_SMEAR_GAMETOCYTES

  • PCR_PARASITES

  • PCR_GAMETOCYTES

  • PF_HRP2

  • TRUE_INFECTION_STATUS

  • TRUE_PARASITE_DENSITY

  • FEVER

diagnostic_threshold: The diagnostic detection threshold based on

diagnostic_type:

TRUE_INFECTION_STATUS

BLOOD_SMEAR_PARASITES

In parasites/microliter, use measurement = float( 1.0 / measurementSensitivity * Poisson(measurementSensitivity * true_parasite_density)).

BLOOD_SMEAR_GAMETOCYTES

In gametocytes/microliter, use measurement = float( 1.0 / measurementSensitivity * Poisson(measurementSensitivity * true_gametocyte_density)).

PCR_PARASITES and PCR_GAMETOCYTES

Use the true values and an algorithm based on the paper Improving statistical inference on pathogen densities estimated by quantitative molecular methods : malaria gametocytaemia as a case study.

PF_HRP2

Add a new method to get the PfHRP2 value and check against the threshold.

TRUE_PARASITE_DENSITY

Check the true parasite density against the threshold.

FEVER

Check the person’s fever against the threshold.

measurement_sensitivity: Setting for Measurement_Sensitivity in

MalariaDiagnostic.

event_name: Description of the event.

node_ids: The list of nodes to apply this intervention to (Node_List

parameter). If not provided, set value of NodeSetAll.

positive_diagnosis_configs: List of events to happen to an individual

who receives a positive result from test.

negative_diagnosis_configs: List of events to happen to individual who

receives a negative result from test.

received_test_event: String for individuals to broadcast upon receiving

diagnostic.

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.

disqualifying_properties: List of IndividualProperty key:value pairs that

cause an intervention to be aborted. For example, [{"IndividualProperty1":"PropertyValue1"}, {"IndividualProperty2":"PropertyValue2"}].

trigger_condition_list: List of events that will trigger a diagnostic survey.

listening_duration: Duration after start day to stop listening for events, as

specified in trigger_condition_list. Default is -1, non-stop listening.

triggered_campaign_delay: Delay of running the intervention after receiving

a trigger from the trigger_condition_list.

check_eligibility_at_trigger: If triggered event is delayed, you have an

option to check individual/node’s eligibility at the initial trigger or when the event is actually distributed after delay.

expire_recent_drugs: Adds [{"DrugStatus:None"}] to

Property_Restrictions_Within_Node for positive test config, so only those with that property receive drugs.

Returns:

None