Circle V2 API Docs
    Preparing search index...

    Function buildLevelOfCareIdByName

    • Index upserted level-of-care rows by their trimmed name identity (mirrors buildProgramIdByName), so a stay resolves its LOC FK via locIdByName.get(stay.level_of_care_name). Trimmed so stray whitespace can't miss the row stored under (facility_id, name).

      Parameters

      • rows: readonly {
            created_at: DbDate;
            entity_id: number & { __brand: "EntityId" };
            external_id: string | null;
            facility_id: string;
            id: FacilityLevelOfCareId;
            integration_id: string | null;
            name: string;
            type: "clinical" | "ur";
            updated_at: DbDate;
        }[]

      Returns TrimmedKeyMap<FacilityLevelOfCareId>