Health-Seeking Behavior Interventions

This module provides health-seeking behavior modeling for TBsim simulations.

Main Health-Seeking Module

class tbsim.interventions.healthseeking.HealthSeekingBehavior(pars=None, **kwargs)[source]

Bases: Intervention

Trigger care-seeking behavior for individuals with active TB.

Parameters:
  • prob (float) – Probability of seeking care per unit time.

  • single_use (bool) – Whether to expire the intervention after success.

  • actual (Intervention) – Optional downstream intervention (e.g. testing or treatment).

__init__(pars=None, **kwargs)[source]
step()[source]

Define how the module updates over time – the key part of Starsim!!

init_results()[source]

Define metrics to track over time.

update_results()[source]

Record who was eligible and who sought care at this timestep.

Available Classes

HealthSeekingBehavior

Intervention that triggers care-seeking behavior for individuals with active TB

Key Features

  • Care-seeking Triggers: Automatic health-seeking for active TB cases

  • Configurable Probabilities: Adjustable care-seeking rates

  • Timing Control: Optional start/stop time windows

  • Single-use Option: Expire intervention after successful care-seeking

  • Result Tracking: Monitor care-seeking behavior over time

Usage Examples

Basic health-seeking behavior:

from tbsim.interventions.healthseeking import HealthSeekingBehavior
from tbsim import TB

# Add TB module and health-seeking behavior
# Note: HealthSeekingBehavior creates 'sought_care' attribute
tb = TB()
health_seeking = HealthSeekingBehavior()

sim = ss.Sim(
    diseases=tb,
    interventions=health_seeking
)
sim.run()

Custom health-seeking parameters:

health_seeking = HealthSeekingBehavior(
    prob=0.2,              # 20% daily probability of seeking care
    single_use=False,      # Continue triggering care-seeking
    start=2020,            # Start in 2020
    stop=2030              # Stop in 2030
)

Key Methods

Behavior Management
  • step(): Execute health-seeking behavior each time step

  • init_results(): Initialize behavior result tracking

  • update_results(): Update results during simulation

Care-seeking Logic
  • Identifies individuals with active TB

  • Applies care-seeking probability

  • Triggers treatment initiation

  • Manages intervention expiration

  • Tracks care-seeking outcomes

Behavior Parameters

prob: Daily probability of seeking care (default: 0.1) single_use: Whether to expire after successful care-seeking (default: True) start: Optional start time for intervention stop: Optional stop time for intervention

Health-Seeking Outcomes

The module tracks: - Eligible Individuals: Active TB cases who haven’t sought care - Care-seeking Events: Successful health-seeking behavior - Treatment Initiation: Automatic treatment start for care-seekers - Behavior Patterns: Care-seeking trends over time

Integration with Other Modules

TB Module: Automatically triggers treatment for care-seekers Diagnostic Module: Care-seeking leads to testing opportunities Treatment Module: Care-seeking initiates treatment pathways

For comprehensive health-seeking integration, see the TB Health-Seeking Interventions module.