Circle V2 API Docs
    Preparing search index...
    utilizationRouter: BuiltRouter<
        {
            ctx: TRPCContext;
            errorShape: DefaultErrorShape;
            meta: object;
            transformer: false;
        },
        DecorateCreateRouterOptions<
            {
                episodeAuthorizations: QueryProcedure<
                    {
                        input: { patientId: string; treatmentEpisodeId: string };
                        meta: object;
                        output: {
                            authorizations: {
                                days: number | null;
                                endDate: string | null;
                                id: PatientUtilizationReviewId;
                                levelOfCare: string | null;
                                nextReview: string | null;
                                payer: string | null;
                                startDate: string | null;
                                status: string | null;
                            }[];
                            canSeePayer: boolean;
                        };
                    },
                >;
                facilityLedger: QueryProcedure<
                    {
                        input: { facilityId: string; facilityProgramId?: string } & {
                            from: string;
                            to: string;
                        };
                        meta: object;
                        output: {
                            canSeePayer: boolean;
                            facility: { id: FacilityId; name: string; timezone: string
                            | null };
                            freshness: {
                                asOf: DbDate;
                                currentThrough: DbDate | null;
                                lastSyncedAt: string | null;
                            };
                            programs: { id: FacilityProgramId; name: string }[];
                            rows: {
                                absences: number;
                                admittedAt: DbDate | null;
                                attendedDays: number;
                                attendedHours: number;
                                authDays: number | null;
                                authEnd: DbDate | null;
                                authStart: DbDate | null;
                                authUsed: number | null;
                                displayName: string;
                                documentedServices: number;
                                levelOfCare: string | null;
                                overlaps: number;
                                patientId: PatientId;
                                payer: string | null;
                                program: string | null;
                                treatmentEpisodeId: TreatmentEpisodeId | null;
                            }[];
                            serviceTypes: {
                                attendedDays: number;
                                attendedHours: number;
                                averageAttendedMinutes: number
                                | null;
                                clinicians: number;
                                instances: number;
                                instancesWithWindow: number;
                                name: string;
                                patients: number;
                                serviceType: UtilizationServiceType;
                            }[];
                        };
                    },
                >;
                listFacilities: QueryProcedure<
                    {
                        input: { from: string; to: string };
                        meta: object;
                        output: {
                            activePatients: number;
                            facilities: {
                                absences: number;
                                activePatients: number;
                                attendedDays: number;
                                attendedHours: number;
                                documentedServices: number;
                                facilityId: FacilityId;
                                lastSyncedAt: string | null;
                                name: string;
                                overlaps: number;
                                timezone: string | null;
                            }[];
                            freshness: {
                                asOf: string;
                                currentThrough: DbDate
                                | null;
                                lastSyncedAt: string | null;
                            };
                        };
                    },
                >;
                listForPatient: QueryProcedure<
                    {
                        input: { patientId: string; treatmentEpisodeId?: string };
                        meta: object;
                        output: { events: UtilizationEvent[]; timezone: string | null };
                    },
                >;
            },
        >,
    > = ...