Orchestrator
polars_ts.healthcare_agents.orchestrator
ClinicalOrchestrator: chains clinical agents over a ClinicalEnv.
ClinicalResult
dataclass
Output of a :class:ClinicalOrchestrator run.
Attributes
escalation_tiers
Per-step chosen escalation tier.
sepsis_flags
Per-step sepsis-risk flag from :class:SepsisWarningAgent.
treatments
Per-step recommended intervention label.
total_reward
Sum of environment rewards (meaningful only when labels are supplied).
history
Per-step diagnostic records.
ClinicalOrchestrator
Coordinate clinical decision-support agents over a vital-sign trajectory.
At each observation:
- :class:
SepsisWarningAgentscores sepsis risk (qSOFA + SIRS). - :class:
VitalMonitorAgentcounts out-of-range vitals. - :class:
EscalationAgentselects an escalation tier (NEWS-style). - :class:
TreatmentAgentrecommends an intervention and, when labels are available, learns online from the environment reward.
Parameters
sepsis_threshold Combined qSOFA+SIRS score at which sepsis risk is flagged. explore Epsilon-greedy exploration rate for the treatment recommender. seed Seed for the treatment recommender's RNG.
run(vitals, times=None, labels=None)
Run the multi-agent clinical monitoring loop.
Parameters
vitals
2D array (n_steps, n_channels) of vital-sign observations.
times
Optional observation timestamps for irregularly sampled series.
labels
Optional ground-truth deterioration labels for reward/learning.
Returns
ClinicalResult