Circle V2 API Docs
    Preparing search index...

    Populate the legacy_admission_id bridge for an integration — the link the chart-review trigger key falls back to once v1 patient_admissions is dropped at cutover. The bridge lives at a different grain per EMR, so this service owns the dispatch:

    • Kipu / Sunwave: one v1 admission ↔ one episode (external_id == external_admission_id), so it stamps treatment_episodes.legacy_admission_id.
    • LightningStep: one episode spans many v1 admissions, each of which IS a program stay, so it stamps program_stays.legacy_admission_id (per stay).
    • qualifacts_insync / synthetic: no v1 admission history — no-op.

    Both underlying bridges are idempotent (fill nulls only, never clobber). MUST run while patient_admissions still exists.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    serviceName: "BridgeLegacyAdmissionsService"

    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.

      Returns Attributes