Circle V2 API Docs
    Preparing search index...

    Resubmits a chart's stored source PDF through the Extend workflow on demand, regardless of how (or whether) any previous run settled — unlike retryExtendExtractionService, which is keyed on a settled non-success extend_runs row. This is the superadmin "reprocess document" action for iterating on Extend workflow config (classifier/extractor/splitter/parser) without re-running the RPA pull.

    A chart is resubmitted through the same pipeline that ingested it the first time, so reprocess only re-runs extraction and never changes how the row is written. RPA-pulled charts (an integration_id is present) carry the chart's own correlation metadata plus originalPatientChartId, so the RPA webhook/ingest path replaces the row in place — or supersedes it (deleting the original row and its vectors) when re-extraction changes the dedup key. Uploaded charts have no integration correlation and go back through triggerExtendIngestionService, the same call the upload made.

    Correlation to the chart's latest Extend run is best-effort: charts without a tracked run still reprocess, falling back to EXTEND_RPA_WORKFLOW_ID and a synthetic session id (the ingest gate requires one but only uses it for correlation/logging).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    serviceName: "ReprocessPatientChartExtractionService"

    Stable, human-readable name for the service. Must be set explicitly on each subclass because this.constructor.name gets mangled by minification in production builds, which breaks tracing/observability span names.

    Accessors

    • get logger(): BaseLogger

      Returns BaseLogger

    • get name(): string

      Returns string

    Methods

    • Optional hook for subclasses to attach extra non-PII span attributes derived from params. The returned attributes appear on the service.${serviceName} span (and, for jobs, on job.enqueue.* and job.run.* spans too).

      Safe ID-like keys on params (e.g. patientId, templateIds, limit, cursor) are already auto-extracted via toSpanAttributes("service.input", params) — you don't need to enumerate them here. Use this hook for derived/computed attributes (counts, flags, computed names) or for fields you've explicitly verified safe but that aren't in the global allowlist. Hook output overrides auto-extracted attributes on key collision.

      Safe by default: returns {} when not overridden. Only declare keys you've confirmed are non-PII. Never include emails, names, dob, free-text, etc.

      Returns Attributes

    • Optional hook for subclasses to attach extra non-PII span attributes derived from the successful service result. Only called when run resolves successfully; on error, the span is marked via markSpanError instead.

      Safe by default: returns {} when not overridden. Only declare keys you've confirmed are non-PII (e.g. counts, status flags, computed summaries). Never include emails, names, dob, free-text, etc.

      Parameters

      • _result: ReprocessPatientChartExtractionResult

      Returns Attributes