Circle V2 API Docs
    Preparing search index...

    Function resolveChartReviewSettings

    • Resolves the effective chart-review settings from LaunchDarkly.

      The chartReviewSettingOverrides JSON flag is merged OVER DEFAULT_CHART_REVIEW_SETTINGS — never taken wholesale. A partial flag value (e.g. a LaunchDarkly environment that defines only some of the keys) must still leave every required field (maxTokens) populated. Taking the flag value as-is ({ ...overrides }) was what let an environment switch enqueue chart-review jobs whose params had undefined required fields; those failed the jobbable's zod validate() and were silently dropped, so the queues stopped processing.

      The dedicated canary booleans live in their own boolean flags (so they can use LD percentage rollouts / entity targeting independently of the settings JSON) and are applied last, taking precedence over the JSON.

      It is provider-agnostic: callers pass any BaseFeatureFlagProvider plus a logger and FlagContext. The tRPC paths (run mutation, update-ai-summarized-note, superadmin requeue) pass the request-scoped provider; the triggered-chart-review jobbable passes the process-wide server provider keyed on the entity. Keeping resolution in one place means triggered runs honor the same entity-/LD-targeted settings manual runs do.

      Lives in @repo/legacy/chart-review (next to settings.ts / DEFAULT_CHART_REVIEW_SETTINGS) so both @repo/trpc and @repo/jobs can import it without @repo/jobs depending on @repo/trpc.

      Parameters

      Returns Promise<
          {
              enableCalendarAwareness?: boolean;
              enableEpisodePatientBlock?: boolean;
              enableExpandedStatuses?: boolean;
              enableIntentAwarePlanning?: boolean;
              enableMetadataAwareGate?: boolean;
              enablePerQuestionInstructions?: boolean;
              enableQueryHydration?: boolean;
              enableReviewCriteriaInDocumentSelection?: boolean;
              enableRunConstantPrefix?: boolean;
              enableStatusReconciliation?: boolean;
              enableSubClaimFanOut?: boolean;
              enableSummaryTableShortcut?: boolean;
              enableThinRetrievalBailout?: boolean;
              enableTimeFilteringInChartReview?: boolean;
              enableUnlockedRetrieval?: boolean;
              enableV3PassFailRunner?: boolean;
              maxTokens: number;
          },
      >