Circle V2 API Docs
    Preparing search index...

    Manual "Sync episode": syncs ONE specific episode (the one the user picked) INLINE — a plain patient/episode sync with no trigger evaluation (chartReviewJobs: []). Loads the episode by id, derives its integration + the patient's entity, then runs SyncEpisode and returns when done, mirroring the synchronous syncPatient mutation. Unlike the hourly path it does not resolve a "primary" episode — the caller chose exactly which episode to sync.

    Qualifacts InSync is the exception: its adapter cannot satisfy the synchronous contract (the RPA is trigger → webhook), so InSync patients bypass the jobbable and enqueue a CloudCruise run instead — the same bypass the syncPatient mutation applies (see ingestInsyncEpisodes). With syncDocuments, the run is an episode_docs pull bounded to this episode's stay window, so the returned documents belong to the episode by construction; the episode id rides along and is stamped as provenance at ingest (DEV-2565).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    serviceName: "SyncEpisodeService"

    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.

      Parameters

      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

      Returns Attributes