OptionalbatchedOptionalextraExtra job params merged into every enqueued job (e.g. sessionId /
sessionNoteContext for the session-note jobbable). The receiving
jobbable validates its own schema on dequeue.
OptionalflagTargeting context for flag reads (batching gate, batch size). Built by the caller — the request
boundary already has userId + entityId, so per-org rules only match when it is passed here.
Absent falls back to createdBy as the user, which cannot match org-scoped rules.
The jobbable to enqueue per template (encodes runner + queue topic).
OptionalonHears of each run as it is created, so a caller can still act on the ones made before a later template fails.
OptionalpatientReviewer-selected charts the run is narrowed to, if any. Forwarded onto
each enqueued job, and stamped onto audit_runs.run_context.scopedCharts.
OptionalsettingsOptionalsubmissionA job is still sending the run's PDFs to Extend, so each run parks until that job clears it.
OptionaltreatmentEpisode the run is scoped to, if any — stamped onto each audit_runs row.
Where batches go when a run is too large for one invocation. Absent means never batch — session-note validation shares this core and its runs are one note, not a template.