Circle V2 API Docs
    Preparing search index...

    Type Alias ProgramStayInput

    A program / level-of-care enrollment window for one episode. external_id must be present, deterministic across syncs, and unique per integration (it backs the program_stays (integration_id, external_id) partial unique index): LightningStep uses the stable admission.id; Kipu/Sunwave synthesize a casefile/admission-scoped composite.

    The referenced program and level of care are each identified by name + external_id (when known). The service upserts the referenced programs/LOCs into the catalog (facility_programs / facility_levels_of_care, conflict key (integration_id, external_id)) and maps each stay's FK from the returned upserted rows — so a source whose catalog can't be synced separately (e.g. Sunwave) still resolves its FKs. A program/LOC is only upserted when BOTH its *_external_id and *_name are present; there is no name-only fallback.

    type ProgramStayInput = {
        end_date: string | null;
        external_id: string;
        level_of_care_external_id: string | null;
        level_of_care_name: string | null;
        program_external_id: string | null;
        program_name: string | null;
        start_date: string;
    }
    Index

    Properties

    end_date: string | null
    external_id: string
    level_of_care_external_id: string | null
    level_of_care_name: string | null
    program_external_id: string | null
    program_name: string | null
    start_date: string