emodpy_malaria.interventions.diag_survey module

emodpy_malaria.interventions.diag_survey.add_diagnostic_survey(camp, 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, sensitivity: float = 1, specificity: float = 1, event_name: str = 'Diagnostic Survey', nodeIDs: list = None, positive_diagnosis_configs: list = None, negative_diagnosis_configs: list = None, received_test_event: str = 'Received_Test', IP_restrictions: list = None, NP_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)

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.

Parameters
  • camp – 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 – Beginning of the intervention’s existence. If triggered, runs on trigger, not on start_day.

  • diagnostic_type – Type of malaria diagnostic used. Default is

  • Available options are (**BLOOD_SMEAR**.) –

  • TRUE_INFECTION_STATUS (*) –

  • BLOOD_SMEAR (*) –

  • PCR (*) –

  • PF_HRP2 (*) –

  • TRUE_PARASITE_DENSITY (*) –

  • HAS_FEVER (*) –

  • diagnostic_threshold – The diagnostic detection threshold based on

  • **diagnostic_type**

  • BLOOD_SMEAR – Use the SusceptibilityMalaria::CheckParasiteCountWithTest() to get a parasite density to check against the threshold.

  • PCR – Use the ReportUtilitiesMalaria::NASBADensityWithUncertainty() method to calculate a measured parasite density and check against the threshold.

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

  • TRUE_PARASITE_DENSITY – Check the true/actual parasite density against the threshold (DEFAULT).

  • HAS_FEVER – Check the person’s fever against the threshold.

  • sensitivity – Setting for Base_Sensitivity in the MalariaDiagnostic

  • specificity – Setting for Base_Specificity in the MalariaDiagnostic

  • measurement_sensitivity – setting for Measurement_Sensitivity in MalariaDiagnostic event_name: Description of the event.

  • nodeIDs – 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.

  • IP_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.

  • NP_restrictions – List of NodeProperty key:value pairs that nodes must have to receive the diagnostic intervention. For example, [{"NodeProperty1":"PropertyValue1"}, {"NodeProperty2":"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