Circle V2 API Docs
    Preparing search index...

    Type Alias FetchPatientDocumentsResult

    type FetchPatientDocumentsResult = {
        chartsToRetype?: {
            externalDocumentType: ExternalDocumentType;
            id: PatientChartId;
        }[];
        idsToDelete?: PatientChartId[];
        incremental?: boolean;
        textDocuments: RawDocumentResult[];
    }
    Index

    Properties

    chartsToRetype?: {
        externalDocumentType: ExternalDocumentType;
        id: PatientChartId;
    }[]

    Charts the manager should move onto a new external_document_type before the upserts, so a relabelled document keeps its row instead of being deleted and re-inserted.

    idsToDelete?: PatientChartId[]

    IDs of patient_charts rows the manager should delete as part of this sync. Adapters compute these by diffing live EMR docs against stored ones; the manager deletes them after the upserts, so a failed write leaves stale rows in place.

    incremental?: boolean

    The episode's documents were synced before, so the manager embeds only the documents whose stored version changed and must not rebuild the namespace from textDocuments, which may hold only what changed since that sync.

    textDocuments: RawDocumentResult[]