emodpy_hiv.interventions.hivmuxer module#
- emodpy_hiv.interventions.hivmuxer.new_intervention(camp: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, muxer_name: str, delay_complete_event: str, delay_distribution: str, delay_period_exponential: float | None = None, delay_period_kappa: float | None = None, delay_period_lambda: float | None = None, delay_period_constant: float | None = None, disqualifying_properties: ~typing.List[str] | None = None, max_entries: float = 1, new_property_value: str | None = None)[source]#
Create a HIVMuxer intervention object and return it. Please refer to the documentation for HIVMuxer at the following link: HIVMuxer.
- Parameters:
camp (emod_api.campaign) – The campaign object to which the event will be added. This should be an instance of the emod_api.campaign class.
muxer_name (str) – A name used to identify the delay and check whether individuals have entered it multiple times. If the same name is used at multiple points in the health care process, then the number of entries is combined when Max_Entries is applied.
delay_complete_event (str) – The event that should occur at the end of the delay period.
delay_distribution (str) – The delay distribution type for the event. Possible values are CONSTANT_DISTRIBUTION, EXPONENTIAL_DISTRIBUTION and WEIBULL_DISTRIBUTION.
delay_period_exponential (float, optional) – The mean for an exponential distribution. Required for delay_distribution = EXPONENTIAL_DISTRIBUTION. Defaults to None.
delay_period_kappa (float, optional) – The shape value in a Weibull distribution. Required for delay_distribution = WEIBULL_DISTRIBUTION. Defaults to None.
delay_period_lambda (float, optional) – The scale value in a Weibull distribution. Required for delay_distribution = WEIBULL_DISTRIBUTION. Defaults to None.
delay_period_constant (float, optional) – The constant delay period. Required for delay_distribution = CONSTANT_DISTRIBUTION. Defaults to None.
disqualifying_properties (List[str], optional) – A list of IndividualProperty key:value pairs that cause an intervention to be aborted. Generally used to control the flow of health care access. For example, to prevent the same individual from accessing health care via two different routes at the same time.
max_entries (float, optional) – The maximum number of times the individual can be registered with the HIVMuxer delay. Determines what should happen if an individual reaches the HIVMuxer stage of health care multiple times. Defaults to 1.
new_property_value (str, optional) – An optional IndividualProperty key:value pair that will be assigned when the intervention is first updated. Generally used to indicate the broad category of health care cascade to which an intervention belongs to prevent individuals from accessing care through multiple pathways.
- Returns:
intervention
- Raises:
ValueError – If invalid input is provided.
- emodpy_hiv.interventions.hivmuxer.add_hiv_muxer_event_with_trigger(camp: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int, event_trigger_list: ~typing.List[str], muxer_name: str, delay_complete_event: str, delay_distribution: str, delay_period_exponential: float | None = None, delay_period_kappa: float | None = None, delay_period_lambda: float | None = None, delay_period_constant: float | None = None, disqualifying_properties: ~typing.List[str] | None = None, demographic_coverage: float = 1, event_name: str = 'HIVMuxer with NLHTI', new_property_value: str | None = None, node_ids: ~typing.List[int] | None = None) None [source]#
Add HIVMuxer intervention with NodeLevelHealthTriggeredIV to campaign object Please refer to the documentation for HIVMuxer at the following link: HIVMuxer.
- Parameters:
camp (emod_api.campaign) – The campaign object to which the event will be added. This should be an instance of the emod_api.campaign class.
start_day (int) – The starting day for the event.
event_trigger_list (list) – A list of triggers for the event.
muxer_name (str) – A name used to identify the delay and check whether individuals have entered it multiple times. If the same name is used at multiple points in the health care process, then the number of entries is combined when Max_Entries is applied.
delay_complete_event (str) – The event that should occur at the end of the delay period.
delay_distribution (str) – The delay distribution type for the event. Possible values are CONSTANT_DISTRIBUTION, EXPONENTIAL_DISTRIBUTION and WEIBULL_DISTRIBUTION.
delay_period_exponential (float, optional) – The mean for an exponential distribution. Required for delay_distribution = EXPONENTIAL_DISTRIBUTION. Defaults to None.
delay_period_kappa (float, optional) – The shape value in a Weibull distribution. Required for delay_distribution = WEIBULL_DISTRIBUTION. Defaults to None.
delay_period_lambda (float, optional) – The scale value in a Weibull distribution. Required for delay_distribution = WEIBULL_DISTRIBUTION. Defaults to None.
delay_period_constant (float, optional) – The constant delay period. Required for delay_distribution = CONSTANT_DISTRIBUTION. Defaults to None.
disqualifying_properties (List[str], optional) – A list of IndividualProperty key:value pairs that cause an intervention to be aborted. Generally used to control the flow of health care access. For example, to prevent the same individual from accessing health care via two different routes at the same time.
demographic_coverage (float, optional) – The demographic coverage for the event. Defaults to 1.
event_name (str, optional) – The name of the event. Defaults to ‘HIVMuxer with NLHTI’.
new_property_value (str, optional) – An optional IndividualProperty key:value pair that will be assigned when the intervention is first updated. Generally used to indicate the broad category of health care cascade to which an intervention belongs to prevent individuals from accessing care through multiple pathways.
node_ids (List[int], optional) – A list of node IDs. Defaults to None.
- Returns:
None
- Raises:
ValueError – If invalid input is provided.
Example
>>> add_hiv_muxer_event_with_trigger( >>> camp, >>> start_day=10, >>> event_trigger_list=['HCTUptakePostDebut1'], >>> muxer_name='HCTUptakePostDebut', >>> new_property_value='CascadeState:HCTUptakePostDebut', >>> delay_complete_event='HCTUptakePostDebut2', >>> delay_distribution='EXPONENTIAL_DISTRIBUTION', >>> delay_period_exponential=0.5, >>> disqualifying_properties=[ >>> "CascadeState:LostForever", >>> "CascadeState:OnART", >>> "CascadeState:LinkingToART", >>> "CascadeState:OnPreART", >>> "CascadeState:LinkingToPreART", >>> "CascadeState:ARTStaging", >>> "CascadeState:HCTTestingLoop"], >>> demographic_coverage=0.5, >>> node_ids=[1, 2, 3] >>> )