Circle V2 API Docs
    Preparing search index...
    type EnqueueChartReviewRunsParams = {
        auditTemplateIds: AuditTemplateId[];
        batchedJobbable?: ChartReviewEnqueuer;
        createdBy: UserId;
        extraParams?: { sessionId?: SessionId; [key: string]: unknown };
        flagContext?: FlagContext;
        jobbable: ChartReviewEnqueuer;
        onAuditRunCreated?: (auditRunId: AuditRunId) => void;
        patientChartIds?: PatientChartId[];
        patientId: PatientId;
        settings?: LegacyChartReviewSettings;
        submissionPending?: boolean;
        treatmentEpisodeId?: TreatmentEpisodeId | null;
    }
    Index

    Properties

    auditTemplateIds: AuditTemplateId[]
    batchedJobbable?: ChartReviewEnqueuer

    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.

    createdBy: UserId
    extraParams?: { sessionId?: SessionId; [key: string]: unknown }

    Extra 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.

    flagContext?: FlagContext

    Targeting 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).

    onAuditRunCreated?: (auditRunId: AuditRunId) => void

    Hears of each run as it is created, so a caller can still act on the ones made before a later template fails.

    patientChartIds?: PatientChartId[]

    Reviewer-selected charts the run is narrowed to, if any. Forwarded onto each enqueued job, and stamped onto audit_runs.run_context.scopedCharts.

    patientId: PatientId
    submissionPending?: boolean

    A job is still sending the run's PDFs to Extend, so each run parks until that job clears it.

    treatmentEpisodeId?: TreatmentEpisodeId | null

    Episode the run is scoped to, if any — stamped onto each audit_runs row.