Circle V2 API Docs
    Preparing search index...

    Adapter for syncing data from LightningStep to v2.

    Mirrors the legacy adapter's three external touchpoints (admissions, care team, documents) with the same filter shapes and mapping helpers. Differences from legacy:

    • DB access goes through v2 repo singletons (patientsRepo, patientAdmissionsRepo) rather than per-request Supabase clients.
    • Errors are typed (IntegrationConfigError / PatientConfigError) instead of bare Error so the manager can surface them cleanly.
    • The level-of-care name comes from the inner-join on patientAdmissionsRepo.listForPatientByIntegration (level_of_care_name) rather than the legacy nested entity_levels_of_care.name shape.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • integration: {
            created_at: DbDate;
            created_by: string | null;
            credentials:
                | {
                    access_id: string;
                    app_id: string;
                    location_id: number;
                    location_name?: string;
                    secret_key: string;
                }
                | { bearer_token: string; location_ids: number[]; location_name?: string }
                | {
                    api_id: string;
                    api_secret: string;
                    location_name?: string;
                    realm_id: string;
                    service_facility_id: number;
                    sunwave_email: string;
                }
                | {
                    base_url: string;
                    client_id: string;
                    rpa_vault_user_id: string;
                    rpa_workflow_id: string;
                    secret_key: string;
                };
            entity_id: number & { __brand: "EntityId" };
            facility_id: FacilityId | null;
            id: IntegrationId;
            label: string | null;
            last_sync: string | null;
            status: "error" | "active" | "inactive";
            type: "kipu" | "lightningstep" | "sunwave" | "qualifacts_insync";
            updated_at: DbDate;
        }
      • Optionaloptions: LightningStepAdapterOptions

      Returns LightningStepAdapter

    Properties

    integration: {
        created_at: DbDate;
        created_by: string | null;
        credentials:
            | {
                access_id: string;
                app_id: string;
                location_id: number;
                location_name?: string;
                secret_key: string;
            }
            | { bearer_token: string; location_ids: number[]; location_name?: string }
            | {
                api_id: string;
                api_secret: string;
                location_name?: string;
                realm_id: string;
                service_facility_id: number;
                sunwave_email: string;
            }
            | {
                base_url: string;
                client_id: string;
                rpa_vault_user_id: string;
                rpa_workflow_id: string;
                secret_key: string;
            };
        entity_id: number & { __brand: "EntityId" };
        facility_id: FacilityId | null;
        id: IntegrationId;
        label: string | null;
        last_sync: string | null;
        status: "error" | "active" | "inactive";
        type: "kipu" | "lightningstep" | "sunwave" | "qualifacts_insync";
        updated_at: DbDate;
    }
    logger: ConsoleLogger = ...

    Methods

    • Parameters

      • startDate: Date
      • endDate: Date

      Returns Promise<FetchEpisodesInRangeResult>

    • Returns Promise<FetchFacilityLevelsOfCareResult>

    • Returns Promise<FetchFacilityProgramsResult>

    • Parameters

      Returns Promise<FetchTreatmentEpisodesResult>