emodpy_hiv.interventions.randomchoice module#
- emodpy_hiv.interventions.randomchoice.new_diagnostic(camp, choices, intervention_name: str | None = None, disqualifying_properties: List[str] | None = None, new_property_value: str | None = None)[source]#
Wrapper function to create and return a HIVRandomChoice intervention.
- Parameters:
camp – emod_api.campaign object with schema_path set.
choices – dict of events:probability, with probs summing up to 1.0
intervention_name (str) – The name of the intervention.
disqualifying_properties (list of str) – A list of IndividualProperty key:value pairs that cause an intervention to be aborted
new_property_value (str) – An optional IndividualProperty key:value pair that will be assigned when the intervention is distributed.
- Returns:
Schema-based smart dictionary representing a new
- Return type:
ReadOnlyDict