Circle V2 API Docs
    Preparing search index...

    Type Alias BaseParams

    type BaseParams = {
        entityId: EntityId;
        filters: BaseFilters;
        profileIds: ProfileId[] | null;
        scopeToLatestEpisode?: boolean;
    }
    Index

    Properties

    entityId: EntityId
    filters: BaseFilters
    profileIds: ProfileId[] | null

    Profiles to scope the query to. null means unrestricted (admin / superadmin or no provider filter requested). When set, a run is included only if the patient's creator profile OR primary provider is in this set.

    For non-admin callers, the TRPC layer intersects the user's accessible profiles with any user-requested profile filter and passes the result here.

    scopeToLatestEpisode?: boolean

    When true, restrict each patient's runs to their LATEST treatment episode (newest admission_date) or runs with no episode stamped (treatment_episode_id IS NULL). Runs tied to a prior episode are excluded. Opt-in (the review dashboard sets it); other analytics consumers leave it off so their behavior is unchanged.