Circle V2 API Docs
    Preparing search index...
    • Returns {
          collection: ListCollection<
              {
                  dob: string
                  | null;
                  facilityName: string | null;
                  label: string;
                  value: string;
              },
          >;
          fetchNextPage: (
              options?: FetchNextPageOptions,
          ) => Promise<
              InfiniteQueryObserverResult<
                  TRPCInfiniteData<
                      {
                          admissionStatus?: "all"
                          | "active"
                          | "discharged";
                          cursor?: number;
                          facilityId?: unknown;
                          facilityIdsForLoc?: string[];
                          facilityIdsForProgram?: string[];
                          levelOfCareIds?: string[];
                          limit?: number;
                          offset?: number;
                          patientIds?: unknown;
                          patientSearch?: string;
                          primaryProviderId?: unknown;
                          programIds?: string[];
                          sortBy?: "name" | "created_at" | "admitted_at" | "discharged_at";
                          sortOrder?: "desc" | "asc";
                          status?: unknown;
                      },
                      PaginatedResponse<
                          {
                              admitted_at: DbDate
                              | null;
                              created_at: DbDate;
                              discharged_at: DbDate | null;
                              dob: string | null;
                              entity_id: number & { __brand: "EntityId" } | null;
                              external_source:
                                  | "kipu"
                                  | "lightningstep"
                                  | "sunwave"
                                  | "qualifacts_insync"
                                  | "synthetic"
                                  | null;
                              facility_id: string & { __brand: "FacilityId" }
                              | null;
                              facility_name: string | null;
                              first_name: string | null;
                              last_name: string | null;
                              last_updated_summary: string | null;
                              latest_episode_id: TreatmentEpisodeId | null;
                              latest_episode_mrn: string | null;
                              latest_episode_start: string | null;
                              level_of_care_name: string | null;
                              patient_id: PatientId;
                              primary_provider_id: string & { __brand: "ProfileId" } | null;
                              program_name: string | null;
                              provider_first_name: string | null;
                              provider_last_name: string | null;
                              provider_title: string | null;
                              status: string | null;
                          },
                      >,
                  >,
                  TRPCClientErrorLike<
                      { errorShape: DefaultErrorShape; transformer: false },
                  >,
              >,
          >;
          hasMore: boolean;
          isLoading: boolean;
          isSearchSettled: boolean;
          searchValue: string;
          setSearchValue: Dispatch<SetStateAction<string>>;
      }