Circle V2 API Docs
    Preparing search index...
    type IngestExtractedDocumentsParams = {
        documents: ExtractedRpaDocument[];
        entityId: EntityId;
        extendRunExternalId?: string | null;
        integrationId: IntegrationId;
        originalPatientChartId?: PatientChartId | null;
        patientId: PatientId;
        treatmentEpisodeId?: TreatmentEpisodeId | null;
    }
    Index

    Properties

    entityId: EntityId
    extendRunExternalId?: string | null

    Extend workflowRun id; when set, the stored chart is linked back to its extend_runs row.

    integrationId: IntegrationId
    originalPatientChartId?: PatientChartId | null

    The chart a superadmin resubmission (reprocess / run retry) originated from. If the re-extraction lands on a different dedup key (reclassified type or changed assessment date), the upsert creates a new row — the original is then superseded and deleted, along with its vectors, so stale copies don't feed chart-review retrieval.

    patientId: PatientId
    treatmentEpisodeId?: TreatmentEpisodeId | null

    Provenance stamp: the episode the originating RPA run was scoped to. Documents from a run bounded to one episode's stay window belong to that episode BY CONSTRUCTION, so this wins over inference from the OCR'd assessment_date. Null/absent (an unbounded pull spanning multiple episodes) falls back to date-of-service resolution, then the latest episode.